Change net event and const prefix
This commit is contained in:
@@ -15,10 +15,10 @@ function initAntiCheatScript() {
|
||||
// ===========================================================================
|
||||
|
||||
function clearPlayerStateToEnterExitProperty(client) {
|
||||
if(getPlayerData(client).pedState != VRR_PEDSTATE_READY) {
|
||||
if(getPlayerData(client).pedState == VRR_PEDSTATE_ENTERINGVEHICLE) {
|
||||
if (getPlayerData(client).pedState != AGRP_PEDSTATE_READY) {
|
||||
if (getPlayerData(client).pedState == AGRP_PEDSTATE_ENTERINGVEHICLE) {
|
||||
sendPlayerClearPedState(client);
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_READY;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_READY;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ function clearPlayerStateToEnterExitProperty(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerExemptFromAntiCheat(client) {
|
||||
if(hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("ExemptFromAntiCheat"))) {
|
||||
if (hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("ExemptFromAntiCheat"))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ function isPlayerExemptFromAntiCheat(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function canPlayerUsePoliceJob(client) {
|
||||
if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.policeBanned) {
|
||||
if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.policeBanned) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ function canPlayerUsePoliceJob(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function canClientUseFireJob(client) {
|
||||
if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.fireBanned) {
|
||||
if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.fireBanned) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ function canClientUseFireJob(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function canClientUseAmmunations(client) {
|
||||
if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.AmmuBanned) {
|
||||
if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.AmmuBanned) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ function canClientUseAmmunations(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function canClientUseGuns(client) {
|
||||
if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.GunBanned) {
|
||||
if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.GunBanned) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
// ===========================================================================
|
||||
|
||||
// Ban Types
|
||||
const VRR_BANTYPE_NONE = 0;
|
||||
const VRR_BANTYPE_ACCOUNT = 1;
|
||||
const VRR_BANTYPE_SUBACCOUNT = 2;
|
||||
const VRR_BANTYPE_IPADDRESS = 3;
|
||||
const VRR_BANTYPE_SUBNET = 4;
|
||||
const AGRP_BANTYPE_NONE = 0;
|
||||
const AGRP_BANTYPE_ACCOUNT = 1;
|
||||
const AGRP_BANTYPE_SUBACCOUNT = 2;
|
||||
const AGRP_BANTYPE_IPADDRESS = 3;
|
||||
const AGRP_BANTYPE_SUBNET = 4;
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
class BanData {
|
||||
constructor(dbAssoc = false) {
|
||||
this.databaseId = 0;
|
||||
this.type = VRR_BANTYPE_NONE;
|
||||
this.type = AGRP_BANTYPE_NONE;
|
||||
this.detail = "";
|
||||
this.ipAddress = "";
|
||||
this.name = "";
|
||||
@@ -174,7 +174,7 @@ function banAccount(accountId, adminAccountId, reason) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let safeReason = dbConnection.escapetoString(reason);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -189,7 +189,7 @@ function banSubAccount(subAccountId, adminAccountId, reason) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let safeReason = dbConnection.escapetoString(reason);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -204,7 +204,7 @@ function banIPAddress(ipAddress, adminAccountId, reason) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let safeReason = dbConnection.escapetoString(reason);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -219,7 +219,7 @@ function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let safeReason = dbConnection.escapetoString(reason);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`);
|
||||
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -233,7 +233,7 @@ function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) {
|
||||
function unbanAccount(accountId, adminAccountId) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`);
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -247,7 +247,7 @@ function unbanAccount(accountId, adminAccountId) {
|
||||
function unbanSubAccount(subAccountId, adminAccountId) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`);
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -261,7 +261,7 @@ function unbanSubAccount(subAccountId, adminAccountId) {
|
||||
function unbanIPAddress(ipAddress, adminAccountId) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`);
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -275,7 +275,7 @@ function unbanIPAddress(ipAddress, adminAccountId) {
|
||||
function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if (dbConnection) {
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`);
|
||||
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`);
|
||||
freeDatabaseQuery(dbQuery);
|
||||
dbConnection.close();
|
||||
return true;
|
||||
@@ -287,7 +287,7 @@ function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) {
|
||||
// ===========================================================================
|
||||
|
||||
function isAccountBanned(accountId) {
|
||||
let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_ACCOUNT && ban.detail === accountId);
|
||||
let bans = getServerData().bans.filter(ban => ban.type === AGRP_BANTYPE_ACCOUNT && ban.detail === accountId);
|
||||
if (bans.length > 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ function isAccountBanned(accountId) {
|
||||
// ===========================================================================
|
||||
|
||||
function isSubAccountBanned(subAccountId) {
|
||||
let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_SUBACCOUNT && ban.detail === subAccountId);
|
||||
let bans = getServerData().bans.filter(ban => ban.type === AGRP_BANTYPE_SUBACCOUNT && ban.detail === subAccountId);
|
||||
if (bans.length > 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -309,7 +309,7 @@ function isSubAccountBanned(subAccountId) {
|
||||
// ===========================================================================
|
||||
|
||||
function isIpAddressBanned(ipAddress) {
|
||||
let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_IPADDRESS && ban.detail === ipAddress);
|
||||
let bans = getServerData().bans.filter(ban => ban.type === AGRP_BANTYPE_IPADDRESS && ban.detail === ipAddress);
|
||||
if (bans.length > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ function isPlayerAtBank(client) {
|
||||
|
||||
let businessId = getPlayerBusiness(client);
|
||||
if (getBusinessData(client) != false) {
|
||||
if (getBusinessData(businessId).entranceType == VRR_BIZ_ENTRANCE_TYPE_BANK) {
|
||||
if (getBusinessData(businessId).entranceType == AGRP_BIZ_ENTRANCE_TYPE_BANK) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ function setBusinessNameCommand(command, params, client) {
|
||||
|
||||
let oldBusinessName = getBusinessData(businessId).name;
|
||||
getBusinessData(businessId).name = newBusinessName;
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.name", getBusinessData(businessId).name, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.name", getBusinessData(businessId).name, true);
|
||||
getBusinessData(businessId).needsSaved = true;
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} renamed business {businessBlue}${oldBusinessName}{MAINCOLOUR} to {businessBlue}${newBusinessName}`);
|
||||
}
|
||||
@@ -1442,7 +1442,7 @@ function setBusinessBuyPriceCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getBusinessData(businessId).buyPrice = amount;
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.price", getBusinessData(businessId).buyPrice, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.price", getBusinessData(businessId).buyPrice, true);
|
||||
|
||||
getBusinessData(businessId).needsSaved = true;
|
||||
messagePlayerSuccess(client, `{MAINCOLOUR}You set business {businessBlue}${getBusinessData(businessId).name}'s {MAINCOLOUR}for-sale price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
@@ -2860,50 +2860,50 @@ function updateBusinessPickupLabelData(businessId) {
|
||||
}
|
||||
|
||||
if (getBusinessData(businessId).exitPickup != null) {
|
||||
setEntityData(getBusinessData(businessId).exitPickup, "vrr.owner.type", VRR_PICKUP_BUSINESS_EXIT, false);
|
||||
setEntityData(getBusinessData(businessId).exitPickup, "vrr.owner.id", businessId, false);
|
||||
setEntityData(getBusinessData(businessId).exitPickup, "vrr.label.type", VRR_LABEL_EXIT, true);
|
||||
setEntityData(getBusinessData(businessId).exitPickup, "agrp.owner.type", VRR_PICKUP_BUSINESS_EXIT, false);
|
||||
setEntityData(getBusinessData(businessId).exitPickup, "agrp.owner.id", businessId, false);
|
||||
setEntityData(getBusinessData(businessId).exitPickup, "agrp.label.type", VRR_LABEL_EXIT, true);
|
||||
}
|
||||
|
||||
if (getBusinessData(businessId).entrancePickup != null) {
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.owner.type", VRR_PICKUP_BUSINESS_ENTRANCE, false);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.owner.id", businessId, false);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.type", VRR_LABEL_BUSINESS, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.name", getBusinessData(businessId).name, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.locked", getBusinessData(businessId).locked, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_NONE, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.owner.type", VRR_PICKUP_BUSINESS_ENTRANCE, false);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.owner.id", businessId, false);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.type", VRR_LABEL_BUSINESS, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.name", getBusinessData(businessId).name, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.locked", getBusinessData(businessId).locked, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_NONE, true);
|
||||
|
||||
switch (getBusinessData(businessId).labelHelpType) {
|
||||
case VRR_PROPLABEL_INFO_ENTERVEHICLE: {
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_ENTERVEHICLE, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_ENTERVEHICLE, true);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROPLABEL_INFO_ENTER: {
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_ENTER, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_ENTER, true);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROPLABEL_INFO_REPAIR: {
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_REPAIR, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_REPAIR, true);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
if (getBusinessData(businessId).hasInterior) {
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_ENTER, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_ENTER, true);
|
||||
} else {
|
||||
if (doesBusinessHaveAnyItemsToBuy(businessId)) {
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_BUY, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_BUY, true);
|
||||
} else {
|
||||
removeEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help");
|
||||
removeEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.price", getBusinessData(businessId).buyPrice, true);
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.price", getBusinessData(businessId).buyPrice, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ function clanChat(client, messageText) {
|
||||
// ===========================================================================
|
||||
|
||||
function canPlayerUseMegaphone(client) {
|
||||
if (getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USE_TYPE_MEGAPHONE) != -1) {
|
||||
if (getPlayerFirstItemSlotByUseType(client, AGRP_ITEM_USE_TYPE_MEGAPHONE) != -1) {
|
||||
if (isPlayerActiveItemEnabled(client)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
// ===========================================================================
|
||||
|
||||
// Return-To types (for when a player is teleported)
|
||||
const VRR_RETURNTO_TYPE_NONE = 0; // "Return to" data is invalid
|
||||
const VRR_RETURNTO_TYPE_ADMINGET = 1; // "Return to" data is from admin teleporting
|
||||
const VRR_RETURNTO_TYPE_SKINSELECT = 2; // "Return to" data is from skin select
|
||||
const AGRP_RETURNTO_TYPE_NONE = 0; // "Return to" data is invalid
|
||||
const AGRP_RETURNTO_TYPE_ADMINGET = 1; // "Return to" data is from admin teleporting
|
||||
const AGRP_RETURNTO_TYPE_SKINSELECT = 2; // "Return to" data is from skin select
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -38,9 +38,9 @@ class ClientData {
|
||||
this.sessionId = 0;
|
||||
|
||||
// Security
|
||||
this.passwordResetState = VRR_RESETPASS_STATE_NONE;
|
||||
this.passwordResetState = AGRP_RESETPASS_STATE_NONE;
|
||||
this.passwordResetCode = "";
|
||||
this.twoFactorAuthenticationState = VRR_2FA_STATE_NONE;
|
||||
this.twoFactorAuthenticationState = AGRP_2FA_STATE_NONE;
|
||||
this.twoFactorAuthenticationCode = 0;
|
||||
|
||||
// Job Stuff
|
||||
@@ -64,11 +64,11 @@ class ClientData {
|
||||
|
||||
// Items
|
||||
this.tempLockerCache = new Array(9).fill(-1);
|
||||
this.tempLockerType = VRR_TEMP_LOCKER_TYPE_NONE;
|
||||
this.tempLockerType = AGRP_TEMP_LOCKER_TYPE_NONE;
|
||||
this.hotBarItems = new Array(9).fill(-1);
|
||||
this.activeHotBarSlot = -1;
|
||||
this.toggleUseItem = false;
|
||||
this.itemActionState = VRR_ITEM_ACTION_NONE;
|
||||
this.itemActionState = AGRP_ITEM_ACTION_NONE;
|
||||
this.itemActionItem = -1;
|
||||
this.paintBallItemCache = [];
|
||||
|
||||
@@ -103,7 +103,7 @@ class ClientData {
|
||||
this.returnToDimension = null;
|
||||
this.returnToHouse = null;
|
||||
this.returnToBusiness = null;
|
||||
this.returnToType = VRR_RETURNTO_TYPE_NONE;
|
||||
this.returnToType = AGRP_RETURNTO_TYPE_NONE;
|
||||
|
||||
// Animation
|
||||
this.currentAnimation = -1;
|
||||
@@ -118,7 +118,7 @@ class ClientData {
|
||||
this.usingSkinSelect = false;
|
||||
this.keyBinds = [];
|
||||
this.incomingDamageMultiplier = 1;
|
||||
this.weaponDamageEvent = VRR_WEAPON_DAMAGE_EVENT_NORMAL;
|
||||
this.weaponDamageEvent = AGRP_WEAPON_DAMAGE_EVENT_NORMAL;
|
||||
this.lastJobVehicle = null;
|
||||
this.health = 100;
|
||||
this.locale = 0;
|
||||
@@ -127,8 +127,8 @@ class ClientData {
|
||||
this.interiorCutscene = -1;
|
||||
this.playerBlip = null;
|
||||
this.alcoholLevel = 0;
|
||||
this.pedState = VRR_PEDSTATE_NONE;
|
||||
this.promptType = VRR_PROMPT_NONE;
|
||||
this.pedState = AGRP_PEDSTATE_NONE;
|
||||
this.promptType = AGRP_PROMPT_NONE;
|
||||
this.privateMessageReplyTo = null;
|
||||
|
||||
this.inPaintBall = false;
|
||||
|
||||
@@ -193,18 +193,18 @@ let globalConfig = {
|
||||
geoIPCityDatabaseFilePath: "geoip-city.mmdb",
|
||||
randomTipInterval: 600000,
|
||||
weaponEquippableTypes: [
|
||||
VRR_ITEM_USE_TYPE_WEAPON,
|
||||
VRR_ITEM_USE_TYPE_TAZER,
|
||||
VRR_ITEM_USE_TYPE_EXTINGUISHER,
|
||||
VRR_ITEM_USE_TYPE_SPRAYPAINT,
|
||||
VRR_ITEM_USE_TYPE_PEPPERSPRAY,
|
||||
AGRP_ITEM_USE_TYPE_WEAPON,
|
||||
AGRP_ITEM_USE_TYPE_TAZER,
|
||||
AGRP_ITEM_USE_TYPE_EXTINGUISHER,
|
||||
AGRP_ITEM_USE_TYPE_SPRAYPAINT,
|
||||
AGRP_ITEM_USE_TYPE_PEPPERSPRAY,
|
||||
],
|
||||
onFootOnlyItems: [
|
||||
VRR_ITEM_USE_TYPE_VEHREPAIR,
|
||||
VRR_ITEM_USE_TYPE_VEHCOLOUR,
|
||||
VRR_ITEM_USE_TYPE_VEHUPGRADE_PART,
|
||||
VRR_ITEM_USE_TYPE_VEHLIVERY,
|
||||
VRR_ITEM_USE_TYPE_VEHTIRE,
|
||||
AGRP_ITEM_USE_TYPE_VEHREPAIR,
|
||||
AGRP_ITEM_USE_TYPE_VEHCOLOUR,
|
||||
AGRP_ITEM_USE_TYPE_VEHUPGRADE_PART,
|
||||
AGRP_ITEM_USE_TYPE_VEHLIVERY,
|
||||
AGRP_ITEM_USE_TYPE_VEHTIRE,
|
||||
],
|
||||
vehicleInactiveRespawnDelay: 1800000, // 20 minutes
|
||||
chatSectionHeaderLength: 96,
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
// ===========================================================================
|
||||
|
||||
// Discord Webhook Types
|
||||
const VRR_DISCORD_WEBHOOK_NONE = 0;
|
||||
const VRR_DISCORD_WEBHOOK_LOG = 1;
|
||||
const VRR_DISCORD_WEBHOOK_ADMIN = 2;
|
||||
const AGRP_DISCORD_WEBHOOK_NONE = 0;
|
||||
const AGRP_DISCORD_WEBHOOK_LOG = 1;
|
||||
const AGRP_DISCORD_WEBHOOK_ADMIN = 2;
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -109,7 +109,7 @@ function messageDiscordChatChannel(messageString) {
|
||||
}
|
||||
|
||||
messageString = removeColoursInMessage(messageString);
|
||||
triggerDiscordWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_LOG);
|
||||
triggerDiscordWebHook(messageString, getServerId(), AGRP_DISCORD_WEBHOOK_LOG);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -128,7 +128,7 @@ function messageDiscordEventChannel(messageString) {
|
||||
}
|
||||
|
||||
messageString = removeColoursInMessage(messageString);
|
||||
triggerDiscordWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_LOG);
|
||||
triggerDiscordWebHook(messageString, getServerId(), AGRP_DISCORD_WEBHOOK_LOG);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -147,12 +147,12 @@ function messageDiscordAdminChannel(messageString) {
|
||||
}
|
||||
|
||||
messageString = removeColoursInMessage(messageString);
|
||||
triggerDiscordWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_ADMIN);
|
||||
triggerDiscordWebHook(messageString, getServerId(), AGRP_DISCORD_WEBHOOK_ADMIN);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function triggerDiscordWebHook(messageString, serverId = getServerId(), type = VRR_DISCORD_WEBHOOK_LOG) {
|
||||
function triggerDiscordWebHook(messageString, serverId = getServerId(), type = AGRP_DISCORD_WEBHOOK_LOG) {
|
||||
if (!getGlobalConfig().discord.webhook.enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -187,19 +187,19 @@ function repossessFirstAsset(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function getAllVehiclesOwnedByPlayer(client) {
|
||||
return getServerData().vehicles.filter((v) => v.ownerType == VRR_VEHOWNER_PLAYER && v.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
return getServerData().vehicles.filter((v) => v.ownerType == AGRP_VEHOWNER_PLAYER && v.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getAllBusinessesOwnedByPlayer(client) {
|
||||
return getServerData().businesses.filter((b) => b.ownerType == VRR_BIZ_OWNER_PLAYER && b.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
return getServerData().businesses.filter((b) => b.ownerType == AGRP_BIZ_OWNER_PLAYER && b.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getAllHousesOwnedByPlayer(client) {
|
||||
return getServerData().houses.filter((h) => h.ownerType == VRR_HOUSE_OWNER_PLAYER && h.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
return getServerData().houses.filter((h) => h.ownerType == AGRP_HOUSE_OWNER_PLAYER && h.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -8,37 +8,37 @@
|
||||
// ===========================================================================
|
||||
|
||||
// Fishing Catch Types (Probably not going to be used, in favor of items and their use type)
|
||||
const VRR_FISHING_CATCH_TYPE_NONE = 1;
|
||||
const VRR_FISHING_CATCH_TYPE_FISH = 1;
|
||||
const VRR_FISHING_CATCH_TYPE_JUNK = 2;
|
||||
const AGRP_FISHING_CATCH_TYPE_NONE = 1;
|
||||
const AGRP_FISHING_CATCH_TYPE_FISH = 1;
|
||||
const AGRP_FISHING_CATCH_TYPE_JUNK = 2;
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
let fishingCollectables = [
|
||||
// Fish
|
||||
["Salmon", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Tuna", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Crab", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Trout", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Sea Bass", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Shark", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Turtle", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Manta Ray", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Cat Fish", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Blue Marlin", VRR_FISHING_CATCH_TYPE_FISH],
|
||||
["Salmon", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Tuna", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Crab", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Trout", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Sea Bass", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Shark", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Turtle", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Manta Ray", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Cat Fish", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
["Blue Marlin", AGRP_FISHING_CATCH_TYPE_FISH],
|
||||
|
||||
// Junk
|
||||
["Rusty Can", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Pants", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Shoes", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Garbage", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Baby Diaper", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Tire", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Car Battery", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Horse Hoove", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Soggy Log", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Soggy Dildo", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Clump of Seaweed", VRR_FISHING_CATCH_TYPE_JUNK],
|
||||
["Rusty Can", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Pants", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Shoes", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Garbage", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Baby Diaper", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Tire", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Old Car Battery", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Horse Hoove", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Soggy Log", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Soggy Dildo", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
["Clump of Seaweed", AGRP_FISHING_CATCH_TYPE_JUNK],
|
||||
];
|
||||
|
||||
// ===========================================================================
|
||||
@@ -56,7 +56,7 @@ function castFishingLineCommand(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (doesPlayerHaveItemOfUseTypeEquipped(client, VRR_ITEM_USE_TYPE_FISHINGROD)) {
|
||||
if (doesPlayerHaveItemOfUseTypeEquipped(client, AGRP_ITEM_USE_TYPE_FISHINGROD)) {
|
||||
messagePlayerError(client, getLocaleString(client, "NeedFishingRod"));
|
||||
return false;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ function resetFishingLineCommand(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (doesPlayerHaveItemOfUseTypeEquipped(client, VRR_ITEM_USE_TYPE_FISHINGROD)) {
|
||||
if (doesPlayerHaveItemOfUseTypeEquipped(client, AGRP_ITEM_USE_TYPE_FISHINGROD)) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantFishHere"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
// ===========================================================================
|
||||
|
||||
// Forensic Types
|
||||
const VRR_FORENSICS_NONE = 0;
|
||||
const VRR_FORENSICS_BULLET = 1; // Bullet. The actual tip that hits a target. Has rifling and ballistics information of the weapon.
|
||||
const VRR_FORENSICS_BLOOD = 2; // Blood. Automatically applied to ground and bullets that hit and outfit worn when somebody is shot
|
||||
const VRR_FORENSICS_BODY = 3; // Body. A dead body lol
|
||||
const VRR_FORENSICS_HAIR = 4; // Hair.
|
||||
const VRR_FORENSICS_SWEAT = 5; // Sweat. Automatically applied to clothing when worn
|
||||
const VRR_FORENSICS_SALIVA = 6; // Saliva. Automatically applied to drinks when drank and unfinished food items when eaten
|
||||
const VRR_FORENSICS_BULLETCASINGS = 7; // Bullet casings. Automatically dropped when fired from a weapon except when used in a vehicle (driveby)
|
||||
const AGRP_FORENSICS_NONE = 0;
|
||||
const AGRP_FORENSICS_BULLET = 1; // Bullet. The actual tip that hits a target. Has rifling and ballistics information of the weapon.
|
||||
const AGRP_FORENSICS_BLOOD = 2; // Blood. Automatically applied to ground and bullets that hit and outfit worn when somebody is shot
|
||||
const AGRP_FORENSICS_BODY = 3; // Body. A dead body lol
|
||||
const AGRP_FORENSICS_HAIR = 4; // Hair.
|
||||
const AGRP_FORENSICS_SWEAT = 5; // Sweat. Automatically applied to clothing when worn
|
||||
const AGRP_FORENSICS_SALIVA = 6; // Saliva. Automatically applied to drinks when drank and unfinished food items when eaten
|
||||
const AGRP_FORENSICS_BULLETCASINGS = 7; // Bullet casings. Automatically dropped when fired from a weapon except when used in a vehicle (driveby)
|
||||
|
||||
// ===========================================================================
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -8,36 +8,36 @@
|
||||
// ===========================================================================
|
||||
|
||||
// GPS State Types
|
||||
const VRR_GPS_TYPE_NONE = 0; // None (invalid)
|
||||
const VRR_GPS_TYPE_BUSINESS = 1; // Business
|
||||
const VRR_GPS_TYPE_POLICE = 2; // Police Station
|
||||
const VRR_GPS_TYPE_HOSPITAL = 3; // Hospital
|
||||
const VRR_GPS_TYPE_JOB = 4; // Job
|
||||
const VRR_GPS_TYPE_GAMELOC = 5; // Game Location
|
||||
const AGRP_GPS_TYPE_NONE = 0; // None (invalid)
|
||||
const AGRP_GPS_TYPE_BUSINESS = 1; // Business
|
||||
const AGRP_GPS_TYPE_POLICE = 2; // Police Station
|
||||
const AGRP_GPS_TYPE_HOSPITAL = 3; // Hospital
|
||||
const AGRP_GPS_TYPE_JOB = 4; // Job
|
||||
const AGRP_GPS_TYPE_GAMELOC = 5; // Game Location
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function gpsCommand(command, params, client) {
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBusinessList")));
|
||||
|
||||
let locationType = VRR_GPS_TYPE_NONE;
|
||||
let useType = VRR_ITEM_USE_TYPE_NONE;
|
||||
let locationType = AGRP_GPS_TYPE_NONE;
|
||||
let useType = AGRP_ITEM_USE_TYPE_NONE;
|
||||
let blipColour = "white";
|
||||
|
||||
switch (toLowerCase(params)) {
|
||||
case "police":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_POLICE;
|
||||
locationType = AGRP_GPS_TYPE_POLICE;
|
||||
break;
|
||||
|
||||
case "hospital":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_HOSPITAL;
|
||||
locationType = AGRP_GPS_TYPE_HOSPITAL;
|
||||
break;
|
||||
|
||||
case "job":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_JOB;
|
||||
locationType = AGRP_GPS_TYPE_JOB;
|
||||
break;
|
||||
|
||||
case "skin":
|
||||
@@ -45,8 +45,8 @@ function gpsCommand(command, params, client) {
|
||||
case "clothes":
|
||||
case "player":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USE_TYPE_SKIN;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
useType = AGRP_ITEM_USE_TYPE_SKIN;
|
||||
break;
|
||||
|
||||
case "gun":
|
||||
@@ -56,29 +56,29 @@ function gpsCommand(command, params, client) {
|
||||
case "wep":
|
||||
case "weps":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USE_TYPE_WEAPON;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
useType = AGRP_ITEM_USE_TYPE_WEAPON;
|
||||
break;
|
||||
|
||||
case "food":
|
||||
case "eat":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USE_TYPE_FOOD;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
useType = AGRP_ITEM_USE_TYPE_FOOD;
|
||||
break;
|
||||
|
||||
case "drink":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USE_TYPE_DRINK;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
useType = AGRP_ITEM_USE_TYPE_DRINK;
|
||||
break;
|
||||
|
||||
case "alcohol":
|
||||
case "booze":
|
||||
case "bar":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USE_TYPE_ALCOHOL;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
useType = AGRP_ITEM_USE_TYPE_ALCOHOL;
|
||||
break;
|
||||
|
||||
case "repair":
|
||||
@@ -87,8 +87,8 @@ function gpsCommand(command, params, client) {
|
||||
case "spray":
|
||||
case "fix":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USE_TYPE_VEHREPAIR;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
useType = AGRP_ITEM_USE_TYPE_VEHREPAIR;
|
||||
break;
|
||||
|
||||
case "vehiclecolour":
|
||||
@@ -96,14 +96,14 @@ function gpsCommand(command, params, client) {
|
||||
case "carcolour":
|
||||
case "colour":
|
||||
blipColour = "businessBlue"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USE_TYPE_VEHCOLOUR;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
useType = AGRP_ITEM_USE_TYPE_VEHCOLOUR;
|
||||
break;
|
||||
|
||||
default: {
|
||||
let itemTypeId = getItemTypeFromParams(params);
|
||||
if (getItemTypeData(itemTypeId) != false) {
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
locationType = AGRP_GPS_TYPE_BUSINESS;
|
||||
blipColour = "businessBlue";
|
||||
useType = getItemTypeData(itemTypeId).useType;
|
||||
} else {
|
||||
@@ -115,12 +115,12 @@ function gpsCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
if (locationType == VRR_GPS_TYPE_NONE) {
|
||||
if (locationType == AGRP_GPS_TYPE_NONE) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidGPSLocation"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (locationType == VRR_GPS_TYPE_BUSINESS) {
|
||||
if (locationType == AGRP_GPS_TYPE_BUSINESS) {
|
||||
let businessId = getClosestBusinessWithBuyableItemOfUseType(useType);
|
||||
if (!businessId) {
|
||||
messagePlayerError(client, getLocaleString(client, "NoBusinessWithItemType"));
|
||||
@@ -137,7 +137,7 @@ function gpsCommand(command, params, client) {
|
||||
messagePlayerSuccess(client, "Look for the blinking icon on your mini map");
|
||||
}
|
||||
|
||||
if (locationType == VRR_GPS_TYPE_GAMELOC) {
|
||||
if (locationType == AGRP_GPS_TYPE_GAMELOC) {
|
||||
hideAllBlipsForPlayerGPS(client);
|
||||
blinkGenericGPSBlipForPlayer(client, position, 0, getColourByType(blipColour), 10);
|
||||
messagePlayerSuccess(client, "Look for the blinking icon on your mini map");
|
||||
|
||||
@@ -266,7 +266,7 @@ function playerToggledGUI(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function showPlayerTwoFactorAuthenticationGUI(client) {
|
||||
sendNetworkEventToPlayer("vrr.2fa", client);
|
||||
sendNetworkEventToPlayer("agrp.2fa", client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -264,7 +264,7 @@ function setHouseDescriptionCommand(command, params, client) {
|
||||
let oldDescription = getHouseData(houseId).description;
|
||||
getHouseData(houseId).description = newHouseDescription;
|
||||
|
||||
setEntityData(getHouseData(houseId).entrancePickup, "vrr.label.name", getHouseData(houseId).description, true);
|
||||
setEntityData(getHouseData(houseId).entrancePickup, "agrp.label.name", getHouseData(houseId).description, true);
|
||||
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
@@ -1100,8 +1100,8 @@ function createHouseEntranceBlip(houseId) {
|
||||
setElementStreamOutDistance(entranceBlip, getGlobalConfig().houseBlipStreamOutDistance);
|
||||
}
|
||||
|
||||
setEntityData(entranceBlip, "vrr.owner.type", VRR_BLIP_HOUSE_ENTRANCE, false);
|
||||
setEntityData(entranceBlip, "vrr.owner.id", houseId, false);
|
||||
setEntityData(entranceBlip, "agrp.owner.type", VRR_BLIP_HOUSE_ENTRANCE, false);
|
||||
setEntityData(entranceBlip, "agrp.owner.id", houseId, false);
|
||||
|
||||
houseData.entranceBlip = entranceBlip;
|
||||
}
|
||||
@@ -1206,8 +1206,8 @@ function createHouseExitBlip(houseId) {
|
||||
setElementStreamOutDistance(exitBlip, getGlobalConfig().houseBlipStreamOutDistance);
|
||||
}
|
||||
setElementTransient(exitBlip, false);
|
||||
setEntityData(exitBlip, "vrr.owner.type", VRR_BLIP_HOUSE_EXIT, false);
|
||||
setEntityData(exitBlip, "vrr.owner.id", houseId, false);
|
||||
setEntityData(exitBlip, "agrp.owner.type", VRR_BLIP_HOUSE_EXIT, false);
|
||||
setEntityData(exitBlip, "agrp.owner.id", houseId, false);
|
||||
getHouseData(houseId).exitBlip = exitBlip;
|
||||
}
|
||||
}
|
||||
@@ -1753,26 +1753,26 @@ function updateHousePickupLabelData(houseId) {
|
||||
let houseData = getHouseData(houseId);
|
||||
|
||||
if (houseData.entrancePickup != null) {
|
||||
setEntityData(houseData.entrancePickup, "vrr.owner.type", VRR_PICKUP_HOUSE_ENTRANCE, false);
|
||||
setEntityData(houseData.entrancePickup, "vrr.owner.id", houseId, false);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.type", VRR_LABEL_HOUSE, true);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.name", houseData.description, true);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.locked", houseData.locked, true);
|
||||
setEntityData(houseData.entrancePickup, "agrp.owner.type", VRR_PICKUP_HOUSE_ENTRANCE, false);
|
||||
setEntityData(houseData.entrancePickup, "agrp.owner.id", houseId, false);
|
||||
setEntityData(houseData.entrancePickup, "agrp.label.type", VRR_LABEL_HOUSE, true);
|
||||
setEntityData(houseData.entrancePickup, "agrp.label.name", houseData.description, true);
|
||||
setEntityData(houseData.entrancePickup, "agrp.label.locked", houseData.locked, true);
|
||||
if (houseData.buyPrice > 0) {
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.price", houseData.buyPrice, true);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_BUYHOUSE, true);
|
||||
setEntityData(houseData.entrancePickup, "agrp.label.price", houseData.buyPrice, true);
|
||||
setEntityData(houseData.entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_BUYHOUSE, true);
|
||||
} else {
|
||||
if (houseData.rentPrice > 0) {
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.rentprice", houseData.rentPrice, true);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_RENTHOUSE, true);
|
||||
setEntityData(houseData.entrancePickup, "agrp.label.rentprice", houseData.rentPrice, true);
|
||||
setEntityData(houseData.entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_RENTHOUSE, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (houseData.exitPickup != null) {
|
||||
setEntityData(houseData.exitPickup, "vrr.owner.type", VRR_PICKUP_HOUSE_EXIT, false);
|
||||
setEntityData(houseData.exitPickup, "vrr.owner.id", houseId, false);
|
||||
setEntityData(houseData.exitPickup, "vrr.label.type", VRR_LABEL_EXIT, true);
|
||||
setEntityData(houseData.exitPickup, "agrp.owner.type", VRR_PICKUP_HOUSE_EXIT, false);
|
||||
setEntityData(houseData.exitPickup, "agrp.owner.id", houseId, false);
|
||||
setEntityData(houseData.exitPickup, "agrp.label.type", VRR_LABEL_EXIT, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,33 +8,33 @@
|
||||
// ===========================================================================
|
||||
|
||||
// Insurance Account Owner Types
|
||||
const VRR_INS_ACCT_OWNER_NONE = 0; // None
|
||||
const VRR_INS_ACCT_OWNER_PLAYER = 1; // Player owns insurance company
|
||||
const VRR_INS_ACCT_OWNER_BIZ = 2; // Business owns insurance company
|
||||
const VRR_INS_ACCT_OWNER_CLAN = 3; // Clan owns insurance company
|
||||
const AGRP_INS_ACCT_OWNER_NONE = 0; // None
|
||||
const AGRP_INS_ACCT_OWNER_PLAYER = 1; // Player owns insurance company
|
||||
const AGRP_INS_ACCT_OWNER_BIZ = 2; // Business owns insurance company
|
||||
const AGRP_INS_ACCT_OWNER_CLAN = 3; // Clan owns insurance company
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
// Insurance Account Entity Types
|
||||
const VRR_INS_ACCT_ENTITY_NONE = 0; // None
|
||||
const VRR_INS_ACCT_ENTITY_PLAYER_HEALTH = 1; // Health Insurance
|
||||
const VRR_INS_ACCT_ENTITY_PLAYER_LIFE = 2; // Life Insurance
|
||||
const VRR_INS_ACCT_ENTITY_VEH = 3; // Vehicle Insurance
|
||||
const VRR_INS_ACCT_ENTITY_BIZ = 4; // Business Insurance
|
||||
const VRR_INS_ACCT_ENTITY_HOUSE = 5; // House Insurance
|
||||
const AGRP_INS_ACCT_ENTITY_NONE = 0; // None
|
||||
const AGRP_INS_ACCT_ENTITY_PLAYER_HEALTH = 1; // Health Insurance
|
||||
const AGRP_INS_ACCT_ENTITY_PLAYER_LIFE = 2; // Life Insurance
|
||||
const AGRP_INS_ACCT_ENTITY_VEH = 3; // Vehicle Insurance
|
||||
const AGRP_INS_ACCT_ENTITY_BIZ = 4; // Business Insurance
|
||||
const AGRP_INS_ACCT_ENTITY_HOUSE = 5; // House Insurance
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
// Insurance Account History Types
|
||||
const VRR_INS_ACCT_HISTORY_NONE = 0; // None
|
||||
const VRR_INS_ACCT_HISTORY_PLAYER_MEDICAL = 1; // Medical insurance was used (player disease/injury)
|
||||
const VRR_INS_ACCT_HISTORY_PLAYER_DEATH = 2; // Life insurance was used (player death)
|
||||
const VRR_INS_ACCT_HISTORY_VEH_DAMAGE = 3; // Vehicle was damaged, but not destroyed
|
||||
const VRR_INS_ACCT_HISTORY_VEH_WRECKED = 4; // Vehicle was completely destroyed
|
||||
const VRR_INS_ACCT_HISTORY_VEH_THEFT = 5; // Vehicle was stolen
|
||||
const VRR_INS_ACCT_HISTORY_BIZ_DAMAGE = 6; // Business was damaged (broken items/window/door)
|
||||
const VRR_INS_ACCT_HISTORY_BIZ_THEFT = 7; // Business was stolen from
|
||||
const VRR_INS_ACCT_HISTORY_HOUSE_DAMAGE = 8; // House was damaged
|
||||
const VRR_INS_ACCT_HISTORY_HOUSE_THEFT = 9; // House was stolen from
|
||||
const AGRP_INS_ACCT_HISTORY_NONE = 0; // None
|
||||
const AGRP_INS_ACCT_HISTORY_PLAYER_MEDICAL = 1; // Medical insurance was used (player disease/injury)
|
||||
const AGRP_INS_ACCT_HISTORY_PLAYER_DEATH = 2; // Life insurance was used (player death)
|
||||
const AGRP_INS_ACCT_HISTORY_VEH_DAMAGE = 3; // Vehicle was damaged, but not destroyed
|
||||
const AGRP_INS_ACCT_HISTORY_VEH_WRECKED = 4; // Vehicle was completely destroyed
|
||||
const AGRP_INS_ACCT_HISTORY_VEH_THEFT = 5; // Vehicle was stolen
|
||||
const AGRP_INS_ACCT_HISTORY_BIZ_DAMAGE = 6; // Business was damaged (broken items/window/door)
|
||||
const AGRP_INS_ACCT_HISTORY_BIZ_THEFT = 7; // Business was stolen from
|
||||
const AGRP_INS_ACCT_HISTORY_HOUSE_DAMAGE = 8; // House was damaged
|
||||
const AGRP_INS_ACCT_HISTORY_HOUSE_THEFT = 9; // House was stolen from
|
||||
|
||||
// ===========================================================================
|
||||
@@ -10,27 +10,27 @@
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerHandCuffed(client) {
|
||||
return (getPlayerData(client).pedState == VRR_PEDSTATE_BINDED);
|
||||
return (getPlayerData(client).pedState == AGRP_PEDSTATE_BINDED);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function handCuffPlayer(client) {
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_BINDED;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_BINDED;
|
||||
setPlayerControlState(client, false);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function unHandCuffPlayer(client) {
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_READY;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_READY;
|
||||
setPlayerControlState(client, true);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerSurrendered(client) {
|
||||
return true; //(getPlayerData(client).pedState == VRR_PEDSTATE_TAZED || getPlayerData(client).pedState == VRR_PEDSTATE_HANDSUP);
|
||||
return true; //(getPlayerData(client).pedState == AGRP_PEDSTATE_TAZED || getPlayerData(client).pedState == AGRP_PEDSTATE_HANDSUP);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
function getItemWithPhoneNumber(phoneNumber) {
|
||||
for (let i in getServerData().items) {
|
||||
if (getItemTypeData(getItemData(i).itemTypeIndex).useType == VRR_ITEM_USE_TYPE_PHONE) {
|
||||
if (getItemTypeData(getItemData(i).itemTypeIndex).useType == AGRP_ITEM_USE_TYPE_PHONE) {
|
||||
if (getItemData(i).value == phoneNumber) {
|
||||
return i;
|
||||
}
|
||||
@@ -30,15 +30,15 @@ function ringPhoneForNearbyPlayers(itemIndex) {
|
||||
/*
|
||||
if(isPhoneItemEnabled(itemIndex)) {
|
||||
switch(getItemData(itemIndex).ownerType) {
|
||||
case VRR_ITEM_OWNER_GROUND:
|
||||
case AGRP_ITEM_OWNER_GROUND:
|
||||
playRingtoneForPlayersInRange(getItemData(itemIndex).position, getItemData(i).extra);
|
||||
break;
|
||||
|
||||
case VRR_ITEM_OWNER_VEHTRUNK:
|
||||
case AGRP_ITEM_OWNER_VEHTRUNK:
|
||||
playRingtoneForPlayersInRange(getVehiclePosition(getItemData(itemIndex).ownerId), getItemData(i).extra);
|
||||
break;
|
||||
|
||||
case VRR_ITEM_OWNER_VEHDASH:
|
||||
case AGRP_ITEM_OWNER_VEHDASH:
|
||||
playRingtoneForPlayersInRange(getVehiclePosition(getItemData(itemIndex).ownerId), getItemData(i).extra);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerTied(client) {
|
||||
return (getPlayerData(client).pedState == VRR_PEDSTATE_BINDED);
|
||||
return (getPlayerData(client).pedState == AGRP_PEDSTATE_BINDED);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function ropeTiePlayer(client) {
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_BINDED;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_BINDED;
|
||||
setPlayerControlState(client, false);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function ropeUnTiePlayer(client) {
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_READY;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_READY;
|
||||
setPlayerControlState(client, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerTazed(client) {
|
||||
return (getPlayerData(client).pedState == VRR_PEDSTATE_TAZED);
|
||||
return (getPlayerData(client).pedState == AGRP_PEDSTATE_TAZED);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function tazePlayer(client) {
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_TAZED;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_TAZED;
|
||||
setPlayerControlState(client, false);
|
||||
|
||||
let animationId = getAnimationFromParams("tazed");
|
||||
if(animationId != false) {
|
||||
if (animationId != false) {
|
||||
forcePlayerPlayAnimation(client, animationId);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
unTazePlayer(client);
|
||||
doActionToNearbyPlayers(client, `The tazer effect wears off`);
|
||||
}, getGlobalConfig().tazerEffectDuration);
|
||||
@@ -33,7 +33,7 @@ function tazePlayer(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function unTazePlayer(client) {
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_READY;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_READY;
|
||||
|
||||
setPlayerControlState(client, true);
|
||||
setPlayerPosition(client, getPlayerData(client).currentAnimationPositionReturnTo);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerActiveWalkieTalkieFrequency(client) {
|
||||
let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USE_TYPE_WALKIETALKIE);
|
||||
let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, AGRP_ITEM_USE_TYPE_WALKIETALKIE);
|
||||
|
||||
if (walkieTalkieSlot != -1) {
|
||||
if (getItemData(getPlayerData(client).hotBarItems[walkieTalkieSlot])) {
|
||||
@@ -31,7 +31,7 @@ function walkieTalkieTransmit(radioFrequency, messageText, transmittingPlayer) {
|
||||
// if(isPlayerSpawned(clients[i])) {
|
||||
// if(!isSamePlayer(transmittingPlayer, clients[i])) {
|
||||
// if(getPlayerActiveWalkieTalkieFrequency(clients[i]) == radioFrequency) {
|
||||
// if(getItemData(getPlayerData(clients[i]).hotBarItems[getPlayerFirstItemSlotByUseType(clients[i], VRR_ITEM_USE_TYPE_WALKIETALKIE)]).enabled) {
|
||||
// if(getItemData(getPlayerData(clients[i]).hotBarItems[getPlayerFirstItemSlotByUseType(clients[i], AGRP_ITEM_USE_TYPE_WALKIETALKIE)]).enabled) {
|
||||
// walkieTalkieIncomingToNearbyPlayers(clients[i], messageText);
|
||||
// }
|
||||
// }
|
||||
@@ -42,7 +42,7 @@ function walkieTalkieTransmit(radioFrequency, messageText, transmittingPlayer) {
|
||||
let items = getServerData().items;
|
||||
for (let i in items) {
|
||||
if (items[i].enabled) {
|
||||
if (getItemTypeData(items[i].itemTypeIndex).useType == VRR_ITEM_USE_TYPE_WALKIETALKIE) {
|
||||
if (getItemTypeData(items[i].itemTypeIndex).useType == AGRP_ITEM_USE_TYPE_WALKIETALKIE) {
|
||||
if (items[i].value == radioFrequency) {
|
||||
walkieTalkieIncomingToNearbyPlayers(null, messageText, getItemPosition(i));
|
||||
}
|
||||
@@ -125,7 +125,7 @@ function walkieTalkieChatCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USE_TYPE_WALKIETALKIE);
|
||||
let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, AGRP_ITEM_USE_TYPE_WALKIETALKIE);
|
||||
if (!getItemData(getPlayerData(client).hotBarItems[walkieTalkieSlot]).enabled) {
|
||||
messagePlayerError(client, "Please turn on a walkie talkie first!");
|
||||
return false;
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
// ===========================================================================
|
||||
|
||||
function policeTazerCommand(command, params, client) {
|
||||
if(!canPlayerUseJobs(client)) {
|
||||
if (!canPlayerUseJobs(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use jobs.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!canPlayerUsePoliceJob(client)) {
|
||||
if (!canPlayerUsePoliceJob(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use the police job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerWorking(client)) {
|
||||
if (!isPlayerWorking(client)) {
|
||||
messagePlayerError(client, "You are not working! Use /startwork first.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
|
||||
if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) {
|
||||
messagePlayerError(client, "You don't have a police job.");
|
||||
return false;
|
||||
}
|
||||
@@ -34,22 +34,22 @@ function policeTazerCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function policeCuffCommand(command, params, client) {
|
||||
if(!canPlayerUseJobs(client)) {
|
||||
if (!canPlayerUseJobs(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use jobs.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!canPlayerUsePoliceJob(client)) {
|
||||
if (!canPlayerUsePoliceJob(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use the police job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerWorking(client)) {
|
||||
if (!isPlayerWorking(client)) {
|
||||
messagePlayerError(client, "You are not working! Use /startwork first.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
|
||||
if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) {
|
||||
messagePlayerError(client, "You don't have a police job.");
|
||||
return false;
|
||||
}
|
||||
@@ -60,22 +60,22 @@ function policeCuffCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function policeArrestCommand(command, params, client) {
|
||||
if(!canPlayerUseJobs(client)) {
|
||||
if (!canPlayerUseJobs(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use jobs.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!canPlayerUsePoliceJob(client)) {
|
||||
if (!canPlayerUsePoliceJob(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use the police job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerWorking(client)) {
|
||||
if (!isPlayerWorking(client)) {
|
||||
messagePlayerError(client, "You are not working! Use /startwork first.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
|
||||
if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) {
|
||||
messagePlayerError(client, "You don't have a police job.");
|
||||
return false;
|
||||
}
|
||||
@@ -86,22 +86,22 @@ function policeArrestCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function policeSearchCommand(command, params, client) {
|
||||
if(!canPlayerUseJobs(client)) {
|
||||
if (!canPlayerUseJobs(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use jobs.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!canPlayerUsePoliceJob(client)) {
|
||||
if (!canPlayerUsePoliceJob(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use the police job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerWorking(client)) {
|
||||
if (!isPlayerWorking(client)) {
|
||||
messagePlayerError(client, "You are not working! Use /startwork first.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
|
||||
if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) {
|
||||
messagePlayerError(client, "You don't have a police job.");
|
||||
return false;
|
||||
}
|
||||
@@ -112,22 +112,22 @@ function policeSearchCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function policeDragCommand(command, params, client) {
|
||||
if(!canPlayerUseJobs(client)) {
|
||||
if (!canPlayerUseJobs(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use jobs.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!canPlayerUsePoliceJob(client)) {
|
||||
if (!canPlayerUsePoliceJob(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use the police job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerWorking(client)) {
|
||||
if (!isPlayerWorking(client)) {
|
||||
messagePlayerError(client, "You are not working! Use /startwork first.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
|
||||
if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) {
|
||||
messagePlayerError(client, "You don't have a police job.");
|
||||
return false;
|
||||
}
|
||||
@@ -138,22 +138,22 @@ function policeDragCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function policeDetainCommand(command, params, client) {
|
||||
if(!canPlayerUseJobs(client)) {
|
||||
if (!canPlayerUseJobs(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use jobs.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!canPlayerUsePoliceJob(client)) {
|
||||
if (!canPlayerUsePoliceJob(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use the police job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerWorking(client)) {
|
||||
if (!isPlayerWorking(client)) {
|
||||
messagePlayerError(client, "You are not working! Use /startwork first.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
|
||||
if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) {
|
||||
messagePlayerError(client, "You don't have a police job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
// ===========================================================================
|
||||
|
||||
function taxiSetFareCommand(command, params, client) {
|
||||
if(!canPlayerUseJobs(client)) {
|
||||
if (!canPlayerUseJobs(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use jobs.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!canPlayerUseTaxiJob(client)) {
|
||||
if (!canPlayerUseTaxiJob(client)) {
|
||||
messagePlayerError(client, "You are not allowed to use the taxi job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerWorking(client)) {
|
||||
if (!isPlayerWorking(client)) {
|
||||
messagePlayerError(client, "You are not working! Use /startwork first.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveJobType(client, VRR_JOB_TAXI)) {
|
||||
if (!doesPlayerHaveJobType(client, AGRP_JOB_TAXI)) {
|
||||
messagePlayerError(client, "You don't have a taxi job.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// ===========================================================================
|
||||
|
||||
class KeyBindData {
|
||||
constructor(dbAssoc = false, key = 0, commandString = "", keyState = VRR_KEYSTATE_UP) {
|
||||
constructor(dbAssoc = false, key = 0, commandString = "", keyState = AGRP_KEYSTATE_UP) {
|
||||
this.databaseId = 0;
|
||||
this.key = key;
|
||||
this.account = 0;
|
||||
@@ -20,7 +20,7 @@ class KeyBindData {
|
||||
this.index = -1;
|
||||
this.needsSaved = false;
|
||||
|
||||
if(dbAssoc) {
|
||||
if (dbAssoc) {
|
||||
this.databaseId = dbAssoc["acct_hotkey_id"];
|
||||
this.key = toInteger(dbAssoc["acct_hotkey_key"]);
|
||||
this.account = toInteger(dbAssoc["acct_hotkey_acct"]);
|
||||
@@ -48,19 +48,19 @@ function addKeyBindCommand(command, params, client) {
|
||||
let tempCommand = getParam(params, " ", 2);
|
||||
let tempParams = (splitParams.length > 2) ? splitParams.slice(2).join(" ") : "";
|
||||
|
||||
if(!keyId) {
|
||||
if (!keyId) {
|
||||
messagePlayerError(client, "The key ID or name you input is invalid!");
|
||||
messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces.");
|
||||
messagePlayerInfo(client, `Examples: {ALTCOLOUR}1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!keyId) {
|
||||
if (!keyId) {
|
||||
messagePlayerError(client, "That key name/id is invalid!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(areParamsEmpty(tempCommand)) {
|
||||
if (areParamsEmpty(tempCommand)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
@@ -74,14 +74,14 @@ function addKeyBindCommand(command, params, client) {
|
||||
function removeKeyBindCommand(command, params, client) {
|
||||
let keyId = getKeyIdFromParams(getParam(params, " ", 1));
|
||||
|
||||
if(!keyId) {
|
||||
if (!keyId) {
|
||||
messagePlayerError(client, "The key ID or name you input is invalid!");
|
||||
messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces.");
|
||||
messagePlayerInfo(client, `Examples: {ALTCOLOUR}1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!keyId) {
|
||||
if (!keyId) {
|
||||
messagePlayerError(client, "That key name/id is invalid!");
|
||||
return false;
|
||||
}
|
||||
@@ -94,14 +94,14 @@ function removeKeyBindCommand(command, params, client) {
|
||||
|
||||
function addPlayerKeyBind(client, keys, command, params, tempKey = false) {
|
||||
let keyBindData = new KeyBindData(false, keys, `${command} ${params}`);
|
||||
if(tempKey == true) {
|
||||
if (tempKey == true) {
|
||||
keyBindData.databaseId = -1;
|
||||
}
|
||||
|
||||
getPlayerData(client).keyBinds.push(keyBindData);
|
||||
sendAddAccountKeyBindToClient(client, keys, (keys.length > 1) ? VRR_KEYSTATE_COMBO : VRR_KEYSTATE_UP);
|
||||
sendAddAccountKeyBindToClient(client, keys, (keys.length > 1) ? AGRP_KEYSTATE_COMBO : AGRP_KEYSTATE_UP);
|
||||
|
||||
if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) {
|
||||
if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) {
|
||||
let keyId = getPlayerKeyBindForCommand(client, "enter");
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`);
|
||||
sendPlayerEnterPropertyKey(client, keyId.key);
|
||||
@@ -125,7 +125,7 @@ function removePlayerKeyBind(client, keyId) {
|
||||
getPlayerData(client).keyBinds = getPlayerData(client).keyBinds.filter(keyBind => keyBind.key != keyId);
|
||||
sendRemoveAccountKeyBindToClient(client, keyId);
|
||||
|
||||
if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) {
|
||||
if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) {
|
||||
let keyId = getPlayerKeyBindForCommand(client, "enter");
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`);
|
||||
sendPlayerEnterPropertyKey(client, keyId.key);
|
||||
@@ -137,8 +137,8 @@ function removePlayerKeyBind(client, keyId) {
|
||||
// ===========================================================================
|
||||
|
||||
function doesPlayerHaveKeyBindForCommand(client, command) {
|
||||
for(let i in getPlayerData(client).keyBinds) {
|
||||
if(toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) {
|
||||
for (let i in getPlayerData(client).keyBinds) {
|
||||
if (toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -148,8 +148,8 @@ function doesPlayerHaveKeyBindForCommand(client, command) {
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerKeyBindForCommand(client, command) {
|
||||
for(let i in getPlayerData(client).keyBinds) {
|
||||
if(toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) {
|
||||
for (let i in getPlayerData(client).keyBinds) {
|
||||
if (toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) {
|
||||
return getPlayerData(client).keyBinds[i];
|
||||
}
|
||||
}
|
||||
@@ -159,8 +159,8 @@ function getPlayerKeyBindForCommand(client, command) {
|
||||
// ===========================================================================
|
||||
|
||||
function doesPlayerHaveKeyBindForKey(client, key) {
|
||||
for(let i in getPlayerData(client).keyBinds) {
|
||||
if(getPlayerData(client).keyBinds[i].key == key) {
|
||||
for (let i in getPlayerData(client).keyBinds) {
|
||||
if (getPlayerData(client).keyBinds[i].key == key) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -176,8 +176,8 @@ function doesPlayerHaveKeyBindsDisabled(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerKeyBindForKey(client, key) {
|
||||
for(let i in getPlayerData(client).keyBinds) {
|
||||
if(getPlayerData(client).keyBinds[i].key == key) {
|
||||
for (let i in getPlayerData(client).keyBinds) {
|
||||
if (getPlayerData(client).keyBinds[i].key == key) {
|
||||
return getPlayerData(client).keyBinds[i];
|
||||
}
|
||||
}
|
||||
@@ -187,22 +187,22 @@ function getPlayerKeyBindForKey(client, key) {
|
||||
// ===========================================================================
|
||||
|
||||
function playerUsedKeyBind(client, key) {
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
if (!isPlayerLoggedIn(client)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerSpawned(client)) {
|
||||
if (!isPlayerSpawned(client)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.KeyBind] ${getPlayerDisplayForConsole(client)} used keybind ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForKey(client, key)) {
|
||||
if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForKey(client, key)) {
|
||||
let keyBindData = getPlayerKeyBindForKey(client, key);
|
||||
if(keyBindData.enabled) {
|
||||
if (keyBindData.enabled) {
|
||||
let splitCommandString = keyBindData.commandString.split(" ");
|
||||
let tempCommand = splitCommandString[0];
|
||||
let tempParams = "";
|
||||
if(splitCommandString.length > 1) {
|
||||
if (splitCommandString.length > 1) {
|
||||
tempParams = splitCommandString.slice(1).join(" ");
|
||||
}
|
||||
getCommand(toLowerCase(tempCommand)).handlerFunction(tempCommand, tempParams, client);
|
||||
@@ -215,7 +215,7 @@ function playerUsedKeyBind(client, key) {
|
||||
|
||||
function sendAccountKeyBindsToClient(client) {
|
||||
sendClearKeyBindsToClient(client);
|
||||
for(let i in getPlayerData(client).keyBinds) {
|
||||
for (let i in getPlayerData(client).keyBinds) {
|
||||
sendAddAccountKeyBindToClient(client, getPlayerData(client).keyBinds[i].key, getPlayerData(client).keyBinds[i].keyState);
|
||||
}
|
||||
}
|
||||
@@ -223,13 +223,13 @@ function sendAccountKeyBindsToClient(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function showKeyBindListCommand(command, params, client) {
|
||||
let keybindList = getPlayerData(client).keyBinds.map(function(x) { return `{ALTCOLOUR}${toUpperCase(getKeyNameFromId(x.key))}: {MAINCOLOUR}${x.commandString}`; });
|
||||
let keybindList = getPlayerData(client).keyBinds.map(function (x) { return `{ALTCOLOUR}${toUpperCase(getKeyNameFromId(x.key))}: {MAINCOLOUR}${x.commandString}`; });
|
||||
|
||||
let chunkedList = splitArrayIntoChunks(keybindList, 6);
|
||||
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderKeyBindsList")));
|
||||
|
||||
for(let i in chunkedList) {
|
||||
for (let i in chunkedList) {
|
||||
messagePlayerInfo(client, chunkedList[i].join(", "));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,8 +168,8 @@ function enterExitPropertyCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let ownerType = getEntityData(getPlayerData(client).currentPickup, "vrr.owner.type");
|
||||
let ownerId = getEntityData(getPlayerData(client).currentPickup, "vrr.owner.id");
|
||||
let ownerType = getEntityData(getPlayerData(client).currentPickup, "agrp.owner.type");
|
||||
let ownerId = getEntityData(getPlayerData(client).currentPickup, "agrp.owner.id");
|
||||
|
||||
switch (ownerType) {
|
||||
case VRR_PICKUP_BUSINESS_ENTRANCE:
|
||||
|
||||
@@ -181,7 +181,7 @@ function getVehicleHeading(vehicle) {
|
||||
|
||||
function setVehicleHeading(vehicle, heading) {
|
||||
if (getGame() == VRR_GAME_GTA_IV) {
|
||||
return sendNetworkEventToPlayer("vrr.vehPosition", null, getVehicleForNetworkEvent(vehicle), heading);
|
||||
return sendNetworkEventToPlayer("agrp.vehPosition", null, getVehicleForNetworkEvent(vehicle), heading);
|
||||
}
|
||||
return vehicle.heading = heading;
|
||||
}
|
||||
@@ -255,7 +255,7 @@ function removePlayerFromVehicle(client) {
|
||||
function setPlayerSkin(client, skinIndex) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s skin to ${getGameConfig().skins[getGame()][skinIndex][0]} (Index: ${skinIndex}, Name: ${getGameConfig().skins[getGame()][skinIndex][1]})`);
|
||||
if (getGame() == VRR_GAME_GTA_IV) {
|
||||
triggerNetworkEvent("vrr.localPlayerSkin", client, getGameConfig().skins[getGame()][skinIndex][0]);
|
||||
triggerNetworkEvent("agrp.localPlayerSkin", client, getGameConfig().skins[getGame()][skinIndex][0]);
|
||||
} else {
|
||||
getPlayerPed(client).modelIndex = getGameConfig().skins[getGame()][skinIndex][0];
|
||||
}
|
||||
@@ -547,15 +547,15 @@ function repairVehicle(vehicle) {
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleLights(vehicle, lights) {
|
||||
setEntityData(vehicle, "vrr.lights", lights, true);
|
||||
sendNetworkEventToPlayer("vrr.veh.lights", null, vehicle.id, lights);
|
||||
setEntityData(vehicle, "agrp.lights", lights, true);
|
||||
sendNetworkEventToPlayer("agrp.veh.lights", null, vehicle.id, lights);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleEngine(vehicle, engine) {
|
||||
vehicle.engine = engine;
|
||||
setEntityData(vehicle, "vrr.engine", engine, true);
|
||||
setEntityData(vehicle, "agrp.engine", engine, true);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -688,7 +688,7 @@ function setPlayerFightStyle(client, fightStyleId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setEntityData(getPlayerElement(client), "vrr.fightStyle", [getGameConfig().fightStyles[getGame()][fightStyleId][1][0], getGameConfig().fightStyles[getGame()][fightStyleId][1][1]]);
|
||||
setEntityData(getPlayerElement(client), "agrp.fightStyle", [getGameConfig().fightStyles[getGame()][fightStyleId][1][0], getGameConfig().fightStyles[getGame()][fightStyleId][1][1]]);
|
||||
forcePlayerToSyncElementProperties(null, getPlayerElement(client));
|
||||
}
|
||||
|
||||
@@ -707,7 +707,7 @@ function getPlayerElement(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function setElementPosition(element, position) {
|
||||
sendNetworkEventToPlayer("vrr.elementPosition", null, element.id, position);
|
||||
sendNetworkEventToPlayer("agrp.elementPosition", null, element.id, position);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -725,14 +725,14 @@ function getElementHeading(element) {
|
||||
// ===========================================================================
|
||||
|
||||
function setElementInterior(element, interior) {
|
||||
setEntityData(element, "vrr.interior", interior, true);
|
||||
setEntityData(element, "agrp.interior", interior, true);
|
||||
forcePlayerToSyncElementProperties(null, element);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setElementCollisionsEnabled(element, state) {
|
||||
sendNetworkEventToPlayer("vrr.elementCollisions", null, element.id, state);
|
||||
sendNetworkEventToPlayer("agrp.elementCollisions", null, element.id, state);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1142,13 +1142,13 @@ function setVehicleHealth(vehicle, health) {
|
||||
|
||||
function givePlayerWeapon(client, weaponId, ammo, active = true) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`);
|
||||
sendNetworkEventToPlayer("vrr.giveWeapon", client, weaponId, ammo, active);
|
||||
sendNetworkEventToPlayer("agrp.giveWeapon", client, weaponId, ammo, active);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerWantedLevel(client, wantedLevel) {
|
||||
sendNetworkEventToPlayer("vrr.wantedLevel", client, wantedLevel);
|
||||
sendNetworkEventToPlayer("agrp.wantedLevel", client, wantedLevel);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1287,7 +1287,7 @@ function serverBanIP(ip) {
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleTrunkState(vehicle, trunkState) {
|
||||
sendNetworkEventToPlayer("vrr.veh.trunk", null, getVehicleForNetworkEvent(vehicle), trunkState);
|
||||
sendNetworkEventToPlayer("agrp.veh.trunk", null, getVehicleForNetworkEvent(vehicle), trunkState);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1388,7 +1388,7 @@ function deletePlayerPed(client) {
|
||||
if (areServerElementsSupported()) {
|
||||
destroyElement(client.player);
|
||||
} else {
|
||||
sendNetworkEventToPlayer("vrr.deleteLocalPlayerPed", client);
|
||||
sendNetworkEventToPlayer("agrp.deleteLocalPlayerPed", client);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ let paintBallItems = [];
|
||||
// ===========================================================================
|
||||
|
||||
let paintBallItemNames = {
|
||||
[VRR_GAME_GTA_III]: [
|
||||
[AGRP_GAME_GTA_III]: [
|
||||
"Colt 45",
|
||||
"Uzi",
|
||||
"Shotgun",
|
||||
@@ -20,7 +20,7 @@ let paintBallItemNames = {
|
||||
"Sniper Rifle",
|
||||
],
|
||||
|
||||
[VRR_GAME_GTA_VC]: [
|
||||
[AGRP_GAME_GTA_VC]: [
|
||||
"Colt 45",
|
||||
"Pump Shotgun",
|
||||
"Ingram",
|
||||
@@ -29,7 +29,7 @@ let paintBallItemNames = {
|
||||
"Sniper Rifle",
|
||||
],
|
||||
|
||||
[VRR_GAME_GTA_SA]: [
|
||||
[AGRP_GAME_GTA_SA]: [
|
||||
"Desert Eagle",
|
||||
"Shotgun",
|
||||
"MP5",
|
||||
@@ -37,7 +37,7 @@ let paintBallItemNames = {
|
||||
"Sniper Rifle",
|
||||
],
|
||||
|
||||
[VRR_GAME_GTA_IV]: [
|
||||
[AGRP_GAME_GTA_IV]: [
|
||||
"Glock 9mm",
|
||||
"Micro Uzi",
|
||||
"Stubby Shotgun",
|
||||
@@ -62,7 +62,7 @@ function startPaintBall(client) {
|
||||
}
|
||||
|
||||
storePlayerItemsInTempLocker(client);
|
||||
getPlayerData(client).tempLockerType = VRR_TEMP_LOCKER_TYPE_PAINTBALL;
|
||||
getPlayerData(client).tempLockerType = AGRP_TEMP_LOCKER_TYPE_PAINTBALL;
|
||||
|
||||
getPlayerData(client).inPaintBall = true;
|
||||
getPlayerData(client).paintBallBusiness = getPlayerBusiness(client);
|
||||
@@ -85,7 +85,7 @@ function stopPaintBall(client) {
|
||||
function givePlayerPaintBallItems(client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.PaintBall]: Giving ${getPlayerDisplayForConsole(client)} paintball items ...`);
|
||||
for (let i in paintBallItems) {
|
||||
let itemId = createItem(paintBallItems[i], value, VRR_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId);
|
||||
let itemId = createItem(paintBallItems[i], value, AGRP_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId);
|
||||
getItemData(itemId).needsSaved = false;
|
||||
getItemData(itemId).databaseId = -1; // Make sure it doesnt save
|
||||
let freeSlot = getPlayerFirstEmptyHotBarSlot(client);
|
||||
|
||||
@@ -117,8 +117,8 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (doesEntityDataExist(client, "vrr.inHouse")) {
|
||||
let houseId = getEntityData(client, "vrr.inHouse");
|
||||
if (doesEntityDataExist(client, "agrp.inHouse")) {
|
||||
let houseId = getEntityData(client, "agrp.inHouse");
|
||||
if (radioStationId == 0) {
|
||||
getHouseData(houseId).streamingRadioStation = -1;
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
@@ -127,7 +127,7 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
|
||||
let clients = getClients();
|
||||
for (let i in clients) {
|
||||
if (getEntityData(clients[i], "vrr.inHouse") == houseId) {
|
||||
if (getEntityData(clients[i], "agrp.inHouse") == houseId) {
|
||||
playRadioStreamForPlayer(clients[i], "");
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
|
||||
let clients = getClients();
|
||||
for (let i in clients) {
|
||||
if (getEntityData(clients[i], "vrr.inHouse") == houseId) {
|
||||
if (getEntityData(clients[i], "agrp.inHouse") == houseId) {
|
||||
playRadioStreamForPlayer(clients[i], getRadioStationData(radioStationId - 1).url, true, getPlayerStreamingRadioVolume(clients[i]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -880,7 +880,7 @@ function getPlayerCommand(command, params, client) {
|
||||
getPlayerData(targetClient).returnToHeading = getPlayerPosition(targetClient);
|
||||
getPlayerData(targetClient).returnToDimension = getPlayerDimension(targetClient);
|
||||
getPlayerData(targetClient).returnToInterior = getPlayerInterior(targetClient);
|
||||
getPlayerData(targetClient).returnToType = VRR_RETURNTO_TYPE_ADMINGET;
|
||||
getPlayerData(targetClient).returnToType = AGRP_RETURNTO_TYPE_ADMINGET;
|
||||
|
||||
setPlayerPosition(targetClient, getPosBehindPos(getPlayerPosition(client), getPlayerHeading(client), 2));
|
||||
setPlayerHeading(targetClient, getPlayerHeading(client));
|
||||
@@ -932,7 +932,7 @@ function returnPlayerCommand(command, params, client) {
|
||||
getPlayerData(targetClient).returnToInterior = null;
|
||||
getPlayerData(targetClient).returnToHouse = null;
|
||||
getPlayerData(targetClient).returnToBusiness = null;
|
||||
getPlayerData(targetClient).returnToType = VRR_RETURNTO_TYPE_NONE;
|
||||
getPlayerData(targetClient).returnToType = AGRP_RETURNTO_TYPE_NONE;
|
||||
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} returned {ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR} to their previous position.`);
|
||||
messagePlayerAlert(targetClient, `An admin has returned you to your previous location`);
|
||||
|
||||
@@ -474,11 +474,11 @@ function selectCharacter(client, characterId = -1) {
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`);
|
||||
//setPlayerCameraLookAt(client, getPosBehindPos(spawnPosition, spawnHeading, 5), spawnPosition);
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_SPAWNING;
|
||||
getPlayerData(client).pedState = AGRP_PEDSTATE_SPAWNING;
|
||||
|
||||
if (getGame() <= VRR_GAME_GTA_SA) {
|
||||
if (getGame() <= AGRP_GAME_GTA_SA) {
|
||||
spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension);
|
||||
} else if (getGame() == VRR_GAME_GTA_IV) {
|
||||
} else if (getGame() == AGRP_GAME_GTA_IV) {
|
||||
spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension);
|
||||
//clearPlayerWeapons(client);
|
||||
//setPlayerSkin(client, skin);
|
||||
@@ -487,7 +487,7 @@ function selectCharacter(client, characterId = -1) {
|
||||
//setPlayerInterior(client, spawnInterior);
|
||||
//setPlayerDimension(client, spawnDimension);
|
||||
//restorePlayerCamera(client);
|
||||
} else if (getGame() == VRR_GAME_MAFIA_ONE) {
|
||||
} else if (getGame() == AGRP_GAME_MAFIA_ONE) {
|
||||
//spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]);
|
||||
logToConsole(LOG_DEBUG, `[VRR.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as ${getGameConfig().skins[getGame()][skin][1]} (${getGameConfig().skins[getGame()][skin][0]})`);
|
||||
spawnPlayer(client, getGameConfig().skins[getGame()][skin][0], spawnPosition, spawnHeading);
|
||||
|
||||
@@ -244,7 +244,7 @@ function checkPayDays() {
|
||||
}
|
||||
|
||||
for (let i in getServerData().businesses) {
|
||||
if (getBusinessData(i).ownerType != VRR_BIZ_OWNER_NONE && getBusinessData(i).ownerType != VRR_BIZ_OWNER_PUBLIC && getBusinessData(i).ownerType != VRR_BIZ_OWNER_FACTION) {
|
||||
if (getBusinessData(i).ownerType != AGRP_BIZ_OWNER_NONE && getBusinessData(i).ownerType != AGRP_BIZ_OWNER_PUBLIC && getBusinessData(i).ownerType != AGRP_BIZ_OWNER_FACTION) {
|
||||
getBusinessData(i).till += 1000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,8 +260,8 @@ function checkPlayerPedStates() {
|
||||
if (getPlayerData(clients[i])) {
|
||||
if (getPlayerData(clients[i]).pedState) {
|
||||
if (isPlayerInAnyVehicle(clients[i])) {
|
||||
if (getPlayerData(clients[i]).pedState == VRR_PEDSTATE_EXITINGVEHICLE) {
|
||||
getPlayerData(clients[i]).pedState == VRR_PEDSTATE_READY;
|
||||
if (getPlayerData(clients[i]).pedState == AGRP_PEDSTATE_EXITINGVEHICLE) {
|
||||
getPlayerData(clients[i]).pedState == AGRP_PEDSTATE_READY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,7 +458,7 @@ function isClientInitialized(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function getPedForNetworkEvent(ped) {
|
||||
if (getGame() == VRR_GAME_GTA_IV) {
|
||||
if (getGame() == AGRP_GAME_GTA_IV) {
|
||||
return ped;
|
||||
} else {
|
||||
return ped.id;
|
||||
|
||||
Reference in New Issue
Block a user