Change net event and const prefix
This commit is contained in:
@@ -8,14 +8,14 @@
|
||||
// ===========================================================================
|
||||
|
||||
// Gate Owner Types
|
||||
const VRR_GATEOWNER_NONE = 0; // Not owned
|
||||
const VRR_GATEOWNER_PLAYER = 1; // Owner is a player (character/subaccount)
|
||||
const VRR_GATEOWNER_JOB = 2; // Owned by a job
|
||||
const VRR_GATEOWNER_CLAN = 3; // Owned by a clan
|
||||
const VRR_GATEOWNER_FACTION = 4; // Owned by a faction
|
||||
const VRR_GATEOWNER_PUBLIC = 5; // Public gate. Technically not owned. This probably won't be used.
|
||||
const VRR_GATEOWNER_BUSINESS = 6; // Owned by a business. Back lots, unloading areas, and other stuff like that
|
||||
const VRR_GATEOWNER_HOUSE = 7; // Owned by a house. Like for mansions with closed private areas.
|
||||
const AGRP_GATEOWNER_NONE = 0; // Not owned
|
||||
const AGRP_GATEOWNER_PLAYER = 1; // Owner is a player (character/subaccount)
|
||||
const AGRP_GATEOWNER_JOB = 2; // Owned by a job
|
||||
const AGRP_GATEOWNER_CLAN = 3; // Owned by a clan
|
||||
const AGRP_GATEOWNER_FACTION = 4; // Owned by a faction
|
||||
const AGRP_GATEOWNER_PUBLIC = 5; // Public gate. Technically not owned. This probably won't be used.
|
||||
const AGRP_GATEOWNER_BUSINESS = 6; // Owned by a business. Back lots, unloading areas, and other stuff like that
|
||||
const AGRP_GATEOWNER_HOUSE = 7; // Owned by a house. Like for mansions with closed private areas.
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -27,7 +27,7 @@ class GateData {
|
||||
this.enabled = false;
|
||||
this.position = toVector3(0.0, 0.0, 0.0);
|
||||
this.locked = true;
|
||||
this.ownerType = VRR_GATEOWNER_NONE;
|
||||
this.ownerType = AGRP_GATEOWNER_NONE;
|
||||
this.ownerId = 0;
|
||||
|
||||
if (dbAssoc) {
|
||||
@@ -54,17 +54,17 @@ function initGateScript() {
|
||||
function doesPlayerHaveGateKeys(client, vehicle) {
|
||||
let gateData = getGateData(vehicle);
|
||||
|
||||
if (gateData.ownerType == VRR_GATEOWNER_PUBLIC) {
|
||||
if (gateData.ownerType == AGRP_GATEOWNER_PUBLIC) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (gateData.ownerType == VRR_GATEOWNER_PLAYER) {
|
||||
if (gateData.ownerType == AGRP_GATEOWNER_PLAYER) {
|
||||
if (gateData.ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (gateData.ownerType == VRR_GATEOWNER_CLAN) {
|
||||
if (gateData.ownerType == AGRP_GATEOWNER_CLAN) {
|
||||
if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageClans"))) {
|
||||
return true;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ function doesPlayerHaveGateKeys(client, vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
if (gateData.ownerType == VRR_GATEOWNER_FACTION) {
|
||||
if (gateData.ownerType == AGRP_GATEOWNER_FACTION) {
|
||||
if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageFactions"))) {
|
||||
return true;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ function doesPlayerHaveGateKeys(client, vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
if (gateData.ownerType == VRR_GATEOWNER_JOB) {
|
||||
if (gateData.ownerType == AGRP_GATEOWNER_JOB) {
|
||||
if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageJobs"))) {
|
||||
return true;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ function doesPlayerHaveGateKeys(client, vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
if (gateData.ownerType == VRR_GATEOWNER_BUSINESS) {
|
||||
if (gateData.ownerType == AGRP_GATEOWNER_BUSINESS) {
|
||||
if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) {
|
||||
return true;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ function doesPlayerHaveGateKeys(client, vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
if (gateData.ownerType == VRR_GATEOWNER_HOUSE) {
|
||||
if (gateData.ownerType == AGRP_GATEOWNER_HOUSE) {
|
||||
if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user