Fix veh buyprice+fix clan rank+use pascalcase flag names

This commit is contained in:
Vortrex
2021-11-25 07:35:32 -06:00
parent be4d50f60a
commit 1c51c01db6
18 changed files with 657 additions and 571 deletions

View File

@@ -32,7 +32,7 @@ function loginCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function toggleAutoLoginByIPCommand(command, params, client) { function toggleAutoLoginByIPCommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("autoLoginIP"); let flagValue = getAccountSettingsFlagValue("AutoLoginIP");
if(isAccountAutoIPLoginEnabled(getPlayerData(client).accountData)) { if(isAccountAutoIPLoginEnabled(getPlayerData(client).accountData)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue; getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
@@ -47,7 +47,7 @@ function toggleAutoLoginByIPCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function toggleNoRandomTipsCommand(command, params, client) { function toggleNoRandomTipsCommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("noTimedRandomTips"); let flagValue = getAccountSettingsFlagValue("NoRandomTips");
if(isAccountAutoIPLoginEnabled(getPlayerData(client).accountData)) { if(isAccountAutoIPLoginEnabled(getPlayerData(client).accountData)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue; getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
@@ -62,7 +62,7 @@ function toggleNoRandomTipsCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function toggleNoActionTipsCommand(command, params, client) { function toggleNoActionTipsCommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("noActionTips"); let flagValue = getAccountSettingsFlagValue("NoActionTips");
if(isAccountAutoIPLoginEnabled(getPlayerData(client).accountData)) { if(isAccountAutoIPLoginEnabled(getPlayerData(client).accountData)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue; getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
@@ -77,7 +77,7 @@ function toggleNoActionTipsCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function toggleAutoSelectLastCharacterCommand(command, params, client) { function toggleAutoSelectLastCharacterCommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("autoSelectLastCharacter"); let flagValue = getAccountSettingsFlagValue("AutoSelectLastCharacter");
if(doesPlayerHaveAutoSelectLastCharacterEnabled(client)) { if(doesPlayerHaveAutoSelectLastCharacterEnabled(client)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue; getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
@@ -92,7 +92,7 @@ function toggleAutoSelectLastCharacterCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function toggleAccountGUICommand(command, params, client) { function toggleAccountGUICommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("noGUI"); let flagValue = getAccountSettingsFlagValue("NoGUI");
if(!doesPlayerHaveGUIEnabled(client)) { if(!doesPlayerHaveGUIEnabled(client)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue; getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
@@ -129,7 +129,7 @@ function toggleAccountGUICommand(command, params, client) {
// =========================================================================== // ===========================================================================
function toggleAccountLoginAttemptNotificationsCommand(command, params, client) { function toggleAccountLoginAttemptNotificationsCommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("authAttemptAlert"); let flagValue = getAccountSettingsFlagValue("AuthAttemptAlert");
if(!isAccountSettingFlagEnabled(getPlayerData(client).accountData, flagValue)) { if(!isAccountSettingFlagEnabled(getPlayerData(client).accountData, flagValue)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue; getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
@@ -147,7 +147,7 @@ function toggleAccountLoginAttemptNotificationsCommand(command, params, client)
// =========================================================================== // ===========================================================================
function toggleAccountServerLogoCommand(command, params, client) { function toggleAccountServerLogoCommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("noServerLogo"); let flagValue = getAccountSettingsFlagValue("NoServerLogo");
if(!doesPlayerHaveLogoEnabled(client)) { if(!doesPlayerHaveLogoEnabled(client)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue; getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
@@ -171,7 +171,7 @@ function toggleAccountServerLogoCommand(command, params, client) {
// UNFINISHED! // UNFINISHED!
// TO-DO: Make GUI, add command to generate code to add to auth app and command to input code returned by auth app // TO-DO: Make GUI, add command to generate code to add to auth app and command to input code returned by auth app
function toggleAccountTwoFactorAuthCommand(command, params, client) { function toggleAccountTwoFactorAuthCommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("twoStepAuth"); let flagValue = getAccountSettingsFlagValue("TwoStepAuth");
if(getEmailConfig().enabled) { if(getEmailConfig().enabled) {
if(getPlayerData(client).accountData.emailAddress != "") { if(getPlayerData(client).accountData.emailAddress != "") {
@@ -334,7 +334,7 @@ function verifyAccountEmailCommand(command, params, client) {
return false; return false;
} }
getPlayerData(client).accountData.flags.moderation = addBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("emailVerified")); getPlayerData(client).accountData.flags.moderation = addBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("EmailVerified"));
getPlayerData(client).accountData.emailVerificationCode = ""; getPlayerData(client).accountData.emailVerificationCode = "";
messagePlayerSuccess(client, `Your email has been verified!`); messagePlayerSuccess(client, `Your email has been verified!`);
@@ -570,7 +570,7 @@ function loginSuccess(client) {
updateConnectionLogOnAuth(client, getPlayerData(client).accountData.databaseId); updateConnectionLogOnAuth(client, getPlayerData(client).accountData.databaseId);
if(doesPlayerHaveStaffPermission(client, "developer") || doesPlayerHaveStaffPermission(client, "manageServer")) { if(doesPlayerHaveStaffPermission(client, "Developer") || doesPlayerHaveStaffPermission(client, "ManageServer")) {
logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`); logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`);
client.administrator = true; client.administrator = true;
} }
@@ -799,7 +799,7 @@ function checkLogin(client, password) {
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
} }
if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("authAttemptAlert"))) { if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame()); sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame());
} }
return false; return false;
@@ -815,7 +815,7 @@ function checkLogin(client, password) {
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
} }
if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("authAttemptAlert"))) { if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame()); sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame());
} }
return false; return false;
@@ -827,7 +827,7 @@ function checkLogin(client, password) {
loginSuccess(client); loginSuccess(client);
if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("authAttemptAlert"))) { if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
sendAccountLoginSuccessNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame()); sendAccountLoginSuccessNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame());
} }
} }
@@ -1201,7 +1201,7 @@ function loadAccountMessagesFromDatabase(accountDatabaseID) {
// =========================================================================== // ===========================================================================
function isAccountAutoIPLoginEnabled(accountData) { function isAccountAutoIPLoginEnabled(accountData) {
return isAccountSettingFlagEnabled(accountData, getAccountSettingsFlagValue("autoLoginIP")); return isAccountSettingFlagEnabled(accountData, getAccountSettingsFlagValue("AutoLoginIP"));
} }
// =========================================================================== // ===========================================================================
@@ -1213,19 +1213,19 @@ function doesPlayerHaveAutoIPLoginEnabled(client) {
// =========================================================================== // ===========================================================================
function doesPlayerHaveGUIEnabled(client) { function doesPlayerHaveGUIEnabled(client) {
return !isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("noGUI")); return !isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("NoGUI"));
} }
// =========================================================================== // ===========================================================================
function doesPlayerHaveLogoEnabled(client) { function doesPlayerHaveLogoEnabled(client) {
return !isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("noServerLogo")); return !isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("NoServerLogo"));
} }
// =========================================================================== // ===========================================================================
function doesPlayerHaveAutoSelectLastCharacterEnabled(client) { function doesPlayerHaveAutoSelectLastCharacterEnabled(client) {
return isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("autoSelectLastCharacter")); return isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AutoSelectLastCharacter"));
} }
// =========================================================================== // ===========================================================================
@@ -1237,13 +1237,13 @@ function getPlayerStaffTitle(client) {
// =========================================================================== // ===========================================================================
function isAccountEmailVerified(accountData) { function isAccountEmailVerified(accountData) {
return hasBitFlag(accountData.flags.moderation, getModerationFlagValue("emailVerified")); return hasBitFlag(accountData.flags.moderation, getModerationFlagValue("EmailVerified"));
} }
// =========================================================================== // ===========================================================================
function isAccountTwoFactorAuthenticationVerified(accountData) { function isAccountTwoFactorAuthenticationVerified(accountData) {
return hasBitFlag(accountData.flags.moderation, getModerationFlagValue("twoFactorAuthVerified")); return hasBitFlag(accountData.flags.moderation, getModerationFlagValue("TwoFactorAuthVerified"));
} }
// =========================================================================== // ===========================================================================
@@ -1331,4 +1331,10 @@ function isAccountSettingFlagEnabled(accountData, flagValue) {
return hasBitFlag(accountData.settings, flagValue); return hasBitFlag(accountData.settings, flagValue);
} }
// ===========================================================================t // ===========================================================================
function doesPlayerHaveRandomTipsDisabled(client) {
return isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("NoRandomTips"));
}
// ===========================================================================

View File

@@ -27,42 +27,42 @@ let serverBitFlags = {
let serverBitFlagKeys = { let serverBitFlagKeys = {
staffFlagKeys: [ staffFlagKeys: [
"none", "None",
"basicModeration", "BasicModeration",
"manageHouses", "ManageHouses",
"manageVehicles", "ManageVehicles",
"manageBusinesses", "ManageBusinesses",
"manageClans", "ManageClans",
"manageServer", "ManageServer",
"manageAdmins", "ManageAdmins",
"manageJobs", "ManageJobs",
"manageItems", "ManageItems",
"manageWorld", "ManageWorld",
"manageAntiCheat", "ManageAntiCheat",
"developer", "Developer",
], ],
moderationFlagKeys: [ moderationFlagKeys: [
"none", "None",
"muted", "Muted",
"frozen", "Frozen",
"hackerBox", "HackerBox",
"gunBanned", "GunBanned",
"jobBanned", "JobBanned",
"ammuBanned", "AmmuBanned",
"noSkinCustomization", "NoSkinCustomization",
"desyncWeapons", "DesyncWeapons",
"hackerWorld", "HackerWorld",
"adminJailed", "AdminJailed",
"exemptFromAntiCheat", "ExemptFromAntiCheat",
"exemptFromBans", "ExemptFromBans",
"forceTutorial", "ForceTutorial",
"characterNameNeedsStaffApproval", "CharacterNameNeedsStaffApproval",
"emailVerified", "EmailVerified",
"twoFactorAuthVerified", "TwoFactorAuthVerified",
"nonRoleplayCharacterName", "NonRoleplayCharacterName",
], ],
factionFlagKeys: [ factionFlagKeys: [
"none", "None",
"police", "police",
"medical", "medical",
"fire", "fire",
@@ -70,7 +70,7 @@ let serverBitFlagKeys = {
"generic", "generic",
], ],
clanFlagKeys: [ clanFlagKeys: [
"none", "None",
"illegal", "illegal",
"legal", "legal",
"mafia", "mafia",
@@ -82,41 +82,41 @@ let serverBitFlagKeys = {
"hitContracts" "hitContracts"
], ],
clanPermissionFlagKeys: [ clanPermissionFlagKeys: [
"none", "None",
"startTurfWar", "StartTurfWar",
"startPointWar", "StartPointWar",
"inviteMember", "InviteMember",
"suspendMember", "SuspendMember",
"removeMember", "RemoveMember",
"memberRank", "MemberRank",
"clanTag", "ClanTag",
"clanName", "ClanName",
"manageVehicles", "ManageVehicles",
"manageHouses", "ManageHouses",
"manageBusinesses", "ManageBusinesses",
"manageNPCs", "ManageNPCs",
"manageRanks", "ManageRanks",
"owner", "Owner",
], ],
accountSettingsFlagKeys: [ accountSettingsFlagKeys: [
"none", "None",
"useWhiteList", "UseWhiteList",
"useBlackList", "UseBlackList",
"twoStepAuth", "TwoStepAuth",
"authAttemptAlert", "AuthAttemptAlert",
"noGUI", "NoGUI",
"autoLoginIP", "AutoLoginIP",
"noServerLogo", "NoServerLogo",
"autoSelectLastCharacter", "AutoSelectLastCharacter",
"showRealTimeClock", "ShowRealTimeClock",
"useGUIForItems", "UseGUIForItems",
"useRadialWheelItems", // If this is disabled, use MMORPG-style hotbar IF useGUIForItems is enabled "UseRadialWheelItems", // If this is disabled, use MMORPG-style hotbar IF UseGUIForItems is enabled
"disableKeyBinds", "NoKeyBinds",
"noTimedRandomTips", "NoRandomTips",
"noActionTips", "NoActionTips",
], ],
npcTriggerTypeKeys: [ npcTriggerTypeKeys: [
"none", "None",
"farProximity", // Comes within a far distance of NPC "farProximity", // Comes within a far distance of NPC
"mediumProximity", // Comes within a medium distance of NPC "mediumProximity", // Comes within a medium distance of NPC
"nearProximity", // Comes within a close distance of NPC "nearProximity", // Comes within a close distance of NPC
@@ -142,7 +142,7 @@ let serverBitFlagKeys = {
"attackedByFist", // Any element is attacked by fist "attackedByFist", // Any element is attacked by fist
], ],
npcTriggerConditionTypeKeys: [ npcTriggerConditionTypeKeys: [
"none", "None",
"isInLineOfSight", "isInLineOfSight",
"isFarProximity", "isFarProximity",
"isMediumProximity", "isMediumProximity",
@@ -180,7 +180,7 @@ let serverBitFlagKeys = {
"isWhispering", "isWhispering",
], ],
npcTriggerResponseTypeKeys: [ npcTriggerResponseTypeKeys: [
"none", "None",
"shout", "shout",
"talk", "talk",
"whisper", "whisper",
@@ -209,7 +209,7 @@ let serverBitFlagKeys = {
"searchArea", "searchArea",
], ],
seenHelpTipsKeys: [ seenHelpTipsKeys: [
"none", "None",
"vehicleEngineOffWhenEntering", "vehicleEngineOffWhenEntering",
"vehicleLockedAfterEntryAttempt", "vehicleLockedAfterEntryAttempt",
"showItemsAfterPurchase", "showItemsAfterPurchase",
@@ -272,7 +272,7 @@ function doesPlayerHaveStaffPermission(client, requiredFlags) {
return true; return true;
} }
if(requiredFlags == getStaffFlagValue("none")) { if(requiredFlags == getStaffFlagValue("None")) {
return true; return true;
} }
@@ -282,7 +282,7 @@ function doesPlayerHaveStaffPermission(client, requiredFlags) {
} }
// -1 is automatic override (having -1 for staff flags is basically god mode admin level) // -1 is automatic override (having -1 for staff flags is basically god mode admin level)
if(staffFlags == getStaffFlagValue("all")) { if(staffFlags == getStaffFlagValue("All")) {
return true; return true;
} }
@@ -300,11 +300,11 @@ function doesPlayerHaveClanPermission(client, requiredFlags) {
return true; return true;
} }
if(requiredFlags == getClanFlagValue("none")) { if(requiredFlags == getClanFlagValue("None")) {
return true; return true;
} }
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageClans"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageClans"))) {
return true; return true;
} }
@@ -312,7 +312,7 @@ function doesPlayerHaveClanPermission(client, requiredFlags) {
clanFlags = getPlayerCurrentSubAccount(client).clanFlags | getClanRankFlags(getPlayerCurrentSubAccount(client).clanRank); clanFlags = getPlayerCurrentSubAccount(client).clanFlags | getClanRankFlags(getPlayerCurrentSubAccount(client).clanRank);
// -1 is automatic override (having -1 for staff flags is basically god mode admin level) // -1 is automatic override (having -1 for staff flags is basically god mode admin level)
if(clanFlags == getClanFlagValue("all")) { if(clanFlags == getClanFlagValue("All")) {
return true; return true;
} }
@@ -326,7 +326,7 @@ function doesPlayerHaveClanPermission(client, requiredFlags) {
// =========================================================================== // ===========================================================================
function getStaffFlagValue(flagName) { function getStaffFlagValue(flagName) {
if(flagName == "all") { if(flagName == "All") {
return -1; return -1;
} }
@@ -340,7 +340,7 @@ function getStaffFlagValue(flagName) {
// =========================================================================== // ===========================================================================
function getClanFlagValue(flagName) { function getClanFlagValue(flagName) {
if(flagName == "all") { if(flagName == "All") {
return -1; return -1;
} }
@@ -354,7 +354,7 @@ function getClanFlagValue(flagName) {
// =========================================================================== // ===========================================================================
function getAccountSettingsFlagValue(flagName) { function getAccountSettingsFlagValue(flagName) {
if(flagName == "all") { if(flagName == "All") {
return -1; return -1;
} }
@@ -368,7 +368,7 @@ function getAccountSettingsFlagValue(flagName) {
// =========================================================================== // ===========================================================================
function getModerationFlagValue(flagName) { function getModerationFlagValue(flagName) {
if(flagName == "all") { if(flagName == "All") {
return -1; return -1;
} }
@@ -427,7 +427,7 @@ function takePlayerStaffFlag(client, flagName) {
// =========================================================================== // ===========================================================================
function clearPlayerStaffFlags(client) { function clearPlayerStaffFlags(client) {
getPlayerData(client).accountData.flags.admin = getStaffFlagValue("none"); getPlayerData(client).accountData.flags.admin = getStaffFlagValue("None");
return true; return true;
} }

View File

@@ -589,7 +589,7 @@ function setBusinessInteriorTypeCommand(command, params, client) {
} }
if(isNaN(typeParam)) { if(isNaN(typeParam)) {
if(toLowerCase(typeParam) == "none") { if(toLowerCase(typeParam) == "None") {
getBusinessData(businessId).exitPosition = toVector3(0.0, 0.0, 0.0); getBusinessData(businessId).exitPosition = toVector3(0.0, 0.0, 0.0);
getBusinessData(businessId).exitDimension = 0; getBusinessData(businessId).exitDimension = 0;
getBusinessData(businessId).exitInterior = -1; getBusinessData(businessId).exitInterior = -1;
@@ -1856,7 +1856,7 @@ function updateBusinessInteriorLightsForOccupants(businessId) {
// =========================================================================== // ===========================================================================
function canPlayerWithdrawFromBusinessTill(client, businessId) { function canPlayerWithdrawFromBusinessTill(client, businessId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageBusinesses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) {
return true; return true;
} }
@@ -1865,7 +1865,7 @@ function canPlayerWithdrawFromBusinessTill(client, businessId) {
} }
if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN && getBusinessData(businessId).ownerId == getClanData(getPlayerClan(client)).databaseId) { if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN && getBusinessData(businessId).ownerId == getClanData(getPlayerClan(client)).databaseId) {
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageBusinesses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageBusinesses"))) {
return true; return true;
} }
} }
@@ -1876,7 +1876,7 @@ function canPlayerWithdrawFromBusinessTill(client, businessId) {
// =========================================================================== // ===========================================================================
function canPlayerSetBusinessInteriorLights(client, businessId) { function canPlayerSetBusinessInteriorLights(client, businessId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageBusinesses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) {
return true; return true;
} }
@@ -1885,7 +1885,7 @@ function canPlayerSetBusinessInteriorLights(client, businessId) {
} }
if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN && getBusinessData(businessId).ownerId == getClanData(getPlayerClan(client)).databaseId) { if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN && getBusinessData(businessId).ownerId == getClanData(getPlayerClan(client)).databaseId) {
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageBusinesses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageBusinesses"))) {
return true; return true;
} }
} }
@@ -1896,7 +1896,7 @@ function canPlayerSetBusinessInteriorLights(client, businessId) {
// =========================================================================== // ===========================================================================
function canPlayerLockUnlockBusiness(client, businessId) { function canPlayerLockUnlockBusiness(client, businessId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageBusinesses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) {
return true; return true;
} }
@@ -1905,7 +1905,7 @@ function canPlayerLockUnlockBusiness(client, businessId) {
} }
if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN && getBusinessData(businessId).ownerId == getClanData(getPlayerClan(client)).databaseId) { if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN && getBusinessData(businessId).ownerId == getClanData(getPlayerClan(client)).databaseId) {
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageBusinesses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageBusinesses"))) {
return true; return true;
} }
} }
@@ -1916,7 +1916,7 @@ function canPlayerLockUnlockBusiness(client, businessId) {
// =========================================================================== // ===========================================================================
function canPlayerManageBusiness(client, businessId) { function canPlayerManageBusiness(client, businessId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageBusinesses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) {
return true; return true;
} }
@@ -1928,7 +1928,7 @@ function canPlayerManageBusiness(client, businessId) {
if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN) { if(getBusinessData(businessId).ownerType == VRR_BIZOWNER_CLAN) {
if(getBusinessData(businessId).ownerId == getPlayerClan(client)) { if(getBusinessData(businessId).ownerId == getPlayerClan(client)) {
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageBusinesses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageBusinesses"))) {
return true; return true;
} }

View File

@@ -157,7 +157,7 @@ function listClanRanksCommand(command, params, client) {
let clanId = getPlayerClan(client); let clanId = getPlayerClan(client);
if(!areParamsEmpty(params)) { if(!areParamsEmpty(params)) {
if(doesPlayerHaveStaffPermission(client, "manageClans")) { if(doesPlayerHaveStaffPermission(client, "ManageClans")) {
clanId = getClanFromParams(params); clanId = getClanFromParams(params);
} }
} }
@@ -244,7 +244,7 @@ function setClanOwnerCommand(command, params, client) {
getClanData(clanId).owner = getPlayerCurrentSubAccount(targetClient).databaseId; getClanData(clanId).owner = getPlayerCurrentSubAccount(targetClient).databaseId;
getPlayerCurrentSubAccount(targetClient).clan = getClanData(clanId).databaseId; getPlayerCurrentSubAccount(targetClient).clan = getClanData(clanId).databaseId;
getPlayerCurrentSubAccount(targetClient).clanFlags = getClanFlagValue("all"); getPlayerCurrentSubAccount(targetClient).clanFlags = getClanFlagValue("All");
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set clan {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}owner to {ALTCOLOUR}${getCharacterFullName(targetClient)}`); messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set clan {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}owner to {ALTCOLOUR}${getCharacterFullName(targetClient)}`);
} }
@@ -252,7 +252,7 @@ function setClanOwnerCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function setClanTagCommand(command, params, client) { function setClanTagCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("clanTag"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ClanTag"))) {
messagePlayerError(client, "You can not change the clan tag!"); messagePlayerError(client, "You can not change the clan tag!");
return false; return false;
} }
@@ -277,7 +277,7 @@ function setClanTagCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function setClanNameCommand(command, params, client) { function setClanNameCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("clanName"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ClanName"))) {
messagePlayerError(client, "You can not change the clan name!"); messagePlayerError(client, "You can not change the clan name!");
return false; return false;
} }
@@ -302,7 +302,7 @@ function setClanNameCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function createClanRankCommand(command, params, client) { function createClanRankCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageRanks"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ManageRanks"))) {
messagePlayerError(client, "You can not add new clan ranks!"); messagePlayerError(client, "You can not add new clan ranks!");
return false; return false;
} }
@@ -332,7 +332,7 @@ function createClanRankCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function deleteClanRankCommand(command, params, client) { function deleteClanRankCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageRanks"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ManageRanks"))) {
messagePlayerError(client, "You can not remove clan ranks!"); messagePlayerError(client, "You can not remove clan ranks!");
return false; return false;
} }
@@ -384,25 +384,25 @@ function setClanMemberTagCommand(command, params, client) {
} }
if(!arePlayersInSameClan(client, targetClient)) { if(!arePlayersInSameClan(client, targetClient)) {
if(!doesPlayerHaveStaffPermission("manageClans")) { if(!doesPlayerHaveStaffPermission("ManageClans")) {
messagePlayerError(client, "That player is not in your clan!"); messagePlayerError(client, "That player is not in your clan!");
return false; return false;
} }
} }
if(!doesPlayerHaveStaffPermission("manageClans") && !doesPlayerHaveClanPermission("memberFlags")) { if(!doesPlayerHaveStaffPermission("ManageClans") && !doesPlayerHaveClanPermission("memberFlags")) {
messagePlayerError(client, "You cannot set clan member flags!"); messagePlayerError(client, "You cannot set clan member flags!");
return false; return false;
} }
if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) { if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) {
if(!doesPlayerHaveStaffPermission("manageClans")) { if(!doesPlayerHaveStaffPermission("ManageClans")) {
messagePlayerError(client, "You cannot set that clan member's flags!"); messagePlayerError(client, "You cannot set that clan member's flags!");
return false; return false;
} }
} }
getPlayerCurrentSubAccount(targetClient).clanTag = splitParams[1]; getPlayerCurrentSubAccount(targetClient).ClanTag = splitParams[1];
messagePlayerSuccess(client, `You set {ALTCOLOUR}${getCharacterFullName(targetClient)}'s {MAINCOLOUR}clan tag to {ALTCOLOUR}${splitParams[1]}`); messagePlayerSuccess(client, `You set {ALTCOLOUR}${getCharacterFullName(targetClient)}'s {MAINCOLOUR}clan tag to {ALTCOLOUR}${splitParams[1]}`);
messagePlayerAlert(client, `{ALTCOLOUR}${getCharacterFullName(targetClient)} {MAINCOLOUR}set your clan tag to {ALTCOLOUR}${splitParams[1]}`); messagePlayerAlert(client, `{ALTCOLOUR}${getCharacterFullName(targetClient)} {MAINCOLOUR}set your clan tag to {ALTCOLOUR}${splitParams[1]}`);
@@ -411,7 +411,7 @@ function setClanMemberTagCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function setClanRankTagCommand(command, params, client) { function setClanRankTagCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageRanks"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ManageRanks"))) {
messagePlayerError(client, "You can't change any clan ranks's tag!"); messagePlayerError(client, "You can't change any clan ranks's tag!");
return false; return false;
} }
@@ -430,7 +430,7 @@ function setClanRankTagCommand(command, params, client) {
} }
if(getClanRankData(clanId, rankId).level > getClanRankData(clanId, getPlayerClanRank(client)).level) { if(getClanRankData(clanId, rankId).level > getClanRankData(clanId, getPlayerClanRank(client)).level) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageClans"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageClans"))) {
messagePlayerError(client, "You can't change this rank's tag (it's a higher rank than yours)"); messagePlayerError(client, "You can't change this rank's tag (it's a higher rank than yours)");
return false; return false;
} }
@@ -442,7 +442,7 @@ function setClanRankTagCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function setClanRankLevelCommand(command, params, client) { function setClanRankLevelCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageRanks"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ManageRanks"))) {
messagePlayerError(client, "You can't change any clan rank's level!"); messagePlayerError(client, "You can't change any clan rank's level!");
return false; return false;
} }
@@ -469,7 +469,7 @@ function setClanRankLevelCommand(command, params, client) {
} }
if(getClanRankData(clanId, rankId).level > getClanRankData(clanId, getPlayerClanRank(client)).level) { if(getClanRankData(clanId, rankId).level > getClanRankData(clanId, getPlayerClanRank(client)).level) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageClans"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageClans"))) {
messagePlayerError(client, "You can't change this rank's level (it's a higher rank than yours)"); messagePlayerError(client, "You can't change this rank's level (it's a higher rank than yours)");
return false; return false;
} }
@@ -517,19 +517,19 @@ function addClanMemberFlagCommand(command, params, client) {
} }
if(!arePlayersInSameClan(client, targetClient)) { if(!arePlayersInSameClan(client, targetClient)) {
if(!doesPlayerHaveStaffPermission("manageClans")) { if(!doesPlayerHaveStaffPermission("ManageClans")) {
messagePlayerError(client, "That player is not in your clan!"); messagePlayerError(client, "That player is not in your clan!");
return false; return false;
} }
} }
if(!doesPlayerHaveStaffPermission("manageClans") && !doesPlayerHaveClanPermission("memberFlags")) { if(!doesPlayerHaveStaffPermission("ManageClans") && !doesPlayerHaveClanPermission("memberFlags")) {
messagePlayerError(client, "You cannot set clan member flags!"); messagePlayerError(client, "You cannot set clan member flags!");
return false; return false;
} }
if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) { if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) {
if(!doesPlayerHaveStaffPermission("manageClans")) { if(!doesPlayerHaveStaffPermission("ManageClans")) {
messagePlayerError(client, "You cannot set that clan member's flags!"); messagePlayerError(client, "You cannot set that clan member's flags!");
return false; return false;
} }
@@ -569,19 +569,19 @@ function removeClanMemberFlagCommand(command, params, client) {
} }
if(!arePlayersInSameClan(client, targetClient)) { if(!arePlayersInSameClan(client, targetClient)) {
if(!doesPlayerHaveStaffPermission("manageClans")) { if(!doesPlayerHaveStaffPermission("ManageClans")) {
messagePlayerError(client, "That player is not in your clan!"); messagePlayerError(client, "That player is not in your clan!");
return false; return false;
} }
} }
if(!doesPlayerHaveStaffPermission("manageClans") && !doesPlayerHaveClanPermission("memberFlags")) { if(!doesPlayerHaveStaffPermission("ManageClans") && !doesPlayerHaveClanPermission("memberFlags")) {
messagePlayerError(client, "You cannot set clan member flags!"); messagePlayerError(client, "You cannot set clan member flags!");
return false; return false;
} }
if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) { if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) {
if(!doesPlayerHaveStaffPermission("manageClans")) { if(!doesPlayerHaveStaffPermission("ManageClans")) {
messagePlayerError(client, "You cannot set that clan member's flags!"); messagePlayerError(client, "You cannot set that clan member's flags!");
return false; return false;
} }
@@ -595,7 +595,7 @@ function removeClanMemberFlagCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function addClanRankFlagCommand(command, params, client) { function addClanRankFlagCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageRanks"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ManageRanks"))) {
messagePlayerError(client, "You can not change a clan rank's permissions!"); messagePlayerError(client, "You can not change a clan rank's permissions!");
return false; return false;
} }
@@ -634,7 +634,7 @@ function addClanRankFlagCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function removeClanRankFlagCommand(command, params, client) { function removeClanRankFlagCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageRanks"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ManageRanks"))) {
messagePlayerError(client, "You can not change a clan rank's permissions!"); messagePlayerError(client, "You can not change a clan rank's permissions!");
return false; return false;
} }
@@ -672,6 +672,54 @@ function removeClanRankFlagCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function showClanRankFlagsCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("ManageRanks"))) {
messagePlayerError(client, "You can not change a clan rank's permissions!");
return false;
}
if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command));
return false;
}
let clanId = getPlayerClan(client);
if(!getClanData(clanId)) {
messagePlayerError(client, "Clan not found!");
return false;
}
let splitParams = params.split(" ");
let rankId = getClanRankFromParams(clanId, splitParams[0]);
if(!getClanRankData(clanId, rankId)) {
messagePlayerError(client, "Clan rank not found!");
return false;
}
let currentFlags = getClanRankData(clanId, rankId).flags;
let clanFlagKeys = getServerBitFlagKeys().clanPermissionFlagKeys.filter((flagKey) => flagKey != "None");
let flagList = [];
for(let i in clanFlagKeys) {
if(hasBitFlag(currentFlags, getClanFlagValue(clanFlagKeys[i]))) {
flagList.push(`{softGreen}${clanFlagKeys[i]}`);
} else {
flagList.push(`{softRed}${clanFlagKeys[i]}`);
}
}
let chunkedList = splitArrayIntoChunks(flagList, 6);
messagePlayerInfo(client, `{clanOrange}== {jobYellow}Clan Rank Flags {clanOrange}=========================`);
for(let i in chunkedList) {
messagePlayerInfo(client, chunkedList[i].join("{MAINCOLOUR}, "));
}
}
// ===========================================================================
function setClanMemberTitleCommand(command, params, client) { function setClanMemberTitleCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageMembers"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("manageMembers"))) {
messagePlayerError(client, "You can not change a clan member's title!"); messagePlayerError(client, "You can not change a clan member's title!");
@@ -699,14 +747,14 @@ function setClanMemberTitleCommand(command, params, client) {
} }
if(!arePlayersInSameClan(client, targetClient)) { if(!arePlayersInSameClan(client, targetClient)) {
if(!doesPlayerHaveStaffPermission(client, "manageClans")) { if(!doesPlayerHaveStaffPermission(client, "ManageClans")) {
messagePlayerError(client, "That player is not in your clan!"); messagePlayerError(client, "That player is not in your clan!");
return false; return false;
} }
} }
if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) { if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) {
if(!doesPlayerHaveStaffPermission(client, "manageClans")) { if(!doesPlayerHaveStaffPermission(client, "ManageClans")) {
messagePlayerError(client, "You cannot set that clan member's custom title!"); messagePlayerError(client, "You cannot set that clan member's custom title!");
return false; return false;
} }
@@ -753,7 +801,7 @@ function setClanRankTitleCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function setClanMemberRankCommand(command, params, client) { function setClanMemberRankCommand(command, params, client) {
if(!doesPlayerHaveClanPermission(client, getClanFlagValue("memberRank"))) { if(!doesPlayerHaveClanPermission(client, getClanFlagValue("MemberRank"))) {
messagePlayerError(client, "You can not change a clan member's rank!"); messagePlayerError(client, "You can not change a clan member's rank!");
return false; return false;
} }
@@ -785,21 +833,21 @@ function setClanMemberRankCommand(command, params, client) {
} }
if(!arePlayersInSameClan(client, targetClient)) { if(!arePlayersInSameClan(client, targetClient)) {
if(!doesPlayerHaveStaffPermission(client, "manageClans")) { if(!doesPlayerHaveStaffPermission(client, "ManageClans")) {
messagePlayerError(client, "That player is not in your clan!"); messagePlayerError(client, "That player is not in your clan!");
return false; return false;
} }
} }
if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) { if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) {
if(!doesPlayerHaveStaffPermission(client, "manageClans")) { if(!doesPlayerHaveStaffPermission(client, "ManageClans")) {
messagePlayerError(client, "You cannot set that clan member's rank!"); messagePlayerError(client, "You cannot set that clan member's rank!");
return false; return false;
} }
} }
if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) { if(getPlayerClanRank(client) <= getPlayerClanRank(targetClient)) {
if(!doesPlayerHaveStaffPermission(client, "manageClans")) { if(!doesPlayerHaveStaffPermission(client, "ManageClans")) {
messagePlayerError(client, "You can't set a member's rank that high!"); messagePlayerError(client, "You can't set a member's rank that high!");
return false; return false;
} }

View File

@@ -337,16 +337,28 @@ function removeColoursInMessage(messageText) {
return ""; return "";
} }
let tempFind = `{RESETCOLOUR}`;
let tempRegex = new RegExp(tempFind, 'g');
messageText = messageText.replace(tempRegex, "");
tempFind = `{ALTCOLOUR}`;
tempRegex = new RegExp(tempFind, 'g');
messageText = messageText.replace(tempRegex, "");
tempFind = `{MAINCOLOUR}`;
tempRegex = new RegExp(tempFind, 'g');
messageText = messageText.replace(tempRegex, "");
for(let i in getServerColours().hex.byName) { for(let i in getServerColours().hex.byName) {
let find = `{${i}}`; let find = `{${i}}`;
let re = new RegExp(find, 'g'); let re = new RegExp(find, 'g');
messageText = messageText.replace(re, ``); messageText = messageText.replace(re, "");
} }
for(let i in getServerColours().hex.byType) { for(let i in getServerColours().hex.byType) {
let find = `{${i}}`; let find = `{${i}}`;
let re = new RegExp(find, 'g'); let re = new RegExp(find, 'g');
messageText = messageText.replace(re, ``); messageText = messageText.replace(re, "");
} }
return messageText; return messageText;

View File

@@ -38,423 +38,424 @@ function initCommandScript() {
function loadCommands() { function loadCommands() {
let tempCommands = { let tempCommands = {
accent: [ accent: [
commandData("accent", setAccentCommand, "<accent name/id>", getStaffFlagValue("none"), false, false, "Sets your character's accent"), commandData("accent", setAccentCommand, "<accent name/id>", getStaffFlagValue("None"), false, false, "Sets your character's accent"),
commandData("accents", listAccentsCommand, "", getStaffFlagValue("none"), false, false, "Shows a list of all available accents"), commandData("accents", listAccentsCommand, "", getStaffFlagValue("None"), false, false, "Shows a list of all available accents"),
commandData("accentlist", listAccentsCommand, "", getStaffFlagValue("none"), false, false, "Shows a list of all available accents"), commandData("accentlist", listAccentsCommand, "", getStaffFlagValue("None"), false, false, "Shows a list of all available accents"),
], ],
account: [ account: [
commandData("login", loginCommand, "<password>", getStaffFlagValue("none"), false, false, "Login to an account"), commandData("login", loginCommand, "<password>", getStaffFlagValue("None"), false, false, "Login to an account"),
commandData("register", registerCommand, "<password>", getStaffFlagValue("none"), false, false, "Creates an account"), commandData("register", registerCommand, "<password>", getStaffFlagValue("None"), false, false, "Creates an account"),
commandData("changepass", changeAccountPasswordCommand, "<old password> <new password>", getStaffFlagValue("none"), true, false, "Change an account password"), commandData("changepass", changeAccountPasswordCommand, "<old password> <new password>", getStaffFlagValue("None"), true, false, "Change an account password"),
commandData("iplogin", toggleAutoLoginByIPCommand, "", getStaffFlagValue("none"), true, false, "Toggle whether to automatically login if you join with the same IP as your last join"), commandData("iplogin", toggleAutoLoginByIPCommand, "", getStaffFlagValue("None"), true, false, "Toggle whether to automatically login if you join with the same IP as your last join"),
commandData("autolastchar", toggleAutoSelectLastCharacterCommand, "", getStaffFlagValue("none"), true, false, "Toggle whether to automatically spawn with the last character you played as"), commandData("autolastchar", toggleAutoSelectLastCharacterCommand, "", getStaffFlagValue("None"), true, false, "Toggle whether to automatically spawn with the last character you played as"),
commandData("gui", toggleAccountGUICommand, "", getStaffFlagValue("none"), false, false, "Toggle whether to use GUI. If GUI is disabled on the server, it won't show even if you have GUI enabled."), commandData("gui", toggleAccountGUICommand, "", getStaffFlagValue("None"), false, false, "Toggle whether to use GUI. If GUI is disabled on the server, it won't show even if you have GUI enabled."),
commandData("2fa", toggleAccountTwoFactorAuthCommand, "", getStaffFlagValue("none"), true, false, "Set up and use two-factor authentication."), commandData("2fa", toggleAccountTwoFactorAuthCommand, "", getStaffFlagValue("None"), true, false, "Set up and use two-factor authentication."),
commandData("setemail", setAccountEmailCommand, "<email address>", getStaffFlagValue("none"), true, false, "Sets your email. To reset your password, you must have a valid email set and verified."), commandData("setemail", setAccountEmailCommand, "<email address>", getStaffFlagValue("None"), true, false, "Sets your email. To reset your password, you must have a valid email set and verified."),
commandData("verifyemail", verifyAccountEmailCommand, "<verification code>", getStaffFlagValue("none"), true, false, "Confirms/verifies your email."), commandData("verifyemail", verifyAccountEmailCommand, "<verification code>", getStaffFlagValue("None"), true, false, "Confirms/verifies your email."),
//commandData("setdiscord", setAccountDiscordCommand, "<discord id>", getStaffFlagValue("none"), true, false, "Set up the integration for discord. Allows you to see info and use in-game commands on discord."), //commandData("setdiscord", setAccountDiscordCommand, "<discord id>", getStaffFlagValue("None"), true, false, "Set up the integration for discord. Allows you to see info and use in-game commands on discord."),
commandData("notips", toggleNoRandomTipsCommand, "", getStaffFlagValue("none"), true, false, "Turn on and off random tips"), commandData("notips", toggleNoRandomTipsCommand, "", getStaffFlagValue("None"), true, false, "Turn on and off random tips"),
commandData("loginalert", toggleAccountLoginAttemptNotificationsCommand, "", getStaffFlagValue("none"), true, false, "Turn on and off email notifications for attempts to login to your account"), commandData("loginalert", toggleAccountLoginAttemptNotificationsCommand, "", getStaffFlagValue("None"), true, false, "Turn on and off email notifications for attempts to login to your account"),
commandData("scrolllines", setAccountChatScrollLinesCommand, "", getStaffFlagValue("None"), true, false, "Sets how many chatbox lines to scroll at a time when using pageup/pagedown"),
], ],
ammunation: [], ammunation: [],
animation: [ animation: [
commandData("anim", playPlayerAnimationCommand, "<animation name>", getStaffFlagValue("none"), true, true, "Makes your player ped use an animation"), commandData("anim", playPlayerAnimationCommand, "<animation name>", getStaffFlagValue("None"), true, true, "Makes your player ped use an animation"),
commandData("an", playPlayerAnimationCommand, "<animation name>", getStaffFlagValue("none"), true, true, "Makes your player ped use an animation"), commandData("an", playPlayerAnimationCommand, "<animation name>", getStaffFlagValue("None"), true, true, "Makes your player ped use an animation"),
commandData("e", playPlayerAnimationCommand, "<animation name>", getStaffFlagValue("none"), true, true, "Makes your player ped use an animation"), commandData("e", playPlayerAnimationCommand, "<animation name>", getStaffFlagValue("None"), true, true, "Makes your player ped use an animation"),
commandData("anims", showAnimationListCommand, "", getStaffFlagValue("none"), true, true, "Shows a list of animations"), commandData("anims", showAnimationListCommand, "", getStaffFlagValue("None"), true, true, "Shows a list of animations"),
commandData("animlist", showAnimationListCommand, "", getStaffFlagValue("none"), true, true, "Shows a list of animations"), commandData("animlist", showAnimationListCommand, "", getStaffFlagValue("None"), true, true, "Shows a list of animations"),
commandData("stopanim", stopPlayerAnimationCommand, "", getStaffFlagValue("none"), true, true, "Stops your current animation"), commandData("stopanim", stopPlayerAnimationCommand, "", getStaffFlagValue("None"), true, true, "Stops your current animation"),
], ],
antiCheat: [ antiCheat: [
//commandData("addacscriptwl", addAntiCheatWhiteListedScriptCommand, "<script name>", getStaffFlagValue("developer"), true, true), //commandData("addacscriptwl", addAntiCheatWhiteListedScriptCommand, "<script name>", getStaffFlagValue("Developer"), true, true),
//commandData("delacscriptwl", removeAntiCheatWhiteListedScriptCommand, "<script name>", getStaffFlagValue("developer"), true, true), //commandData("delacscriptwl", removeAntiCheatWhiteListedScriptCommand, "<script name>", getStaffFlagValue("Developer"), true, true),
//commandData("addacscriptbl", addAntiCheatBlackListedScriptCommand, "<script name>", getStaffFlagValue("developer"), true, true), //commandData("addacscriptbl", addAntiCheatBlackListedScriptCommand, "<script name>", getStaffFlagValue("Developer"), true, true),
//commandData("delacscriptbl", removeAntiCheatBlackListedScriptCommand, "<script name>", getStaffFlagValue("developer"), true, true), //commandData("delacscriptbl", removeAntiCheatBlackListedScriptCommand, "<script name>", getStaffFlagValue("Developer"), true, true),
//commandData("setacscriptbl", toggleAntiCheatScriptBlackListCommand, "<0/1 state>", getStaffFlagValue("developer"), true, true), //commandData("setacscriptbl", toggleAntiCheatScriptBlackListCommand, "<0/1 state>", getStaffFlagValue("Developer"), true, true),
//commandData("setacscriptwl", toggleAntiCheatScriptWhiteListCommand, "<0/1 state>", getStaffFlagValue("developer"), true, true), //commandData("setacscriptwl", toggleAntiCheatScriptWhiteListCommand, "<0/1 state>", getStaffFlagValue("Developer"), true, true),
//commandData("setac", toggleGlobalAntiCheatCommand, "<0/1 state>", getStaffFlagValue("developer"), true, true), //commandData("setac", toggleGlobalAntiCheatCommand, "<0/1 state>", getStaffFlagValue("Developer"), true, true),
//commandData("ac", getGlobalAntiCheatStatusCommand, "<0/1 state>", getStaffFlagValue("developer"), true, true), //commandData("ac", getGlobalAntiCheatStatusCommand, "<0/1 state>", getStaffFlagValue("Developer"), true, true),
], ],
ban: [ ban: [
commandData("aban", accountBanCommand, "<player name/id> <reason>", getStaffFlagValue("basicModeration"), true, true, "Bans a player's account."), commandData("aban", accountBanCommand, "<player name/id> <reason>", getStaffFlagValue("BasicModeration"), true, true, "Bans a player's account."),
commandData("acctban", accountBanCommand, "<player name/id> <reason>", getStaffFlagValue("basicModeration"), true, true, "Bans a player's account."), commandData("acctban", accountBanCommand, "<player name/id> <reason>", getStaffFlagValue("BasicModeration"), true, true, "Bans a player's account."),
commandData("cban", subAccountBanCommand, "<player name/id> <reason>", getStaffFlagValue("basicModeration"), true, true, "Bans a player's character."), commandData("cban", subAccountBanCommand, "<player name/id> <reason>", getStaffFlagValue("BasicModeration"), true, true, "Bans a player's character."),
commandData("charban", subAccountBanCommand, "<player name/id> <reason>", getStaffFlagValue("basicModeration"), true, true, "Bans a player's character."), commandData("charban", subAccountBanCommand, "<player name/id> <reason>", getStaffFlagValue("BasicModeration"), true, true, "Bans a player's character."),
commandData("saban", subAccountBanCommand, "<player name/id> <reason>", getStaffFlagValue("basicModeration"), true, true, "Bans a player's character (subaccount)."), commandData("saban", subAccountBanCommand, "<player name/id> <reason>", getStaffFlagValue("BasicModeration"), true, true, "Bans a player's character (subaccount)."),
commandData("ipban", ipBanCommand, "<player name/id> <reason>", getStaffFlagValue("basicModeration"), true, true, "Bans a player's IP."), commandData("ipban", ipBanCommand, "<player name/id> <reason>", getStaffFlagValue("BasicModeration"), true, true, "Bans a player's IP."),
commandData("subnetban", subNetBanCommand, "<player name/id> <range> <reason>", getStaffFlagValue("basicModeration"), true, true, "Bans a player's subnet."), commandData("subnetban", subNetBanCommand, "<player name/id> <range> <reason>", getStaffFlagValue("BasicModeration"), true, true, "Bans a player's subnet."),
], ],
bitFlag: [], bitFlag: [],
business: [ business: [
commandData("addbiz", createBusinessCommand, "<name>", getStaffFlagValue("manageBusinesses"), true, false, "Creates a business"), commandData("addbiz", createBusinessCommand, "<name>", getStaffFlagValue("ManageBusinesses"), true, false, "Creates a business"),
commandData("delbiz", deleteBusinessCommand, "[id]", getStaffFlagValue("manageBusinesses"), true, true, "Deletes a business"), commandData("delbiz", deleteBusinessCommand, "[id]", getStaffFlagValue("ManageBusinesses"), true, true, "Deletes a business"),
//commandData("addbizloc", createBusinessLocationCommand, "<type> <business id> <name>", getStaffFlagValue("manageBusinesses"), true, false), //commandData("addbizloc", createBusinessLocationCommand, "<type> <business id> <name>", getStaffFlagValue("ManageBusinesses"), true, false),
//commandData("delbizloc", deleteBusinessLocationCommand, "[id]", getStaffFlagValue("manageBusinesses"), true, false), //commandData("delbizloc", deleteBusinessLocationCommand, "[id]", getStaffFlagValue("ManageBusinesses"), true, false),
commandData("bizreloadall", reloadAllBusinessesCommand, "", getStaffFlagValue("manageBusinesses"), true, false, "Reloads all businesses from the database"), commandData("bizreloadall", reloadAllBusinessesCommand, "", getStaffFlagValue("ManageBusinesses"), true, false, "Reloads all businesses from the database"),
commandData("bizlock", lockUnlockBusinessCommand, "", getStaffFlagValue("none"), true, true, "Locks a business"), commandData("bizlock", lockUnlockBusinessCommand, "", getStaffFlagValue("None"), true, true, "Locks a business"),
commandData("bizlights", toggleBusinessInteriorLightsCommand, "", getStaffFlagValue("none"), true, true, "Turns on/off a business's interior lights"), commandData("bizlights", toggleBusinessInteriorLightsCommand, "", getStaffFlagValue("None"), true, true, "Turns on/off a business's interior lights"),
commandData("bizbuy", buyBusinessCommand, "", getStaffFlagValue("none"), true, true, "Purchases a business"), commandData("bizbuy", buyBusinessCommand, "", getStaffFlagValue("None"), true, true, "Purchases a business"),
commandData("bizfee", setBusinessEntranceFeeCommand, "<amount>", getStaffFlagValue("none"), true, true, "Sets a fee to charge players when they enter the business."), commandData("bizfee", setBusinessEntranceFeeCommand, "<amount>", getStaffFlagValue("None"), true, true, "Sets a fee to charge players when they enter the business."),
commandData("biztill", viewBusinessTillAmountCommand, "", getStaffFlagValue("none"), true, true, "Shows the business's till (cash register) amount"), commandData("biztill", viewBusinessTillAmountCommand, "", getStaffFlagValue("None"), true, true, "Shows the business's till (cash register) amount"),
commandData("bizbalance", viewBusinessTillAmountCommand, "", getStaffFlagValue("none"), true, true, "Shows the business's till (cash register) amount"), commandData("bizbalance", viewBusinessTillAmountCommand, "", getStaffFlagValue("None"), true, true, "Shows the business's till (cash register) amount"),
commandData("bizwithdraw", withdrawFromBusinessCommand, "<amount>", getStaffFlagValue("none"), true, true, "Take money out of the business till (cash register)"), commandData("bizwithdraw", withdrawFromBusinessCommand, "<amount>", getStaffFlagValue("None"), true, true, "Take money out of the business till (cash register)"),
commandData("bizdeposit", depositIntoBusinessCommand, "<amount>", getStaffFlagValue("none"), true, true, "Put money into the business till (cash register)"), commandData("bizdeposit", depositIntoBusinessCommand, "<amount>", getStaffFlagValue("None"), true, true, "Put money into the business till (cash register)"),
commandData("buy", buyFromBusinessCommand, "<slot> [amount]", getStaffFlagValue("none"), true, true, "Buy items from a business"), commandData("buy", buyFromBusinessCommand, "<slot> [amount]", getStaffFlagValue("None"), true, true, "Buy items from a business"),
commandData("bizstock", stockItemOnBusinessFloorCommand, "<item name> <amount> <sell price>", getStaffFlagValue("none"), true, true, "Uses storage items to restock the business with."), commandData("bizstock", stockItemOnBusinessFloorCommand, "<item name> <amount> <sell price>", getStaffFlagValue("None"), true, true, "Uses storage items to restock the business with."),
commandData("bizstore", storeItemInBusinessStorageCommand, "<item name> <amount>", getStaffFlagValue("none"), true, true, "Moves items from the business to the business storage"), commandData("bizstore", storeItemInBusinessStorageCommand, "<item name> <amount>", getStaffFlagValue("None"), true, true, "Moves items from the business to the business storage"),
commandData("bizorder", orderItemForBusinessCommand, "<item name> <amount> <sell price>", getStaffFlagValue("none"), true, true, "Orders items to sell from a business"), commandData("bizorder", orderItemForBusinessCommand, "<item name> <amount> <sell price>", getStaffFlagValue("None"), true, true, "Orders items to sell from a business"),
commandData("bizitemprice", setBusinessItemSellPriceCommand, "<item slot> <sell price>", getStaffFlagValue("none"), true, true, "Sets the purchase price of a business item"), commandData("bizitemprice", setBusinessItemSellPriceCommand, "<item slot> <sell price>", getStaffFlagValue("None"), true, true, "Sets the purchase price of a business item"),
commandData("bizname", setBusinessNameCommand, "<name>", getStaffFlagValue("none"), true, true, "Changes a business name"), commandData("bizname", setBusinessNameCommand, "<name>", getStaffFlagValue("None"), true, true, "Changes a business name"),
commandData("bizowner", setBusinessOwnerCommand, "<player name/id>", getStaffFlagValue("none"), true, true, "Changes the owner of a business"), commandData("bizowner", setBusinessOwnerCommand, "<player name/id>", getStaffFlagValue("None"), true, true, "Changes the owner of a business"),
commandData("bizclan", setBusinessClanCommand, "", getStaffFlagValue("none"), true, true, "Gives a business to a clan"), commandData("bizclan", setBusinessClanCommand, "", getStaffFlagValue("None"), true, true, "Gives a business to a clan"),
commandData("bizbuyprice", setBusinessBuyPriceCommand, "<amount>", getStaffFlagValue("none"), true, true, "Changes the price to buy the business"), commandData("bizbuyprice", setBusinessBuyPriceCommand, "<amount>", getStaffFlagValue("None"), true, true, "Changes the price to buy the business"),
commandData("bizblip", setBusinessBlipCommand, "<type name/model id>", getStaffFlagValue("manageBusinesses"), true, true, "Sets the business blip display"), commandData("bizblip", setBusinessBlipCommand, "<type name/model id>", getStaffFlagValue("ManageBusinesses"), true, true, "Sets the business blip display"),
commandData("bizpickup", setBusinessPickupCommand, "<type name/model id>", getStaffFlagValue("manageBusinesses"), true, true, "Sets the business pickup display"), commandData("bizpickup", setBusinessPickupCommand, "<type name/model id>", getStaffFlagValue("ManageBusinesses"), true, true, "Sets the business pickup display"),
commandData("bizinfo", getBusinessInfoCommand, "[id]", getStaffFlagValue("none"), true, true, "Shows business information"), commandData("bizinfo", getBusinessInfoCommand, "[id]", getStaffFlagValue("None"), true, true, "Shows business information"),
commandData("bizentrance", moveBusinessEntranceCommand, "", getStaffFlagValue("manageBusinesses"), true, true, "Shows business information"), commandData("bizentrance", moveBusinessEntranceCommand, "", getStaffFlagValue("ManageBusinesses"), true, true, "Shows business information"),
commandData("bizexit", moveBusinessExitCommand, "", getStaffFlagValue("manageBusinesses"), true, true, "Moves the exit (interior point) of the business"), commandData("bizexit", moveBusinessExitCommand, "", getStaffFlagValue("ManageBusinesses"), true, true, "Moves the exit (interior point) of the business"),
commandData("bizinttype", setBusinessInteriorTypeCommand, "<interior template name/business id>", getStaffFlagValue("manageBusinesses"), true, true, "Changes the business' interior"), commandData("bizinttype", setBusinessInteriorTypeCommand, "<interior template name/business id>", getStaffFlagValue("ManageBusinesses"), true, true, "Changes the business' interior"),
commandData("bizdefaultitems", giveDefaultItemsToBusinessCommand, "<item template>", getStaffFlagValue("manageItems"), true, true, "Gives the business the default items based on template name"), commandData("bizdefaultitems", giveDefaultItemsToBusinessCommand, "<item template>", getStaffFlagValue("ManageItems"), true, true, "Gives the business the default items based on template name"),
commandData("bizdelflooritems", deleteBusinessFloorItemsCommand, "", getStaffFlagValue("manageItems"), true, true, "Destroys all items on the business floor (for-sale items)"), commandData("bizdelflooritems", deleteBusinessFloorItemsCommand, "", getStaffFlagValue("ManageItems"), true, true, "Destroys all items on the business floor (for-sale items)"),
commandData("bizdelstorageitems", deleteBusinessStorageItemsCommand, "", getStaffFlagValue("manageItems"), true, true, "Destroys all items in the business's storage"), commandData("bizdelstorageitems", deleteBusinessStorageItemsCommand, "", getStaffFlagValue("ManageItems"), true, true, "Destroys all items in the business's storage"),
commandData("bizdealership", setBusinessEntranceLabelToDealershipCommand, "", getStaffFlagValue("manageBusinesses"), true, true, "Sets the business's door label to vehicle dealership"), commandData("bizdealership", setBusinessEntranceLabelToDealershipCommand, "", getStaffFlagValue("ManageBusinesses"), true, true, "Sets the business's door label to vehicle dealership"),
], ],
chat: [ chat: [
commandData("me", meActionCommand, "<message>", getStaffFlagValue("none"), true, false, "Shows a custom action message in chat"), commandData("me", meActionCommand, "<message>", getStaffFlagValue("None"), true, false, "Shows a custom action message in chat"),
commandData("do", doActionCommand, "<message>", getStaffFlagValue("none"), true, false, "Shows a custom action description in chat"), commandData("do", doActionCommand, "<message>", getStaffFlagValue("None"), true, false, "Shows a custom action description in chat"),
commandData("s", shoutCommand, "<message>", getStaffFlagValue("none"), true, false, "Shout a message to others in the area"), commandData("s", shoutCommand, "<message>", getStaffFlagValue("None"), true, false, "Shout a message to others in the area"),
commandData("shout", shoutCommand, "<message>", getStaffFlagValue("none"), true, false, "Shout a message to others in the area"), commandData("shout", shoutCommand, "<message>", getStaffFlagValue("None"), true, false, "Shout a message to others in the area"),
commandData("talk", talkCommand, "<message>", getStaffFlagValue("none"), true, false, "Say a message to others nearby"), commandData("talk", talkCommand, "<message>", getStaffFlagValue("None"), true, false, "Say a message to others nearby"),
commandData("local", talkCommand, "<message>", getStaffFlagValue("none"), true, false, "Say a message to others nearby"), commandData("local", talkCommand, "<message>", getStaffFlagValue("None"), true, false, "Say a message to others nearby"),
commandData("l", talkCommand, "<message>", getStaffFlagValue("none"), true, false, "Say a message to others nearby"), commandData("l", talkCommand, "<message>", getStaffFlagValue("None"), true, false, "Say a message to others nearby"),
commandData("w", whisperCommand, "<message>", getStaffFlagValue("none"), true, false, "Whisper a message to players very close to you"), commandData("w", whisperCommand, "<message>", getStaffFlagValue("None"), true, false, "Whisper a message to players very close to you"),
commandData("whisper", whisperCommand, "<message>", getStaffFlagValue("none"), true, false, "Whisper a message to players very close to you"), commandData("whisper", whisperCommand, "<message>", getStaffFlagValue("None"), true, false, "Whisper a message to players very close to you"),
commandData("clanchat", clanChatCommand, "<message>", getStaffFlagValue("none"), true, false, "Sends an OOC chat message to members in your clan"), commandData("clanchat", clanChatCommand, "<message>", getStaffFlagValue("None"), true, false, "Sends an OOC chat message to members in your clan"),
commandData("clan", clanChatCommand, "<message>", getStaffFlagValue("none"), true, false, "Sends an OOC chat message to members in your clan"), commandData("clan", clanChatCommand, "<message>", getStaffFlagValue("None"), true, false, "Sends an OOC chat message to members in your clan"),
commandData("c", clanChatCommand, "<message>", getStaffFlagValue("none"), true, false, "Sends an OOC chat message to members in your clan"), commandData("c", clanChatCommand, "<message>", getStaffFlagValue("None"), true, false, "Sends an OOC chat message to members in your clan"),
commandData("adminchat", adminChatCommand, "<message>", getStaffFlagValue("basicModeration"), true, true, "Sends an OOC chat message to other admins"), commandData("adminchat", adminChatCommand, "<message>", getStaffFlagValue("BasicModeration"), true, true, "Sends an OOC chat message to other admins"),
commandData("a", adminChatCommand, "<message>", getStaffFlagValue("basicModeration"), true, true, "Sends an OOC chat message to other admins"), commandData("a", adminChatCommand, "<message>", getStaffFlagValue("BasicModeration"), true, true, "Sends an OOC chat message to other admins"),
commandData("achat", adminChatCommand, "<message>", getStaffFlagValue("basicModeration"), true, true, "Sends an OOC chat message to other admins"), commandData("achat", adminChatCommand, "<message>", getStaffFlagValue("BasicModeration"), true, true, "Sends an OOC chat message to other admins"),
commandData("m", megaphoneChatCommand, "<message>", getStaffFlagValue("none"), true, true, "Shouts a message over a megaphone (portable bullhorn/loudspeaker)"), commandData("m", megaphoneChatCommand, "<message>", getStaffFlagValue("None"), true, true, "Shouts a message over a megaphone (portable bullhorn/loudspeaker)"),
], ],
clan: [ clan: [
commandData("clans", listClansCommand, "[search text]", getStaffFlagValue("none"), true, true, "List clans (search by partial name, if provided)"), commandData("clans", listClansCommand, "[search text]", getStaffFlagValue("None"), true, true, "List clans (search by partial name, if provided)"),
commandData("clanranks", listClanRanksCommand, "[clan name]", getStaffFlagValue("none"), true, true, "Shows a list of a clan's ranks"), commandData("clanranks", listClanRanksCommand, "[clan name]", getStaffFlagValue("None"), true, true, "Shows a list of a clan's ranks"),
commandData("clanflags", showClanFlagListCommand, "", getStaffFlagValue("none"), true, true, "Shows a list of clan permission flags"), commandData("clanflags", showClanFlagListCommand, "", getStaffFlagValue("None"), true, true, "Shows a list of clan permission flags"),
commandData("addclan", createClanCommand, "<name>", getStaffFlagValue("manageClans"), true, true, "Creates an new empty, unowned clan."), commandData("addclan", createClanCommand, "<name>", getStaffFlagValue("ManageClans"), true, true, "Creates an new empty, unowned clan."),
commandData("delclan", deleteClanCommand, "<clan id>", getStaffFlagValue("manageClans"), true, true, "Deletes a clan by ID or name"), commandData("delclan", deleteClanCommand, "<clan id>", getStaffFlagValue("ManageClans"), true, true, "Deletes a clan by ID or name"),
commandData("clanaddrank", createClanRankCommand, "<rank id> <name>", getStaffFlagValue("none"), true, true, "Adds a clan rank"), commandData("clanaddrank", createClanRankCommand, "<rank id> <name>", getStaffFlagValue("None"), true, true, "Adds a clan rank"),
commandData("clandelrank", deleteClanRankCommand, "<rank name>", getStaffFlagValue("none"), true, true, "Removes a clan rank"), commandData("clandelrank", deleteClanRankCommand, "<rank name>", getStaffFlagValue("None"), true, true, "Removes a clan rank"),
commandData("clansetrank", setClanMemberRankCommand, "<player name/id> <rank name>", getStaffFlagValue("none"), true, true, "Sets the rank of a clan member"), commandData("clansetrank", setClanMemberRankCommand, "<player name/id> <rank name>", getStaffFlagValue("None"), true, true, "Sets the rank of a clan member"),
commandData("clanowner", setClanOwnerCommand, "<player name/id>", getStaffFlagValue("none"), true, true, "Gives ownership of the clan to a player"), commandData("clanowner", setClanOwnerCommand, "<player name/id>", getStaffFlagValue("None"), true, true, "Gives ownership of the clan to a player"),
commandData("clantag", setClanTagCommand, "<tag>", getStaffFlagValue("none"), true, true, "Sets a clan's main tag"), commandData("clantag", setClanTagCommand, "<tag>", getStaffFlagValue("None"), true, true, "Sets a clan's main tag"),
commandData("clanranktag", setClanRankTagCommand, "<rank name/id> <tag>", getStaffFlagValue("none"), true, true, "Sets a clan rank's custom tag"), commandData("clanranktag", setClanRankTagCommand, "<rank name/id> <tag>", getStaffFlagValue("None"), true, true, "Sets a clan rank's custom tag"),
commandData("clanmembertag", setClanMemberTagCommand, "<player name/id> <tag>", getStaffFlagValue("none"), true, true, "Sets a clan members's custom tag"), commandData("clanmembertag", setClanMemberTagCommand, "<player name/id> <tag>", getStaffFlagValue("None"), true, true, "Sets a clan members's custom tag"),
commandData("clanrankname", setClanRankTitleCommand, "<rank name/id> <new name>", getStaffFlagValue("none"), true, true, "Sets a clan rank's title"), commandData("clanrankname", setClanRankTitleCommand, "<rank name/id> <new name>", getStaffFlagValue("None"), true, true, "Sets a clan rank's title"),
commandData("clanranklevel", setClanRankLevelCommand, "<rank name/id> <new level>", getStaffFlagValue("none"), true, true, "Sets a clan rank's level"), commandData("clanranklevel", setClanRankLevelCommand, "<rank name/id> <new level>", getStaffFlagValue("None"), true, true, "Sets a clan rank's level"),
//commandData("clanrankenabled", toggleClanRankEnabledCommand, "<rank name/id>", getStaffFlagValue("none"), true, true, "Enables/disables a clan rank"), //commandData("clanrankenabled", toggleClanRankEnabledCommand, "<rank name/id>", getStaffFlagValue("None"), true, true, "Enables/disables a clan rank"),
commandData("clanmembertitle", setClanMemberTitleCommand, "<player name/id> <title>", getStaffFlagValue("none"), true, true, "Sets a clan members's custom title"), commandData("clanmembertitle", setClanMemberTitleCommand, "<player name/id> <title>", getStaffFlagValue("None"), true, true, "Sets a clan members's custom title"),
commandData("clanaddrankflag", addClanRankFlagCommand, "<rank name/id> <flag name>", getStaffFlagValue("none"), true, true, "Gives a clan rank a clan permission."), commandData("clanaddrankflag", addClanRankFlagCommand, "<rank name/id> <flag name>", getStaffFlagValue("None"), true, true, "Gives a clan rank a clan permission."),
//commandData("clanrankflags", showClanRankFlagsCommand, "<rank name/id>", getStaffFlagValue("none"), true, true, "Lists a clan rank's permission flags"), commandData("clanrankflags", showClanRankFlagsCommand, "<rank name/id>", getStaffFlagValue("None"), true, true, "Lists a clan rank's permission flags"),
commandData("clandelrankflag", removeClanRankFlagCommand, "<rank name/id> <flag name>", getStaffFlagValue("none"), true, true, "Takes a clan permission from a clan rank"), commandData("clandelrankflag", removeClanRankFlagCommand, "<rank name/id> <flag name>", getStaffFlagValue("None"), true, true, "Takes a clan permission from a clan rank"),
//commandData("clanrankflags", listClanRankFlagsCommand, "<rank name/id>", getStaffFlagValue("none"), true, true, "Shows a list of a clan rank's current permission flags"), commandData("clanaddmemberflag", addClanMemberFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("None"), true, true, "Gives a clan member a clan permission"),
commandData("clanaddmemberflag", addClanMemberFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("none"), true, true, "Gives a clan member a clan permission"), commandData("clandelmemberflag", removeClanMemberFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("None"), true, true, "Takes a clan permission from a clan member"),
commandData("clandelmemberflag", removeClanMemberFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("none"), true, true, "Takes a clan permission from a clan member"),
], ],
class: [], class: [],
client: [], client: [],
colour: [], colour: [],
command: [ command: [
commandData("cmdenabletype", enableAllCommandsByType, "<type>", getStaffFlagValue("developer"), true, true, "Enables all commands by type."), commandData("cmdenabletype", enableAllCommandsByType, "<type>", getStaffFlagValue("Developer"), true, true, "Enables all commands by type."),
commandData("cmddisabletype", disableAllCommandsByType, "<type>", getStaffFlagValue("developer"), true, true, "Disables all commands by type."), commandData("cmddisabletype", disableAllCommandsByType, "<type>", getStaffFlagValue("Developer"), true, true, "Disables all commands by type."),
commandData("cmdenable", enableCommand, "<command>", getStaffFlagValue("developer"), true, true, "Enable a specific command"), commandData("cmdenable", enableCommand, "<command>", getStaffFlagValue("Developer"), true, true, "Enable a specific command"),
commandData("cmddisable", disableCommand, "<command>", getStaffFlagValue("developer"), true, true, "Disables a specific command"), commandData("cmddisable", disableCommand, "<command>", getStaffFlagValue("Developer"), true, true, "Disables a specific command"),
], ],
config: [ config: [
commandData("settime", setTimeCommand, "<hour> [minute]", getStaffFlagValue("manageServer"), true, true, "Sets the time. Hours are required, minute is optional and will default to 0"), commandData("settime", setTimeCommand, "<hour> [minute]", getStaffFlagValue("ManageServer"), true, true, "Sets the time. Hours are required, minute is optional and will default to 0"),
commandData("setminuteduration", setMinuteDurationCommand, "<time in ms>", getStaffFlagValue("manageServer"), true, true, "Sets how long a minute lasts in milliseconds. 60000 is real time."), commandData("setminuteduration", setMinuteDurationCommand, "<time in ms>", getStaffFlagValue("ManageServer"), true, true, "Sets how long a minute lasts in milliseconds. 60000 is real time."),
commandData("setweather", setWeatherCommand, "<weather id/name>", getStaffFlagValue("manageServer"), true, true, "Change the weather to specified type."), commandData("setweather", setWeatherCommand, "<weather id/name>", getStaffFlagValue("ManageServer"), true, true, "Change the weather to specified type."),
commandData("setsnow", setSnowingCommand, "<falling snow> <ground snow>", getStaffFlagValue("manageServer"), true, true, "Toggles winter/snow"), commandData("setsnow", setSnowingCommand, "<falling snow> <ground snow>", getStaffFlagValue("ManageServer"), true, true, "Toggles winter/snow"),
commandData("setlogo", toggleServerLogoCommand, "<0/1 state>", getStaffFlagValue("manageServer"), true, true, "Toggles the corner server logo display on/off"), commandData("setlogo", toggleServerLogoCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles the corner server logo display on/off"),
commandData("setgui", toggleServerGUICommand, "<0/1 state>", getStaffFlagValue("manageServer"), true, true, "Toggles server GUI on/off"), commandData("setgui", toggleServerGUICommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles server GUI on/off"),
commandData("setguicolours", setServerGUIColoursCommand, "<red> <green> <blue>", getStaffFlagValue("manageServer"), true, true), commandData("setguicolours", setServerGUIColoursCommand, "<red> <green> <blue>", getStaffFlagValue("ManageServer"), true, true),
commandData("newcharspawn", setNewCharacterSpawnPositionCommand, "", getStaffFlagValue("manageServer"), true, true, "Sets the starting spawn position for new characters"), commandData("newcharspawn", setNewCharacterSpawnPositionCommand, "", getStaffFlagValue("ManageServer"), true, true, "Sets the starting spawn position for new characters"),
commandData("newcharcash", setNewCharacterMoneyCommand, "<amount>", getStaffFlagValue("manageServer"), true, true, "Sets the starting money for new characters"), commandData("newcharcash", setNewCharacterMoneyCommand, "<amount>", getStaffFlagValue("ManageServer"), true, true, "Sets the starting money for new characters"),
commandData("newcharskin", setNewCharacterSkinCommand, "[skin id]", getStaffFlagValue("manageServer"), true, true, "Sets the default skin for new characters"), commandData("newcharskin", setNewCharacterSkinCommand, "[skin id]", getStaffFlagValue("ManageServer"), true, true, "Sets the default skin for new characters"),
commandData("jobinfo", getJobInfoCommand, "", getStaffFlagValue("none"), true, true, "Get info for nearest or specified job"), commandData("jobinfo", getJobInfoCommand, "", getStaffFlagValue("None"), true, true, "Get info for nearest or specified job"),
commandData("joblocinfo", getJobLocationInfoCommand, "", getStaffFlagValue("none"), true, true, "Get info for nearest or specified job location"), commandData("joblocinfo", getJobLocationInfoCommand, "", getStaffFlagValue("None"), true, true, "Get info for nearest or specified job location"),
commandData("reloadcfg", reloadServerConfigurationCommand, "", getStaffFlagValue("manageServer"), true, true, "Loads and applies the server configuration"), commandData("reloadcfg", reloadServerConfigurationCommand, "", getStaffFlagValue("ManageServer"), true, true, "Loads and applies the server configuration"),
commandData("reloademailcfg", reloadEmailConfigurationCommand, "", getStaffFlagValue("developer"), true, true, "Loads and applies the email configuration"), commandData("reloademailcfg", reloadEmailConfigurationCommand, "", getStaffFlagValue("Developer"), true, true, "Loads and applies the email configuration"),
commandData("reloaddbcfg", reloadDatabaseConfigurationCommand, "", getStaffFlagValue("developer"), true, true, "Loads and applies the database configuration"), commandData("reloaddbcfg", reloadDatabaseConfigurationCommand, "", getStaffFlagValue("Developer"), true, true, "Loads and applies the database configuration"),
], ],
core: [], core: [],
database: [ database: [
commandData("dbquery", executeDatabaseQueryCommand, "<query>", getStaffFlagValue("developer"), true, true), commandData("dbquery", executeDatabaseQueryCommand, "<query>", getStaffFlagValue("Developer"), true, true),
//commandData("dbinfo", getDatabaseInfoCommand, "", getStaffFlagValue("developer"), true, true), //commandData("dbinfo", getDatabaseInfoCommand, "", getStaffFlagValue("Developer"), true, true),
], ],
developer: [ developer: [
commandData("scode", executeServerCodeCommand, "<code>", getStaffFlagValue("developer"), true, true), commandData("scode", executeServerCodeCommand, "<code>", getStaffFlagValue("Developer"), true, true),
commandData("ccode", executeClientCodeCommand, "<code>", getStaffFlagValue("developer"), true, true), commandData("ccode", executeClientCodeCommand, "<code>", getStaffFlagValue("Developer"), true, true),
commandData("gmx", restartGameModeCommand, "", getStaffFlagValue("developer"), true, true), commandData("gmx", restartGameModeCommand, "", getStaffFlagValue("Developer"), true, true),
commandData("saveall", saveAllServerDataCommand, "", getStaffFlagValue("developer"), true, true), commandData("saveall", saveAllServerDataCommand, "", getStaffFlagValue("Developer"), true, true),
commandData("docmd", simulateCommandForPlayerCommand, "<player name/id> <command> [params]", getStaffFlagValue("developer"), true, true), commandData("docmd", simulateCommandForPlayerCommand, "<player name/id> <command> [params]", getStaffFlagValue("Developer"), true, true),
commandData("docmdall", simulateCommandForAllPlayersCommand, "<command> [params]", getStaffFlagValue("developer"), true, true), commandData("docmdall", simulateCommandForAllPlayersCommand, "<command> [params]", getStaffFlagValue("Developer"), true, true),
commandData("addloglvl", addServerLogLevelCommand, "<log level name>", getStaffFlagValue("developer"), true, true), commandData("addloglvl", addServerLogLevelCommand, "<log level name>", getStaffFlagValue("Developer"), true, true),
commandData("delloglvl", removeServerLogLevelCommand, "<log level name>", getStaffFlagValue("developer"), true, true), commandData("delloglvl", removeServerLogLevelCommand, "<log level name>", getStaffFlagValue("Developer"), true, true),
commandData("loglvl", getServerLogLevelCommand, "<log level name>", getStaffFlagValue("developer"), true, true), commandData("loglvl", getServerLogLevelCommand, "<log level name>", getStaffFlagValue("Developer"), true, true),
commandData("nosave", togglePauseSavingToDatabaseCommand, "", getStaffFlagValue("developer"), true, true), commandData("nosave", togglePauseSavingToDatabaseCommand, "", getStaffFlagValue("Developer"), true, true),
commandData("streamurlall", streamAudioURLToAllPlayersCommand, "<url> <volume>", getStaffFlagValue("developer"), true, true), commandData("streamurlall", streamAudioURLToAllPlayersCommand, "<url> <volume>", getStaffFlagValue("Developer"), true, true),
commandData("streamnameall", streamAudioNameToAllPlayersCommand, "<name> <volume>", getStaffFlagValue("developer"), true, true), commandData("streamnameall", streamAudioNameToAllPlayersCommand, "<name> <volume>", getStaffFlagValue("Developer"), true, true),
commandData("forceresetpass", forceAccountPasswordResetCommand, "<account name>", getStaffFlagValue("developer"), true, true), commandData("forceresetpass", forceAccountPasswordResetCommand, "<account name>", getStaffFlagValue("Developer"), true, true),
], ],
discord: [], discord: [],
email: [ email: [
commandData("testemail", testEmailCommand, "<email address>", getStaffFlagValue("developer"), true, true), commandData("testemail", testEmailCommand, "<email address>", getStaffFlagValue("Developer"), true, true),
], ],
help: [ help: [
commandData("help", helpCommand, "", getStaffFlagValue("none"), false, false), commandData("help", helpCommand, "", getStaffFlagValue("None"), false, false),
commandData("commands", helpCommand, "", getStaffFlagValue("none"), false, false), commandData("commands", helpCommand, "", getStaffFlagValue("None"), false, false),
commandData("cmds", helpCommand, "", getStaffFlagValue("none"), false, false), commandData("cmds", helpCommand, "", getStaffFlagValue("None"), false, false),
commandData("info", helpCommand, "", getStaffFlagValue("none"), false, false), commandData("info", helpCommand, "", getStaffFlagValue("None"), false, false),
commandData("veh", helpGetCarCommand, "", getStaffFlagValue("none"), false, false), commandData("veh", helpGetCarCommand, "", getStaffFlagValue("None"), false, false),
commandData("v", helpGetCarCommand, "", getStaffFlagValue("none"), false, false), commandData("v", helpGetCarCommand, "", getStaffFlagValue("None"), false, false),
commandData("car", helpGetCarCommand, "", getStaffFlagValue("none"), false, false), commandData("car", helpGetCarCommand, "", getStaffFlagValue("None"), false, false),
commandData("cars", helpGetCarCommand, "", getStaffFlagValue("none"), false, false), commandData("cars", helpGetCarCommand, "", getStaffFlagValue("None"), false, false),
commandData("spawncar", helpGetCarCommand, "", getStaffFlagValue("none"), false, false), commandData("spawncar", helpGetCarCommand, "", getStaffFlagValue("None"), false, false),
commandData("spawnveh", helpGetCarCommand, "", getStaffFlagValue("none"), false, false), commandData("spawnveh", helpGetCarCommand, "", getStaffFlagValue("None"), false, false),
commandData("skin", helpGetSkinCommand, "", getStaffFlagValue("none"), false, false), commandData("skin", helpGetSkinCommand, "", getStaffFlagValue("None"), false, false),
commandData("skins", helpGetSkinCommand, "", getStaffFlagValue("none"), false, false), commandData("skins", helpGetSkinCommand, "", getStaffFlagValue("None"), false, false),
commandData("clothes", helpGetSkinCommand, "", getStaffFlagValue("none"), false, false), commandData("clothes", helpGetSkinCommand, "", getStaffFlagValue("None"), false, false),
commandData("setskin", helpGetSkinCommand, "", getStaffFlagValue("none"), false, false), commandData("setskin", helpGetSkinCommand, "", getStaffFlagValue("None"), false, false),
commandData("changeskin", helpGetSkinCommand, "", getStaffFlagValue("none"), false, false), commandData("changeskin", helpGetSkinCommand, "", getStaffFlagValue("None"), false, false),
], ],
house: [ house: [
commandData("addhouse", createHouseCommand, "<description>", getStaffFlagValue("manageHouses"), true, false), commandData("addhouse", createHouseCommand, "<description>", getStaffFlagValue("ManageHouses"), true, false),
commandData("delhouse", deleteHouseCommand, "", getStaffFlagValue("manageHouses"), true, false), commandData("delhouse", deleteHouseCommand, "", getStaffFlagValue("ManageHouses"), true, false),
commandData("housereloadall", reloadAllHousesCommand, "", getStaffFlagValue("manageHouses"), true, false), commandData("housereloadall", reloadAllHousesCommand, "", getStaffFlagValue("ManageHouses"), true, false),
commandData("houseinfo", getHouseInfoCommand, "", getStaffFlagValue("none"), true, false), commandData("houseinfo", getHouseInfoCommand, "", getStaffFlagValue("None"), true, false),
commandData("housebuy", buyHouseCommand, "", getStaffFlagValue("none"), true, false), commandData("housebuy", buyHouseCommand, "", getStaffFlagValue("None"), true, false),
commandData("houseclan", setHouseClanCommand, "", getStaffFlagValue("none"), true, false), commandData("houseclan", setHouseClanCommand, "", getStaffFlagValue("None"), true, false),
commandData("housedesc", setHouseDescriptionCommand, "", getStaffFlagValue("manageHouses"), true, false), commandData("housedesc", setHouseDescriptionCommand, "", getStaffFlagValue("ManageHouses"), true, false),
commandData("houselock", lockUnlockHouseCommand, "", getStaffFlagValue("none"), true, false), commandData("houselock", lockUnlockHouseCommand, "", getStaffFlagValue("None"), true, false),
commandData("houselights", toggleHouseInteriorLightsCommand, "", getStaffFlagValue("none"), true, false), commandData("houselights", toggleHouseInteriorLightsCommand, "", getStaffFlagValue("None"), true, false),
commandData("houseowner", setHouseOwnerCommand, "", getStaffFlagValue("none"), true, false), commandData("houseowner", setHouseOwnerCommand, "", getStaffFlagValue("None"), true, false),
commandData("housebuyprice", setHouseBuyPriceCommand, "", getStaffFlagValue("none"), true, false), commandData("housebuyprice", setHouseBuyPriceCommand, "", getStaffFlagValue("None"), true, false),
commandData("houserentprice", setHouseRentPriceCommand, "", getStaffFlagValue("none"), true, false), commandData("houserentprice", setHouseRentPriceCommand, "", getStaffFlagValue("None"), true, false),
commandData("houseblip", setHouseBlipCommand, "<type name/model id>", getStaffFlagValue("manageHouses"), true, true), commandData("houseblip", setHouseBlipCommand, "<type name/model id>", getStaffFlagValue("ManageHouses"), true, true),
commandData("housepickup", setHousePickupCommand, "<type name/model id>", getStaffFlagValue("manageHouses"), true, true), commandData("housepickup", setHousePickupCommand, "<type name/model id>", getStaffFlagValue("ManageHouses"), true, true),
commandData("houseentrance", moveHouseEntranceCommand, "", getStaffFlagValue("manageHouses"), true, true), commandData("houseentrance", moveHouseEntranceCommand, "", getStaffFlagValue("ManageHouses"), true, true),
commandData("houseexit", moveHouseExitCommand, "", getStaffFlagValue("manageHouses"), true, true), commandData("houseexit", moveHouseExitCommand, "", getStaffFlagValue("ManageHouses"), true, true),
commandData("houseinttype", setHouseInteriorTypeCommand, "<interior template name/business id>", getStaffFlagValue("manageHouses"), true, true), commandData("houseinttype", setHouseInteriorTypeCommand, "<interior template name/business id>", getStaffFlagValue("ManageHouses"), true, true),
], ],
item: [ item: [
commandData("i", playerSwitchHotBarSlotCommand, "<slot id>", getStaffFlagValue("none"), true, false, "Switches to the item in the specified slot of your inventory."), commandData("i", playerSwitchHotBarSlotCommand, "<slot id>", getStaffFlagValue("None"), true, false, "Switches to the item in the specified slot of your inventory."),
commandData("addgrounditem", createGroundItemCommand, "<item name/id>", getStaffFlagValue("manageItems"), true, false, "Spawns a new item on the ground at your position."), commandData("addgrounditem", createGroundItemCommand, "<item name/id>", getStaffFlagValue("ManageItems"), true, false, "Spawns a new item on the ground at your position."),
commandData("additem", createItemCommand, "<item name/id>", getStaffFlagValue("manageItems"), true, false, "Spawns a new item in your hotbar inventory."), commandData("additem", createItemCommand, "<item name/id>", getStaffFlagValue("ManageItems"), true, false, "Spawns a new item in your hotbar inventory."),
commandData("delgrounditem", deleteGroundItemCommand, "", getStaffFlagValue("manageItems"), true, false, "Destroys the nearest item on the ground."), commandData("delgrounditem", deleteGroundItemCommand, "", getStaffFlagValue("ManageItems"), true, false, "Destroys the nearest item on the ground."),
commandData("pickup", pickupItemCommand, "", getStaffFlagValue("none"), true, false, "Picks up the nearest item."), commandData("pickup", pickupItemCommand, "", getStaffFlagValue("None"), true, false, "Picks up the nearest item."),
commandData("drop", dropItemCommand, "[slot]", getStaffFlagValue("none"), true, false, "Drops your currently equipped item or the item in the specified slot"), commandData("drop", dropItemCommand, "[slot]", getStaffFlagValue("None"), true, false, "Drops your currently equipped item or the item in the specified slot"),
commandData("put", putItemCommand, "[slot]", getStaffFlagValue("none"), true, false, "Puts an item from your inventory into the nearest item place (vehicle trunk/dash, house, business, etc)"), commandData("put", putItemCommand, "[slot]", getStaffFlagValue("None"), true, false, "Puts an item from your inventory into the nearest item place (vehicle trunk/dash, house, business, etc)"),
commandData("take", takeItemCommand, "[slot]", getStaffFlagValue("none"), true, false, "Takes an item from the nearest item place (vehicle trunk, dash, house, business, etc)"), commandData("take", takeItemCommand, "[slot]", getStaffFlagValue("None"), true, false, "Takes an item from the nearest item place (vehicle trunk, dash, house, business, etc)"),
commandData("use", useItemCommand, "", getStaffFlagValue("none"), true, false, "Uses the currently equipped item"), commandData("use", useItemCommand, "", getStaffFlagValue("None"), true, false, "Uses the currently equipped item"),
commandData("inv", listPlayerInventoryCommand, "", getStaffFlagValue("none"), true, false, "Shows the items in your inventory"), commandData("inv", listPlayerInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in your inventory"),
commandData("inventory", listPlayerInventoryCommand, "", getStaffFlagValue("none"), true, false, "Shows the items in your inventory"), commandData("inventory", listPlayerInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in your inventory"),
commandData("items", listItemInventoryCommand, "", getStaffFlagValue("none"), true, false, "Shows the items in your inventory"), commandData("items", listItemInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in your inventory"),
commandData("houseitems", listHouseInventoryCommand, "", getStaffFlagValue("none"), true, false, "Shows the items in the house's storage"), commandData("houseitems", listHouseInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in the house's storage"),
commandData("bizstorage", listBusinessStorageInventoryCommand, "", getStaffFlagValue("none"), true, false, "Shows the items in the business's extra storage (not buyable)"), commandData("bizstorage", listBusinessStorageInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in the business's extra storage (not buyable)"),
commandData("bizfloor", listBusinessFloorInventoryCommand, "", getStaffFlagValue("none"), true, false, "Shows the items that can be bought from the business"), commandData("bizfloor", listBusinessFloorInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items that can be bought from the business"),
commandData("buylist", listBusinessFloorInventoryCommand, "", getStaffFlagValue("none"), true, false, "Shows the items that can be bought from the business"), commandData("buylist", listBusinessFloorInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items that can be bought from the business"),
commandData("power", toggleItemEnabledCommand, "", getStaffFlagValue("none"), true, false), commandData("power", toggleItemEnabledCommand, "", getStaffFlagValue("None"), true, false),
commandData("freq", setWalkieTalkieFrequencyCommand, "[frequncy number]", getStaffFlagValue("none"), true, false), commandData("freq", setWalkieTalkieFrequencyCommand, "[frequncy number]", getStaffFlagValue("None"), true, false),
//commandData("call", callWithPhoneCommand, "[number]", getStaffFlagValue("none"), true, false), //commandData("call", callWithPhoneCommand, "[number]", getStaffFlagValue("None"), true, false),
//commandData("speakerphone", togglePhoneSpeakerCommand, "", getStaffFlagValue("none"), true, false), //commandData("speakerphone", togglePhoneSpeakerCommand, "", getStaffFlagValue("None"), true, false),
commandData("radio", walkieTalkieChatCommand, "", getStaffFlagValue("none"), true, false), commandData("radio", walkieTalkieChatCommand, "", getStaffFlagValue("None"), true, false),
commandData("r", walkieTalkieChatCommand, "", getStaffFlagValue("none"), true, false), commandData("r", walkieTalkieChatCommand, "", getStaffFlagValue("None"), true, false),
commandData("additemtype", createItemTypeCommand, "<name>", getStaffFlagValue("manageItems"), true, false), commandData("additemtype", createItemTypeCommand, "<name>", getStaffFlagValue("ManageItems"), true, false),
commandData("itemtypeusetype", setItemTypeUseTypeCommand, "<item type> <use type>", getStaffFlagValue("manageItems"), true, false), commandData("itemtypeusetype", setItemTypeUseTypeCommand, "<item type> <use type>", getStaffFlagValue("ManageItems"), true, false),
commandData("itemtypeuseval", setItemTypeUseValueCommand, "<item type> <use value>", getStaffFlagValue("manageItems"), true, false), commandData("itemtypeuseval", setItemTypeUseValueCommand, "<item type> <use value>", getStaffFlagValue("ManageItems"), true, false),
commandData("itemtypeorderprice", setItemTypeOrderPriceCommand, "<item type> <price>", getStaffFlagValue("manageItems"), true, false), commandData("itemtypeorderprice", setItemTypeOrderPriceCommand, "<item type> <price>", getStaffFlagValue("ManageItems"), true, false),
commandData("itemtyperiskmult", setItemTypeRiskMultiplierCommand, "<item type> <risk multiplier>", getStaffFlagValue("manageItems"), true, false), commandData("itemtyperiskmult", setItemTypeRiskMultiplierCommand, "<item type> <risk multiplier>", getStaffFlagValue("ManageItems"), true, false),
commandData("itemtypeenabled", toggleItemTypeEnabledCommand, "<item type>", getStaffFlagValue("manageItems"), true, false), commandData("itemtypeenabled", toggleItemTypeEnabledCommand, "<item type>", getStaffFlagValue("ManageItems"), true, false),
commandData("delplritem", deleteItemInPlayerInventoryCommand, "<player name/id> <item slot>", getStaffFlagValue("manageItems"), true, false), commandData("delplritem", deleteItemInPlayerInventoryCommand, "<player name/id> <item slot>", getStaffFlagValue("ManageItems"), true, false),
commandData("delplritems", deleteAllItemsInPlayerInventoryCommand, "<player name/id>", getStaffFlagValue("manageItems"), true, false), commandData("delplritems", deleteAllItemsInPlayerInventoryCommand, "<player name/id>", getStaffFlagValue("ManageItems"), true, false),
], ],
job: [ job: [
commandData("takejob", takeJobCommand, "", getStaffFlagValue("none"), true, false), commandData("takejob", takeJobCommand, "", getStaffFlagValue("None"), true, false),
commandData("startwork", startWorkingCommand, "", getStaffFlagValue("none"), true, false), commandData("startwork", startWorkingCommand, "", getStaffFlagValue("None"), true, false),
commandData("stopwork", stopWorkingCommand, "", getStaffFlagValue("none"), true, false), commandData("stopwork", stopWorkingCommand, "", getStaffFlagValue("None"), true, false),
commandData("startjob", startWorkingCommand, "", getStaffFlagValue("none"), true, false), commandData("startjob", startWorkingCommand, "", getStaffFlagValue("None"), true, false),
commandData("stopjob", stopWorkingCommand, "", getStaffFlagValue("none"), true, false), commandData("stopjob", stopWorkingCommand, "", getStaffFlagValue("None"), true, false),
commandData("quitjob", quitJobCommand, "", getStaffFlagValue("none"), true, false), commandData("quitjob", quitJobCommand, "", getStaffFlagValue("None"), true, false),
commandData("uniform", jobUniformCommand, "[uniform]", getStaffFlagValue("none"), true, false), commandData("uniform", jobUniformCommand, "[uniform]", getStaffFlagValue("None"), true, false),
commandData("equip", jobEquipmentCommand, "[equipment]", getStaffFlagValue("none"), true, false), commandData("equip", jobEquipmentCommand, "[equipment]", getStaffFlagValue("None"), true, false),
commandData("department", jobDepartmentRadioCommand, "", getStaffFlagValue("none"), true, false), commandData("department", jobDepartmentRadioCommand, "", getStaffFlagValue("None"), true, false),
commandData("d", jobDepartmentRadioCommand, "", getStaffFlagValue("none"), true, false), commandData("d", jobDepartmentRadioCommand, "", getStaffFlagValue("None"), true, false),
// Taxi // Taxi
commandData("fare", taxiSetFareCommand, "", getStaffFlagValue("none"), true, false), commandData("fare", taxiSetFareCommand, "", getStaffFlagValue("None"), true, false),
// Police // Police
//commandData("tazer", policeTazerCommand, "", getStaffFlagValue("none"), true, false), //commandData("tazer", policeTazerCommand, "", getStaffFlagValue("None"), true, false),
//commandData("cuff", policeCuffCommand, "", getStaffFlagValue("none"), true, false), //commandData("cuff", policeCuffCommand, "", getStaffFlagValue("None"), true, false),
commandData("detain", policeDetainCommand, "", getStaffFlagValue("none"), true, false), commandData("detain", policeDetainCommand, "", getStaffFlagValue("None"), true, false),
commandData("drag", policeDragCommand, "", getStaffFlagValue("none"), true, false), commandData("drag", policeDragCommand, "", getStaffFlagValue("None"), true, false),
commandData("search", policeSearchCommand, "", getStaffFlagValue("none"), true, false), commandData("search", policeSearchCommand, "", getStaffFlagValue("None"), true, false),
// Bus/Garbage // Bus/Garbage
commandData("startroute", jobStartRouteCommand, "", getStaffFlagValue("none"), true, false), commandData("startroute", jobStartRouteCommand, "", getStaffFlagValue("None"), true, false),
commandData("stoproute", jobStopRouteCommand, "", getStaffFlagValue("none"), true, false), commandData("stoproute", jobStopRouteCommand, "", getStaffFlagValue("None"), true, false),
// Admin Job Stuff // Admin Job Stuff
commandData("addjobloc", createJobLocationCommand, "<job name/id>", getStaffFlagValue("manageJobs"), true, false), commandData("addjobloc", createJobLocationCommand, "<job name/id>", getStaffFlagValue("ManageJobs"), true, false),
commandData("deljobloc", deleteJobLocationCommand, "", getStaffFlagValue("manageJobs"), true, false), commandData("deljobloc", deleteJobLocationCommand, "", getStaffFlagValue("ManageJobs"), true, false),
//commandData("jobloctoggle", toggleJobLocationCommand, "", getStaffFlagValue("manageJobs"), true, false), //commandData("jobloctoggle", toggleJobLocationCommand, "", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobwhitelist", toggleJobWhiteListCommand, "[job id]", getStaffFlagValue("manageJobs"), true, false), commandData("jobwhitelist", toggleJobWhiteListCommand, "[job id]", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobblacklist", toggleJobBlackListCommand, "[job id]", getStaffFlagValue("manageJobs"), true, false), commandData("jobblacklist", toggleJobBlackListCommand, "[job id]", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobtoggle", toggleJobEnabledCommand, "[job id]", getStaffFlagValue("manageJobs"), true, false), commandData("jobtoggle", toggleJobEnabledCommand, "[job id]", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobaddplayerwl", addPlayerToJobWhiteListCommand, "<player name/id> [job id]", getStaffFlagValue("manageJobs"), true, false), commandData("jobaddplayerwl", addPlayerToJobWhiteListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobaddplayerbl", addPlayerToJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("manageJobs"), true, false), commandData("jobaddplayerbl", addPlayerToJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobdelplayerbl", removePlayerFromJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("manageJobs"), true, false), commandData("jobdelplayerbl", removePlayerFromJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobdelplayerbl", removePlayerFromJobWhiteListCommand, "<player name/id> [job id]", getStaffFlagValue("manageJobs"), true, false), commandData("jobdelplayerbl", removePlayerFromJobWhiteListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
commandData("jobreloadall", reloadAllJobsCommand, "", getStaffFlagValue("manageJobs"), true, false), commandData("jobreloadall", reloadAllJobsCommand, "", getStaffFlagValue("ManageJobs"), true, false),
], ],
keybind: [ keybind: [
commandData("bindkey", addKeyBindCommand, "<key id/name> <command> [params]", getStaffFlagValue("none"), true, false, "Binds a key to a command and optional parameters"), commandData("bindkey", addKeyBindCommand, "<key id/name> <command> [params]", getStaffFlagValue("None"), true, false, "Binds a key to a command and optional parameters"),
commandData("unbindkey", removeKeyBindCommand, "<key id/name>", getStaffFlagValue("none"), true, false, "Removes an existing keybind from your account"), commandData("unbindkey", removeKeyBindCommand, "<key id/name>", getStaffFlagValue("None"), true, false, "Removes an existing keybind from your account"),
commandData("keybinds", showKeyBindListCommand, "", getStaffFlagValue("none"), true, false, "Shows a list of all your current keybinds"), commandData("keybinds", showKeyBindListCommand, "", getStaffFlagValue("None"), true, false, "Shows a list of all your current keybinds"),
], ],
locale: [], locale: [],
messaging: [], messaging: [],
misc: [ misc: [
commandData("pos", getPositionCommand, "", getStaffFlagValue("basicModeration"), true, false, "Shows your current coordinates"), commandData("pos", getPositionCommand, "", getStaffFlagValue("BasicModeration"), true, false, "Shows your current coordinates"),
commandData("idea", submitIdeaCommand, "<message>", getStaffFlagValue("none"), true, true, "Sends an suggestion/idea to the developers"), commandData("idea", submitIdeaCommand, "<message>", getStaffFlagValue("None"), true, true, "Sends an suggestion/idea to the developers"),
commandData("bug", submitBugReportCommand, "<message>", getStaffFlagValue("none"), true, true, "Submits a bug report"), commandData("bug", submitBugReportCommand, "<message>", getStaffFlagValue("None"), true, true, "Submits a bug report"),
commandData("enter", enterExitPropertyCommand, "", getStaffFlagValue("none"), true, true, "Enters or exists a house/business"), commandData("enter", enterExitPropertyCommand, "", getStaffFlagValue("None"), true, true, "Enters or exists a house/business"),
commandData("cursor", toggleMouseCursorCommand, "", getStaffFlagValue("none"), true, false, "Toggles cursor visibility"), commandData("cursor", toggleMouseCursorCommand, "", getStaffFlagValue("None"), true, false, "Toggles cursor visibility"),
commandData("mousecam", toggleMouseCameraCommand, "", getStaffFlagValue("none"), true, false, "Toggles vehicle mouse camera for games that don't have it"), commandData("mousecam", toggleMouseCameraCommand, "", getStaffFlagValue("None"), true, false, "Toggles vehicle mouse camera for games that don't have it"),
commandData("yes", playerPromptAnswerYesCommand, "", getStaffFlagValue("none"), true, false, "Answers a prompt with YES"), commandData("yes", playerPromptAnswerYesCommand, "", getStaffFlagValue("None"), true, false, "Answers a prompt with YES"),
commandData("no", playerPromptAnswerNoCommand, "", getStaffFlagValue("none"), true, false, "Answers a prompt with NO"), commandData("no", playerPromptAnswerNoCommand, "", getStaffFlagValue("None"), true, false, "Answers a prompt with NO"),
commandData("admins", listOnlineAdminsCommand, "", getStaffFlagValue("none"), true, false, "Shows a list of online admins"), commandData("admins", listOnlineAdminsCommand, "", getStaffFlagValue("None"), true, false, "Shows a list of online admins"),
], ],
moderation: [ moderation: [
commandData("kick", kickClientCommand, "<player name/id> [reason]", getStaffFlagValue("basicModeration"), true, true, "Kicks a player from the server"), commandData("kick", kickClientCommand, "<player name/id> [reason]", getStaffFlagValue("BasicModeration"), true, true, "Kicks a player from the server"),
commandData("mute", muteClientCommand, "<player name/id> [reason]", getStaffFlagValue("basicModeration"), true, true, "Mutes a player, preventing them from using any chat."), commandData("mute", muteClientCommand, "<player name/id> [reason]", getStaffFlagValue("BasicModeration"), true, true, "Mutes a player, preventing them from using any chat."),
commandData("freeze", freezeClientCommand, "<player name/id> [reason]", getStaffFlagValue("basicModeration"), true, true, "Freeze a player, preventing them from moving."), commandData("freeze", freezeClientCommand, "<player name/id> [reason]", getStaffFlagValue("BasicModeration"), true, true, "Freeze a player, preventing them from moving."),
commandData("unmute", unMuteClientCommand, "<player name/id> [reason]", getStaffFlagValue("basicModeration"), true, true, "Unmutes a player, allowing them to chat again."), commandData("unmute", unMuteClientCommand, "<player name/id> [reason]", getStaffFlagValue("BasicModeration"), true, true, "Unmutes a player, allowing them to chat again."),
commandData("unfreeze", unFreezeClientCommand, "<player name/id> [reason]", getStaffFlagValue("basicModeration"), true, true, "Unfreezes a player, allowing them to move again."), commandData("unfreeze", unFreezeClientCommand, "<player name/id> [reason]", getStaffFlagValue("BasicModeration"), true, true, "Unfreezes a player, allowing them to move again."),
commandData("goto", gotoPlayerCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to a player."), commandData("goto", gotoPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a player."),
commandData("gethere", getPlayerCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Teleports a player to you."), commandData("gethere", getPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports a player to you."),
commandData("getveh", getVehicleCommand, "<vehicle id>", getStaffFlagValue("basicModeration"), true, true, "Teleports a vehicle to you."), commandData("getveh", getVehicleCommand, "<vehicle id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports a vehicle to you."),
commandData("returnplr", returnPlayerCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Returns a player to their previous position."), commandData("returnplr", returnPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Returns a player to their previous position."),
commandData("gotopos", gotoPositionCommand, "<x> <y> <z> [int] [vw]", getStaffFlagValue("basicModeration"), true, true, "Teleports you to specific coordinates with optional interior and dimension."), commandData("gotopos", gotoPositionCommand, "<x> <y> <z> [int] [vw]", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to specific coordinates with optional interior and dimension."),
commandData("gotoveh", gotoVehicleCommand, "<vehicle id>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to a vehicle by ID."), commandData("gotoveh", gotoVehicleCommand, "<vehicle id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a vehicle by ID."),
commandData("gotobiz", gotoBusinessCommand, "<business id/name>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to a business by ID or name."), commandData("gotobiz", gotoBusinessCommand, "<business id/name>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a business by ID or name."),
commandData("gotohouse", gotoHouseCommand, "<house id/name>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to a house by ID or description."), commandData("gotohouse", gotoHouseCommand, "<house id/name>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a house by ID or description."),
commandData("gotojob", gotoJobLocationCommand, "<job id/name> <location id>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to a job location by name and location ID."), commandData("gotojob", gotoJobLocationCommand, "<job id/name> <location id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a job location by name and location ID."),
commandData("gotoloc", gotoGameLocationCommand, "<location name>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to a game location by name."), commandData("gotoloc", gotoGameLocationCommand, "<location name>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a game location by name."),
commandData("gotospawn", gotoNewPlayerSpawnCommand, "", getStaffFlagValue("basicModeration"), true, true, "Teleports you to the new player spawn location"), commandData("gotospawn", gotoNewPlayerSpawnCommand, "", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to the new player spawn location"),
commandData("fr", teleportForwardCommand, "<distance in meters>", getStaffFlagValue("basicModeration"), true, true, "Teleports you forward a certain distance in meters."), commandData("fr", teleportForwardCommand, "<distance in meters>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you forward a certain distance in meters."),
commandData("ba", teleportBackwardCommand, "<distance in meters>", getStaffFlagValue("basicModeration"), true, true, "Teleports you backward a certain distance in meters."), commandData("ba", teleportBackwardCommand, "<distance in meters>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you backward a certain distance in meters."),
commandData("lt", teleportLeftCommand, "<distance in meters>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to the left a certain distance in meters."), commandData("lt", teleportLeftCommand, "<distance in meters>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to the left a certain distance in meters."),
commandData("rt", teleportRightCommand, "<distance in meters>", getStaffFlagValue("basicModeration"), true, true, "Teleports you to the right a certain distance in meters."), commandData("rt", teleportRightCommand, "<distance in meters>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to the right a certain distance in meters."),
commandData("up", teleportUpCommand, "<distance in meters>", getStaffFlagValue("basicModeration"), true, true, "Teleports you upward a certain distance in meters."), commandData("up", teleportUpCommand, "<distance in meters>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you upward a certain distance in meters."),
commandData("dn", teleportDownCommand, "<distance in meters>", getStaffFlagValue("basicModeration"), true, true, "Teleports you downward a certain distance in meters."), commandData("dn", teleportDownCommand, "<distance in meters>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you downward a certain distance in meters."),
commandData("int", playerInteriorCommand, "<interior id>", getStaffFlagValue("basicModeration"), true, true, "Gets or sets a player's game interior."), commandData("int", playerInteriorCommand, "<interior id>", getStaffFlagValue("BasicModeration"), true, true, "Gets or sets a player's game interior."),
commandData("vw", playerVirtualWorldCommand, "<virtual world id>", getStaffFlagValue("basicModeration"), true, true, "Gets or sets a player's virtual world/dimension."), commandData("vw", playerVirtualWorldCommand, "<virtual world id>", getStaffFlagValue("BasicModeration"), true, true, "Gets or sets a player's virtual world/dimension."),
commandData("addstaffflag", addStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("manageAdmins"), true, true, "Gives a player a staff flaf (this server only)."), commandData("addstaffflag", addStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("ManageAdmins"), true, true, "Gives a player a staff flaf (this server only)."),
commandData("delstaffflag", takeStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("manageAdmins"), true, true, "Takes a player's staff flag by name (this server only)."), commandData("delstaffflag", takeStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("ManageAdmins"), true, true, "Takes a player's staff flag by name (this server only)."),
commandData("getstaffflags", getStaffFlagsCommand, "<player name/id>", getStaffFlagValue("manageAdmins"), true, true, "Shows a list of all staff flags a player has (this server only)."), commandData("getstaffflags", getStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all staff flags a player has (this server only)."),
commandData("clearstaffflags", clearStaffFlagsCommand, "<player name/id>", getStaffFlagValue("manageAdmins"), true, true, "Removes all staff flags for a player (this server only)."), commandData("clearstaffflags", clearStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Removes all staff flags for a player (this server only)."),
commandData("staffflags", allStaffFlagsCommand, "", getStaffFlagValue("manageAdmins"), true, true, "Shows a list of all valid staff flag names."), commandData("staffflags", allStaffFlagsCommand, "", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all valid staff flag names."),
commandData("givemoney", givePlayerMoneyCommand, "<player name/id> <amount>", getStaffFlagValue("serverManager"), true, true), commandData("givemoney", givePlayerMoneyCommand, "<player name/id> <amount>", getStaffFlagValue("serverManager"), true, true),
commandData("nonrpname", forceCharacterNameChangeCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Forces a player to change their current character's name."), commandData("nonrpname", forceCharacterNameChangeCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Forces a player to change their current character's name."),
commandData("forcename", forceCharacterNameCommand, "<player name/id> <first name> <last name>", getStaffFlagValue("basicModeration"), true, true, "Changes a character's name directly."), commandData("forcename", forceCharacterNameCommand, "<player name/id> <first name> <last name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's name directly."),
commandData("forceskin", forcePlayerSkinCommand, "<player name/id> <skin id/name>", getStaffFlagValue("basicModeration"), true, true, "Changes a character's skin directly."), commandData("forceskin", forcePlayerSkinCommand, "<player name/id> <skin id/name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's skin directly."),
commandData("forcefightstyle", forceFightStyleCommand, "<player name/id> <fight style name>", getStaffFlagValue("basicModeration"), true, true, "Changes a character's fight style."), commandData("forcefightstyle", forceFightStyleCommand, "<player name/id> <fight style name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's fight style."),
commandData("plrinfo", getPlayerInfoCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Shows basic info about the specified player"), commandData("plrinfo", getPlayerInfoCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows basic info about the specified player"),
commandData("getplrhouse", getAllHousesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Shows a list of all houses owned by the player"), commandData("getplrhouse", getAllHousesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all houses owned by the player"),
commandData("getplrbiz", getAllBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Shows a list of all businesses owned by the player"), commandData("getplrbiz", getAllBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
commandData("getplrveh", getAllVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Shows a list of all vehicles owned by the player"), commandData("getplrveh", getAllVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
commandData("geoip", getGeoIPInformationCommand, "<player name/id>", getStaffFlagValue("basicModeration"), true, true, "Retrieves GeoIP information on a player (country & city)"), commandData("geoip", getGeoIPInformationCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Retrieves GeoIP information on a player (country & city)"),
commandData("forcepayday", forcePlayerPayDayCommand, "<player name/id>", getStaffFlagValue("manageServer"), true, true, "Gives a player an instant payday."), commandData("forcepayday", forcePlayerPayDayCommand, "<player name/id>", getStaffFlagValue("ManageServer"), true, true, "Gives a player an instant payday."),
], ],
radio: [ radio: [
commandData("radiostation", playStreamingRadioCommand, "<radio station id>", getStaffFlagValue("none"), true, false, "Plays a radio station in your vehicle, house, or business (depending on which one you're in)"), commandData("radiostation", playStreamingRadioCommand, "<radio station id>", getStaffFlagValue("None"), true, false, "Plays a radio station in your vehicle, house, or business (depending on which one you're in)"),
commandData("radiostations", showRadioStationListCommand, "", getStaffFlagValue("none"), true, false, "Shows a list of all available radio stations"), commandData("radiostations", showRadioStationListCommand, "", getStaffFlagValue("None"), true, false, "Shows a list of all available radio stations"),
commandData("radiovolume", setStreamingRadioVolumeCommand, "<volume level>", getStaffFlagValue("none"), true, false, "Sets the radio streaming volume (for your game only)."), commandData("radiovolume", setStreamingRadioVolumeCommand, "<volume level>", getStaffFlagValue("None"), true, false, "Sets the radio streaming volume (for your game only)."),
], ],
security: [], security: [],
startup: [], startup: [],
subAccount: [ subAccount: [
commandData("switchchar", switchCharacterCommand, "", getStaffFlagValue("none"), true, false), commandData("switchchar", switchCharacterCommand, "", getStaffFlagValue("None"), true, false),
commandData("newchar", newCharacterCommand, "<first name> <last name>", getStaffFlagValue("none"), true, false), commandData("newchar", newCharacterCommand, "<first name> <last name>", getStaffFlagValue("None"), true, false),
commandData("usechar", useCharacterCommand, "<character id>", getStaffFlagValue("none"), true, false), commandData("usechar", useCharacterCommand, "<character id>", getStaffFlagValue("None"), true, false),
], ],
translate: [], translate: [],
trigger: [ trigger: [
commandData("addtrig", createTriggerCommand, "<trigger name>", getStaffFlagValue("manageServer"), true, false), commandData("addtrig", createTriggerCommand, "<trigger name>", getStaffFlagValue("ManageServer"), true, false),
commandData("deltrig", deleteTriggerCommand, "<trigger id>", getStaffFlagValue("manageServer"), true, false), commandData("deltrig", deleteTriggerCommand, "<trigger id>", getStaffFlagValue("ManageServer"), true, false),
commandData("addtrigcond", addTriggerConditionCommand, "<trigger id> <condition name>", getStaffFlagValue("manageServer"), true, false), commandData("addtrigcond", addTriggerConditionCommand, "<trigger id> <condition name>", getStaffFlagValue("ManageServer"), true, false),
commandData("deltrigcond", removeTriggerConditionCommand, "<trigger id> <condition id>", getStaffFlagValue("manageServer"), true, false), commandData("deltrigcond", removeTriggerConditionCommand, "<trigger id> <condition id>", getStaffFlagValue("ManageServer"), true, false),
commandData("addtrigresp", addTriggerResponseCommand, "<trigger id> <response name>", getStaffFlagValue("manageServer"), true, false), commandData("addtrigresp", addTriggerResponseCommand, "<trigger id> <response name>", getStaffFlagValue("ManageServer"), true, false),
commandData("deltrigresp", removeTriggerResponseCommand, "<trigger id> <response name>", getStaffFlagValue("manageServer"), true, false), commandData("deltrigresp", removeTriggerResponseCommand, "<trigger id> <response name>", getStaffFlagValue("ManageServer"), true, false),
commandData("triggers", listTriggersCommand, "[search value]", getStaffFlagValue("manageServer"), true, false), commandData("triggers", listTriggersCommand, "[search value]", getStaffFlagValue("ManageServer"), true, false),
commandData("trigcond", listTriggerConditionsCommand, "<trigger id>", getStaffFlagValue("manageServer"), true, false), commandData("trigcond", listTriggerConditionsCommand, "<trigger id>", getStaffFlagValue("ManageServer"), true, false),
commandData("trigresp", listTriggerResponsesCommand, "<trigger id>", getStaffFlagValue("manageServer"), true, false), commandData("trigresp", listTriggerResponsesCommand, "<trigger id>", getStaffFlagValue("ManageServer"), true, false),
commandData("trigtoggle", toggleTriggerEnabledCommand, "<trigger id> [0/1 state]", getStaffFlagValue("manageServer"), true, false), commandData("trigtoggle", toggleTriggerEnabledCommand, "<trigger id> [0/1 state]", getStaffFlagValue("ManageServer"), true, false),
], ],
utilities: [], utilities: [],
vehicle: [ vehicle: [
commandData("addveh", createVehicleCommand, "<model id/name>", getStaffFlagValue("manageVehicles"), true, false), commandData("addveh", createVehicleCommand, "<model id/name>", getStaffFlagValue("ManageVehicles"), true, false),
commandData("tempveh", createTemporaryVehicleCommand, "<model id/name>", getStaffFlagValue("manageVehicles"), true, false), commandData("tempveh", createTemporaryVehicleCommand, "<model id/name>", getStaffFlagValue("ManageVehicles"), true, false),
commandData("delveh", deleteVehicleCommand, "", getStaffFlagValue("manageVehicles"), true, false), commandData("delveh", deleteVehicleCommand, "", getStaffFlagValue("ManageVehicles"), true, false),
commandData("oldveh", getLastVehicleInfoCommand, "", getStaffFlagValue("none"), true, false), commandData("oldveh", getLastVehicleInfoCommand, "", getStaffFlagValue("None"), true, false),
commandData("lastveh", getLastVehicleInfoCommand, "", getStaffFlagValue("none"), true, false), commandData("lastveh", getLastVehicleInfoCommand, "", getStaffFlagValue("None"), true, false),
commandData("oldcar", getLastVehicleInfoCommand, "", getStaffFlagValue("none"), true, false), commandData("oldcar", getLastVehicleInfoCommand, "", getStaffFlagValue("None"), true, false),
commandData("lastcar", getLastVehicleInfoCommand, "", getStaffFlagValue("none"), true, false), commandData("lastcar", getLastVehicleInfoCommand, "", getStaffFlagValue("None"), true, false),
commandData("lock", vehicleLockCommand, "", getStaffFlagValue("none"), true, false), commandData("lock", vehicleLockCommand, "", getStaffFlagValue("None"), true, false),
commandData("unlock", vehicleLockCommand, "", getStaffFlagValue("none"), true, false), commandData("unlock", vehicleLockCommand, "", getStaffFlagValue("None"), true, false),
commandData("engine", vehicleEngineCommand, "", getStaffFlagValue("none"), true, false), commandData("engine", vehicleEngineCommand, "", getStaffFlagValue("None"), true, false),
commandData("siren", vehicleSirenCommand, "", getStaffFlagValue("none"), true, false), commandData("siren", vehicleSirenCommand, "", getStaffFlagValue("None"), true, false),
commandData("lights", vehicleLightsCommand, "", getStaffFlagValue("none"), true, false), commandData("lights", vehicleLightsCommand, "", getStaffFlagValue("None"), true, false),
commandData("vehowner", setVehicleOwnerCommand, "<player id/name>", getStaffFlagValue("manageVehicles"), true, true), commandData("vehowner", setVehicleOwnerCommand, "<player id/name>", getStaffFlagValue("ManageVehicles"), true, true),
commandData("vehpublic", setVehiclePublicCommand, "", getStaffFlagValue("manageVehicles"), true, true), commandData("vehpublic", setVehiclePublicCommand, "", getStaffFlagValue("ManageVehicles"), true, true),
commandData("vehclan", setVehicleClanCommand, "<clan id/name>", getStaffFlagValue(""), true, true), commandData("vehclan", setVehicleClanCommand, "<clan id/name>", getStaffFlagValue(""), true, true),
commandData("vehbiz", setVehicleToBusinessCommand, "", getStaffFlagValue(""), true, true), commandData("vehbiz", setVehicleToBusinessCommand, "", getStaffFlagValue(""), true, true),
commandData("vehjob", setVehicleJobCommand, "[job id/name]", getStaffFlagValue("manageVehicles"), true, true), commandData("vehjob", setVehicleJobCommand, "[job id/name]", getStaffFlagValue("ManageVehicles"), true, true),
commandData("vehdelowner", removeVehicleOwnerCommand, "", getStaffFlagValue("manageVehicles"), true, true), commandData("vehdelowner", removeVehicleOwnerCommand, "", getStaffFlagValue("ManageVehicles"), true, true),
commandData("vehrank", setVehicleRankCommand, "<rank id/name>", getStaffFlagValue("none"), true, true), commandData("vehrank", setVehicleRankCommand, "<rank id/name>", getStaffFlagValue("None"), true, true),
commandData("vehinfo", getVehicleInfoCommand, "", getStaffFlagValue("none"), true, true), commandData("vehinfo", getVehicleInfoCommand, "", getStaffFlagValue("None"), true, true),
commandData("vehpark", toggleVehicleSpawnLockCommand, "", getStaffFlagValue("manageVehicles"), true, true), commandData("vehpark", toggleVehicleSpawnLockCommand, "", getStaffFlagValue("ManageVehicles"), true, true),
commandData("vehrespawnall", respawnAllVehiclesCommand, "", getStaffFlagValue("manageVehicles"), true, true), commandData("vehrespawnall", respawnAllVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true),
commandData("vehreloadall", reloadAllVehiclesCommand, "", getStaffFlagValue("manageVehicles"), true, true), commandData("vehreloadall", reloadAllVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true),
commandData("vehrent", rentVehicleCommand, "", getStaffFlagValue("none"), true, true), commandData("vehrent", rentVehicleCommand, "", getStaffFlagValue("None"), true, true),
commandData("vehrentprice", setVehicleRentPriceCommand, "", getStaffFlagValue("none"), true, true), commandData("vehrentprice", setVehicleRentPriceCommand, "", getStaffFlagValue("None"), true, true),
commandData("vehbuyprice", setVehicleBuyPriceCommand, "", getStaffFlagValue("none"), true, true), commandData("vehbuyprice", setVehicleBuyPriceCommand, "", getStaffFlagValue("None"), true, true),
commandData("stoprent", stopRentingVehicleCommand, "", getStaffFlagValue("none"), true, true), commandData("stoprent", stopRentingVehicleCommand, "", getStaffFlagValue("None"), true, true),
commandData("vehbuy", buyVehicleCommand, "", getStaffFlagValue("none"), true, true), commandData("vehbuy", buyVehicleCommand, "", getStaffFlagValue("None"), true, true),
commandData("vehcolour", vehicleColourCommand, "<colour1> <colour2>", getStaffFlagValue("none"), true, true), commandData("vehcolour", vehicleColourCommand, "<colour1> <colour2>", getStaffFlagValue("None"), true, true),
commandData("vehlivery", vehicleLiveryCommand, "<livery id>", getStaffFlagValue("none"), true, true), commandData("vehlivery", vehicleLiveryCommand, "<livery id>", getStaffFlagValue("None"), true, true),
commandData("vehrepair", vehicleRepairCommand, "", getStaffFlagValue("none"), true, true), commandData("vehrepair", vehicleRepairCommand, "", getStaffFlagValue("None"), true, true),
commandData("passenger", enterVehicleAsPassengerCommand, "", getStaffFlagValue("none"), true, true), commandData("passenger", enterVehicleAsPassengerCommand, "", getStaffFlagValue("None"), true, true),
], ],
}; };
@@ -501,7 +502,7 @@ function getCommands() {
// =========================================================================== // ===========================================================================
function commandData(command, handlerFunction, syntaxString = "", requiredStaffFlags = getStaffFlagValue("none"), requireLogin = true, allowOnDiscord = true, usageHelpMessage) { function commandData(command, handlerFunction, syntaxString = "", requiredStaffFlags = getStaffFlagValue("None"), requireLogin = true, allowOnDiscord = true, usageHelpMessage) {
return new CommandData(command, handlerFunction, syntaxString, requiredStaffFlags, requireLogin, allowOnDiscord, usageHelpMessage); return new CommandData(command, handlerFunction, syntaxString, requiredStaffFlags, requireLogin, allowOnDiscord, usageHelpMessage);
} }

View File

@@ -363,7 +363,7 @@ function showCommandHelpMessage(client, commandName) {
//messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`); //messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
//if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("basicModeration"))) { //if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) {
// messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`); // messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
//} //}
} }

View File

@@ -217,7 +217,7 @@ function setHouseOwnerCommand(command, params, client) {
return false; return false;
} }
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageHouses"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) { if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
messagePlayerError(client, "You don't own this house!"); messagePlayerError(client, "You don't own this house!");
return false; return false;
@@ -257,7 +257,7 @@ function setHouseClanCommand(command, params, client) {
return false; return false;
} }
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageHouses"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) { if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
messagePlayerError(client, "You don't own this house!"); messagePlayerError(client, "You don't own this house!");
return false; return false;
@@ -304,7 +304,7 @@ function setHouseClanCommand(command, params, client) {
return false; return false;
} }
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageHouses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageHouses"))) {
messagePlayerError(client, "You can't set clan house ranks!"); messagePlayerError(client, "You can't set clan house ranks!");
return false; return false;
} }
@@ -340,7 +340,7 @@ function setHousePickupCommand(command, params, client) {
} }
if(isNaN(typeParam)) { if(isNaN(typeParam)) {
if(toLowerCase(typeParam) == "none") { if(toLowerCase(typeParam) == "None") {
getHouseData(houseId).entrancePickupModel = -1; getHouseData(houseId).entrancePickupModel = -1;
} else { } else {
if(isNull(getGameConfig().pickupModels[getServerGame()][typeParam])) { if(isNull(getGameConfig().pickupModels[getServerGame()][typeParam])) {
@@ -376,7 +376,7 @@ function setHousePickupCommand(command, params, client) {
*/ */
function setHouseInteriorTypeCommand(command, params, client) { function setHouseInteriorTypeCommand(command, params, client) {
let splitParams = params.split(" "); let splitParams = params.split(" ");
let typeParam = splitParams[0] || "none"; let typeParam = splitParams[0] || "None";
let houseId = getPlayerHouse(client); let houseId = getPlayerHouse(client);
if(!getHouseData(houseId)) { if(!getHouseData(houseId)) {
@@ -387,7 +387,7 @@ function setHouseInteriorTypeCommand(command, params, client) {
if(isNaN(typeParam)) { if(isNaN(typeParam)) {
let tempHouseLocation = new HouseLocationData(false); let tempHouseLocation = new HouseLocationData(false);
if(toLowerCase(typeParam) == "none") { if(toLowerCase(typeParam) == "None") {
tempHouseLocation.exitPosition = toVector3(0.0, 0.0, 0.0); tempHouseLocation.exitPosition = toVector3(0.0, 0.0, 0.0);
tempHouseLocation.exitInterior = -1; tempHouseLocation.exitInterior = -1;
getHouseData(houseId).hasInterior = false; getHouseData(houseId).hasInterior = false;
@@ -438,7 +438,7 @@ function setHouseBlipCommand(command, params, client) {
} }
if(isNaN(typeParam)) { if(isNaN(typeParam)) {
if(toLowerCase(typeParam) == "none") { if(toLowerCase(typeParam) == "None") {
getHouseData(houseId).entranceBlipModel = -1; getHouseData(houseId).entranceBlipModel = -1;
} else { } else {
if(isNull(getGameConfig().blipSprites[getServerGame()][typeParam])) { if(isNull(getGameConfig().blipSprites[getServerGame()][typeParam])) {
@@ -1269,7 +1269,7 @@ function updateHouseInteriorLightsForOccupants(houseId) {
// =========================================================================== // ===========================================================================
function canPlayerSetHouseInteriorLights(client, houseId) { function canPlayerSetHouseInteriorLights(client, houseId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageHouses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
return true; return true;
} }
@@ -1278,7 +1278,7 @@ function canPlayerSetHouseInteriorLights(client, houseId) {
} }
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_CLAN && getHouseData(houseId).ownerId == getClanData(getPlayerClan(client)).databaseId) { if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_CLAN && getHouseData(houseId).ownerId == getClanData(getPlayerClan(client)).databaseId) {
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageHouses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageHouses"))) {
return true; return true;
} }
} }
@@ -1289,7 +1289,7 @@ function canPlayerSetHouseInteriorLights(client, houseId) {
// =========================================================================== // ===========================================================================
function canPlayerLockUnlockHouse(client, houseId) { function canPlayerLockUnlockHouse(client, houseId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageHouses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
return true; return true;
} }
@@ -1298,7 +1298,7 @@ function canPlayerLockUnlockHouse(client, houseId) {
} }
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_CLAN && getHouseData(houseId).ownerId == getClanData(getPlayerClan(client)).databaseId) { if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_CLAN && getHouseData(houseId).ownerId == getClanData(getPlayerClan(client)).databaseId) {
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageHouses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageHouses"))) {
return true; return true;
} }
} }
@@ -1327,7 +1327,7 @@ function resetHouseBlips(houseId) {
// =========================================================================== // ===========================================================================
function canPlayerManageHouse(client, houseId) { function canPlayerManageHouse(client, houseId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageHouses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
return true; return true;
} }
@@ -1339,7 +1339,7 @@ function canPlayerManageHouse(client, houseId) {
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_CLAN) { if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_CLAN) {
if(getHouseData(houseId).ownerId == getPlayerClan(client)) { if(getHouseData(houseId).ownerId == getPlayerClan(client)) {
if(doesPlayerHaveClanPermission(client, getClanFlagValue("manageHouses"))) { if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageHouses"))) {
return true; return true;
} }
//if(getHouseData(houseId).clanRank <= getClanRankData(getPlayerClan(client), getPlayerClanRank(client)).level) { //if(getHouseData(houseId).clanRank <= getClanRankData(getPlayerClan(client), getPlayerClanRank(client)).level) {

View File

@@ -1269,7 +1269,7 @@ function stopReturnToJobVehicleCountdown(client) {
// =========================================================================== // ===========================================================================
function canPlayerUseJob(client, jobId) { function canPlayerUseJob(client, jobId) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageJobs"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageJobs"))) {
return true; return true;
} }
@@ -1643,7 +1643,7 @@ function getPlayerJob(client) {
// =========================================================================== // ===========================================================================
function canPlayerUseJobs(client) { function canPlayerUseJobs(client) {
if(hasBitFlag(getPlayerData(client).accountData.flags.moderation, getServerBitFlags().moderationFlags.jobBanned)) { if(hasBitFlag(getPlayerData(client).accountData.flags.moderation, getServerBitFlags().moderationFlags.JobBanned)) {
return false; return false;
} }

View File

@@ -139,7 +139,7 @@ function doesPlayerHaveKeyBindForKey(client, key) {
// =========================================================================== // ===========================================================================
function doesPlayerHaveKeyBindsDisabled(client) { function doesPlayerHaveKeyBindsDisabled(client) {
return hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("disableKeyBinds")); return hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("NoKeyBinds"));
} }
// =========================================================================== // ===========================================================================

View File

@@ -51,7 +51,7 @@ function messageAdmins(messageText, colour = getColourByName("softRed")) {
let clients = getClients(); let clients = getClients();
for(let i in clients) { for(let i in clients) {
if(doesPlayerHaveStaffPermission(clients[i], getStaffFlagValue("basicModeration"))) { if(doesPlayerHaveStaffPermission(clients[i], getStaffFlagValue("BasicModeration"))) {
messagePlayerNormal(clients[i], `🛡️ ${messageText}`, colour); messagePlayerNormal(clients[i], `🛡️ ${messageText}`, colour);
} }
} }
@@ -198,7 +198,7 @@ function messagePlayerAdminChat(client, adminChattingClient, messageText) {
// =========================================================================== // ===========================================================================
function messagePlayerNewbieTip(client, message) { function messagePlayerNewbieTip(client, message) {
if(!hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("noActionTips"))) { if(!hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("NoActionTips"))) {
messagePlayerNormal(client, `💡 TIP: ${message}`); messagePlayerNormal(client, `💡 TIP: ${message}`);
} }
} }
@@ -207,7 +207,7 @@ function messagePlayerNewbieTip(client, message) {
function messagePlayerTimedRandomTip(client, message) { function messagePlayerTimedRandomTip(client, message) {
if(isPlayerLoggedIn(client) && isPlayerSpawned(client)) { if(isPlayerLoggedIn(client) && isPlayerSpawned(client)) {
if(!hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("noTimedRandomTips"))) { if(!hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("NoRandomTips"))) {
messagePlayerNormal(client, `💡 TIP: ${message}`); messagePlayerNormal(client, `💡 TIP: ${message}`);
} }
} }

View File

@@ -77,7 +77,7 @@ function setNewCharacterSkinCommand(command, params, client) {
return false; return false;
} }
skinId = getSkinModelIndexFromParams(params); let skinId = getSkinModelIndexFromParams(params);
getServerConfig().newCharacter.skin = skinId; getServerConfig().newCharacter.skin = skinId;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
@@ -272,7 +272,7 @@ function getPlayerInfoCommand(command, params, client) {
let targetClient = client; let targetClient = client;
if(!areParamsEmpty(params)) { if(!areParamsEmpty(params)) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("basicModeration"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) {
targetClient = getPlayerFromParams(params); targetClient = getPlayerFromParams(params);
if(!getPlayerData(targetClient)) { if(!getPlayerData(targetClient)) {

View File

@@ -27,8 +27,8 @@ function kickClientCommand(command, params, client) {
} }
// Prevent kicking admins with really high permissions // Prevent kicking admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot kick this person!"); messagePlayerError(client, "You cannot kick this person!");
return false; return false;
} }
@@ -56,8 +56,8 @@ function setClientStaffTitleCommand(command, params, client) {
} }
// Prevent setting titles on staff with really high permissions // Prevent setting titles on staff with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot set this person's staff title!"); messagePlayerError(client, "You cannot set this person's staff title!");
return false; return false;
} }
@@ -84,8 +84,8 @@ function muteClientCommand(command, params, client) {
} }
// Prevent muting admins with really high permissions // Prevent muting admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot mute this person!"); messagePlayerError(client, "You cannot mute this person!");
return false; return false;
} }
@@ -111,8 +111,8 @@ function unMuteClientCommand(command, params, client) {
} }
// Prevent unmuting admins with really high permissions // Prevent unmuting admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot unmute this person!"); messagePlayerError(client, "You cannot unmute this person!");
return false; return false;
} }
@@ -137,8 +137,8 @@ function freezeClientCommand(command, params, client) {
} }
// Prevent freeze admins with really high permissions // Prevent freeze admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot freeze this person!"); messagePlayerError(client, "You cannot freeze this person!");
return false; return false;
} }
@@ -164,8 +164,8 @@ function unFreezeClientCommand(command, params, client) {
} }
// Prevent unfreezing admins with really high permissions // Prevent unfreezing admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot freeze this person!"); messagePlayerError(client, "You cannot freeze this person!");
return false; return false;
} }
@@ -675,7 +675,7 @@ function addStaffFlagCommand(command, params, client) {
let splitParams = params.split(""); let splitParams = params.split("");
let targetClient = getPlayerFromParams(splitParams[0]); let targetClient = getPlayerFromParams(splitParams[0]);
let flagName = splitParams[1] || "none"; let flagName = splitParams[1] || "None";
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!"); messagePlayerError(client, "That player is not connected!");
@@ -683,8 +683,8 @@ function addStaffFlagCommand(command, params, client) {
} }
// Prevent setting flags on admins with really high permissions // Prevent setting flags on admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot give staff flags to this person!"); messagePlayerError(client, "You cannot give staff flags to this person!");
return false; return false;
} }
@@ -709,7 +709,7 @@ function takeStaffFlagCommand(command, params, client) {
let splitParams = params.split(""); let splitParams = params.split("");
let targetClient = getPlayerFromParams(splitParams[0]); let targetClient = getPlayerFromParams(splitParams[0]);
let flagName = splitParams[1] || "none"; let flagName = splitParams[1] || "None";
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!"); messagePlayerError(client, "That player is not connected!");
@@ -717,8 +717,8 @@ function takeStaffFlagCommand(command, params, client) {
} }
// Prevent setting flags on admins with really high permissions // Prevent setting flags on admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot take staff flags from this person!"); messagePlayerError(client, "You cannot take staff flags from this person!");
return false; return false;
} }
@@ -743,7 +743,7 @@ function clearStaffFlagsCommand(command, params, client) {
let splitParams = params.split(""); let splitParams = params.split("");
let targetClient = getPlayerFromParams(splitParams[0]); let targetClient = getPlayerFromParams(splitParams[0]);
let flagName = splitParams[1] || "none"; let flagName = splitParams[1] || "None";
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!"); messagePlayerError(client, "That player is not connected!");
@@ -751,8 +751,8 @@ function clearStaffFlagsCommand(command, params, client) {
} }
// Prevent setting flags on admins with really high permissions // Prevent setting flags on admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("manageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagsCommand("developer"))) { if(doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("ManageServer")) || doesPlayerHaveStaffPermission(targetClient, getStaffFlagValue("Developer"))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("manageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagsCommand("developer"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageServer")) && !doesPlayerHaveStaffPermission(client, getStaffFlagValue("Developer"))) {
messagePlayerError(client, "You cannot clear staff flags for this person!"); messagePlayerError(client, "You cannot clear staff flags for this person!");
return false; return false;
} }
@@ -789,7 +789,6 @@ function getStaffFlagsCommand(command, params, client) {
let splitParams = params.split(""); let splitParams = params.split("");
let targetClient = getPlayerFromParams(splitParams[0]); let targetClient = getPlayerFromParams(splitParams[0]);
let flagName = splitParams[1] || "none";
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!"); messagePlayerError(client, "That player is not connected!");
@@ -805,7 +804,22 @@ function getStaffFlagsCommand(command, params, client) {
} }
} }
messagePlayerInfo(client, `{MAINCOLOUR}${getPlayerName(targetClient)}'s staff flags: {ALTCOLOUR}${tempStaffFlags.join(getInlineChatColourByName("white"))}, {ALTCOLOUR}")}`); let flagList = [];
for(let i in getServerBitFlagKeys().staffFlagKeys) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue(getServerBitFlagKeys().staffFlagKeys[i]))) {
flagList.push(`{softGreen}${getServerBitFlagKeys().staffFlagKeys[i]}`);
} else {
flagList.push(`{softRed}${getServerBitFlagKeys().staffFlagKeys[i]}`);
}
}
let chunkedList = splitArrayIntoChunks(flagList, 6);
messagePlayerInfo(client, `{clanOrange}== {jobYellow}Player Staff Flags {clanOrange}=========================`);
for(let i in chunkedList) {
messagePlayerInfo(client, chunkedList[i].join("{MAINCOLOUR}, "));
}
} }
// =========================================================================== // ===========================================================================
@@ -818,14 +832,14 @@ function allStaffFlagsCommand(command, params, client) {
let splitParams = params.split(""); let splitParams = params.split("");
let targetClient = getPlayerFromParams(splitParams[0]); let targetClient = getPlayerFromParams(splitParams[0]);
let flagName = splitParams[1] || "none"; let flagName = splitParams[1] || "None";
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!"); messagePlayerError(client, "That player is not connected!");
return false; return false;
} }
messagePlayerInfo(client, `{MAINCOLOUR}Staff flags: {ALTCOLOUR}${getServerBitFlagKeys().join(getInlineChatColourByName("white"))}, {ALTCOLOUR}")}`); messagePlayerInfo(client, `{MAINCOLOUR}Staff flags: {ALTCOLOUR}${getServerBitFlagKeys().staffFlagKeys.join(getInlineChatColourByName("white"))}, {ALTCOLOUR}")}`);
} }
// =========================================================================== // ===========================================================================
@@ -862,14 +876,14 @@ function forcePlayerAccentCommand(command, params, client) {
let splitParams = params.split(" "); let splitParams = params.split(" ");
let targetClient = getPlayerFromParams(splitParams[0]); let targetClient = getPlayerFromParams(splitParams[0]);
let newAccent = splitParams[1] || "none"; let newAccent = splitParams[1] || "None";
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!"); messagePlayerError(client, "That player is not connected!");
return false; return false;
} }
if(toLowerCase(newAccent) == "none") { if(toLowerCase(newAccent) == "None") {
newAccent = ""; newAccent = "";
} }

View File

@@ -189,14 +189,14 @@ function getPlayerStreamingRadioVolume(client) {
// =========================================================================== // ===========================================================================
function showRadioStationListCommand(command, params, client) { function showRadioStationListCommand(command, params, client) {
let stationList = getServerData().radioStations.map(function(x) { return `{ALTCOLOUR}${x.index}: {MAINCOLOUR}${x.name}`; }); let stationList = getServerData().radioStations.map(function(x) { return `{ALTCOLOUR}${toInteger(x.index)+1}: {MAINCOLOUR}${x.name}`; });
let chunkedList = splitArrayIntoChunks(stationList, 4); let chunkedList = splitArrayIntoChunks(stationList, 4);
messagePlayerInfo(client, `{clanOrange}== {jobYellow}Radio Stations {clanOrange}===========================`); messagePlayerInfo(client, `{clanOrange}== {jobYellow}Radio Stations {clanOrange}===========================`);
for(let i in chunkedList) { for(let i in chunkedList) {
messagePlayerInfo(client, chunkedList[i+1].join(", ")); messagePlayerInfo(client, chunkedList[i].join(", "));
} }
} }

View File

@@ -71,13 +71,15 @@ function loadSubAccountsFromAccount(accountId) {
// Check if clan and rank are still valid // Check if clan and rank are still valid
if(tempSubAccount.clan != 0) { if(tempSubAccount.clan != 0) {
if(!getClanData(getClanIdFromDatabaseId(tempSubAccount.clan))) { let clanId = getClanIdFromDatabaseId(tempSubAccount.clan);
if(!getClanData(clanId)) {
tempSubAccount.clan = 0; tempSubAccount.clan = 0;
tempSubAccount.clanRank = 0; tempSubAccount.clanRank = 0;
tempSubAccount.clanTitle = ""; tempSubAccount.clanTitle = "";
tempSubAccount.clanFlags = 0; tempSubAccount.clanFlags = 0;
} else { } else {
if(!getClanRankData(getClanIdFromDatabaseId(tempSubAccount.clan), tempSubAccount.clanRank)) { let rankId = getClanRankIdFromDatabaseId(clanId, tempSubAccount.clanRank);
if(!getClanRankData(clanId, rankId)) {
tempSubAccount.clanRank = 0; tempSubAccount.clanRank = 0;
} }
} }
@@ -100,7 +102,7 @@ function saveSubAccountToDatabase(subAccountData) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let safeClanTag = escapeDatabaseString(dbConnection, subAccountData.clanTag); let safeClanTag = escapeDatabaseString(dbConnection, subAccountData.ClanTag);
let safeClanTitle = escapeDatabaseString(dbConnection, subAccountData.clanTitle); let safeClanTitle = escapeDatabaseString(dbConnection, subAccountData.clanTitle);
let safeFirstName = escapeDatabaseString(dbConnection, subAccountData.firstName); let safeFirstName = escapeDatabaseString(dbConnection, subAccountData.firstName);
let safeLastName = escapeDatabaseString(dbConnection, subAccountData.lastName); let safeLastName = escapeDatabaseString(dbConnection, subAccountData.lastName);
@@ -124,6 +126,7 @@ function saveSubAccountToDatabase(subAccountData) {
["sacct_inbusiness", (subAccountData.inBusiness != 0) ? getBusinessData(subAccountData.inBusiness).databaseId : 0], ["sacct_inbusiness", (subAccountData.inBusiness != 0) ? getBusinessData(subAccountData.inBusiness).databaseId : 0],
["sacct_health", subAccountData.health], ["sacct_health", subAccountData.health],
["sacct_armour", subAccountData.armour], ["sacct_armour", subAccountData.armour],
["sacct_accent", subAccountData.accent],
]; ];
let dbQuery = null; let dbQuery = null;
@@ -234,9 +237,9 @@ function showCharacterSelectToClient(client) {
getPlayerData(client).currentSubAccount = 0; getPlayerData(client).currentSubAccount = 0;
logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
let tempSubAccount = getPlayerData(client).subAccounts[0]; let tempSubAccount = getPlayerData(client).subAccounts[0];
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None"; let ClanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never";
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin); showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, ClanName, lastPlayedText, tempSubAccount.skin);
//spawnPlayer(client, getServerConfig().characterSelectPedPosition, getServerConfig().characterSelectPedHeading, getPlayerCurrentSubAccount(client).skin, getServerConfig().characterSelectInterior, getServerConfig().characterSelectDimension); //spawnPlayer(client, getServerConfig().characterSelectPedPosition, getServerConfig().characterSelectPedHeading, getPlayerCurrentSubAccount(client).skin, getServerConfig().characterSelectInterior, getServerConfig().characterSelectDimension);
//setTimeout(function() { //setTimeout(function() {
@@ -250,7 +253,7 @@ function showCharacterSelectToClient(client) {
messagePlayerNormal(client, `You have the following characters. Use /usechar <id> to select one:`, getColourByName("teal")); messagePlayerNormal(client, `You have the following characters. Use /usechar <id> to select one:`, getColourByName("teal"));
getPlayerData(client).subAccounts.forEach(function(subAccount, index) { getPlayerData(client).subAccounts.forEach(function(subAccount, index) {
let tempSubAccount = getPlayerData(client).subAccounts[0]; let tempSubAccount = getPlayerData(client).subAccounts[0];
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None"; let ClanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never";
messagePlayerNormal(client, `${index+1} • [#BBBBBB]${subAccount.firstName} ${subAccount.lastName} ($${tempSubAccount.cash}, ${lastPlayedText})`); messagePlayerNormal(client, `${index+1} • [#BBBBBB]${subAccount.firstName} ${subAccount.lastName} ($${tempSubAccount.cash}, ${lastPlayedText})`);
}); });
@@ -318,9 +321,9 @@ function checkPreviousCharacter(client) {
let subAccountId = getPlayerData(client).currentSubAccount; let subAccountId = getPlayerData(client).currentSubAccount;
let tempSubAccount = getPlayerData(client).subAccounts[subAccountId]; let tempSubAccount = getPlayerData(client).subAccounts[subAccountId];
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None"; let ClanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never";
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin); showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, ClanName, lastPlayedText, tempSubAccount.skin);
logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
} }
@@ -339,9 +342,9 @@ function checkNextCharacter(client) {
let subAccountId = getPlayerData(client).currentSubAccount; let subAccountId = getPlayerData(client).currentSubAccount;
let tempSubAccount = getPlayerData(client).subAccounts[subAccountId]; let tempSubAccount = getPlayerData(client).subAccounts[subAccountId];
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None"; let ClanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never";
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin); showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, ClanName, lastPlayedText, tempSubAccount.skin);
logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
} }
@@ -519,7 +522,7 @@ function setFightStyleCommand(command, params, client) {
} }
if(!isPlayerAtGym(client)) { if(!isPlayerAtGym(client)) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("basicModeration"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) {
messagePlayerError(client, `You need to be at a gym!`); messagePlayerError(client, `You need to be at a gym!`);
return false return false
} }
@@ -565,7 +568,7 @@ function forceFightStyleCommand(command, params, client) {
} }
if(!isPlayerAtGym(client)) { if(!isPlayerAtGym(client)) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("basicModeration"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) {
messagePlayerError(client, `You need to be at a gym!`); messagePlayerError(client, `You need to be at a gym!`);
return false return false
} }

View File

@@ -224,7 +224,9 @@ function showRandomTipToAllPlayers() {
let clients = getClients(); let clients = getClients();
for(let i in clients) { for(let i in clients) {
if(isPlayerLoggedIn(clients[i]) && isPlayerSpawned(clients[i])) { if(isPlayerLoggedIn(clients[i]) && isPlayerSpawned(clients[i])) {
messagePlayerTimedRandomTip(null, randomTips[tipId]); if(!doesPlayerHaveRandomTipsDisabled(clients[i])) {
messagePlayerTimedRandomTip(null, randomTips[tipId]);
}
} }
} }
} }

View File

@@ -602,7 +602,7 @@ function canClientUseFireJob(client) {
// =========================================================================== // ===========================================================================
function canClientUseAmmunations(client) { function canClientUseAmmunations(client) {
if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.ammuBanned) { if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.AmmuBanned) {
return false; return false;
} }
@@ -612,7 +612,7 @@ function canClientUseAmmunations(client) {
// =========================================================================== // ===========================================================================
function canClientUseGuns(client) { function canClientUseGuns(client) {
if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.gunBanned) { if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.GunBanned) {
return false; return false;
} }

View File

@@ -100,8 +100,8 @@ function saveVehicleToDatabase(vehicleDataId) {
["veh_owner_id", tempVehicleData.ownerId], ["veh_owner_id", tempVehicleData.ownerId],
["veh_locked", boolToInt(tempVehicleData.locked)], ["veh_locked", boolToInt(tempVehicleData.locked)],
["veh_spawn_lock", boolToInt(tempVehicleData.spawnLocked)], ["veh_spawn_lock", boolToInt(tempVehicleData.spawnLocked)],
["veh_buy_price", boolToInt(tempVehicleData.buyPrice)], ["veh_buy_price", tempVehicleData.buyPrice],
["veh_rent_price", boolToInt(tempVehicleData.rentPrice)], ["veh_rent_price", tempVehicleData.rentPrice],
["veh_pos_x", tempVehicleData.spawnPosition.x], ["veh_pos_x", tempVehicleData.spawnPosition.x],
["veh_pos_y", tempVehicleData.spawnPosition.y], ["veh_pos_y", tempVehicleData.spawnPosition.y],
["veh_pos_z", tempVehicleData.spawnPosition.z], ["veh_pos_z", tempVehicleData.spawnPosition.z],
@@ -444,7 +444,7 @@ function vehicleColourCommand(command, params, client) {
} }
if(!isAtPayAndSpray(getVehiclePosition(vehicle))) { if(!isAtPayAndSpray(getVehiclePosition(vehicle))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageVehicles"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
messagePlayerError(client, "You need to be at a pay-n-spray!"); messagePlayerError(client, "You need to be at a pay-n-spray!");
return false; return false;
} }
@@ -487,7 +487,7 @@ function vehicleRepairCommand(command, params, client) {
} }
if(!isAtPayAndSpray(getVehiclePosition(vehicle))) { if(!isAtPayAndSpray(getVehiclePosition(vehicle))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageVehicles"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
messagePlayerError(client, "You need to be at a pay-n-spray!"); messagePlayerError(client, "You need to be at a pay-n-spray!");
return false; return false;
} }
@@ -522,7 +522,7 @@ function vehicleLiveryCommand(command, params, client) {
} }
if(!isAtPayAndSpray(getVehiclePosition(vehicle))) { if(!isAtPayAndSpray(getVehiclePosition(vehicle))) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageVehicles"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
messagePlayerError(client, "You need to be at a pay-n-spray!"); messagePlayerError(client, "You need to be at a pay-n-spray!");
return false; return false;
} }
@@ -573,10 +573,6 @@ function buyVehicleCommand(command, params, client) {
} }
getPlayerData(client).buyingVehicle = vehicle; getPlayerData(client).buyingVehicle = vehicle;
//getPlayerCurrentSubAccount(client).cash -= getVehicleData(vehicle).buyPrice;
//getVehicleData(vehicle).buyPrice = 0;
//getVehicleData(vehicle).rentPrice = 0;
getVehicleData(vehicle).engine = true; getVehicleData(vehicle).engine = true;
vehicle.engine = true; vehicle.engine = true;
@@ -666,7 +662,7 @@ function stopRentingVehicleCommand(command, params, client) {
function doesPlayerHaveVehicleKeys(client, vehicle) { function doesPlayerHaveVehicleKeys(client, vehicle) {
let vehicleData = getVehicleData(vehicle); let vehicleData = getVehicleData(vehicle);
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageVehicles"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
return true; return true;
} }
@@ -714,7 +710,7 @@ function doesPlayerHaveVehicleKeys(client, vehicle) {
function doesClientOwnVehicle(client, vehicle) { function doesClientOwnVehicle(client, vehicle) {
let vehicleData = getVehicleData(vehicle); let vehicleData = getVehicleData(vehicle);
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageVehicles"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
return true; return true;
} }
@@ -726,7 +722,7 @@ function doesClientOwnVehicle(client, vehicle) {
if(vehicleData.ownerType == VRR_VEHOWNER_CLAN) { if(vehicleData.ownerType == VRR_VEHOWNER_CLAN) {
if(vehicleData.ownerId == getPlayerCurrentSubAccount(client).clan) { if(vehicleData.ownerId == getPlayerCurrentSubAccount(client).clan) {
if(doesPlayerHaveClanPermission(client, "manageVehicles") || doesPlayerHaveClanPermission(client, "owner")) { if(doesPlayerHaveClanPermission(client, "ManageVehicles") || doesPlayerHaveClanPermission(client, "owner")) {
return true; return true;
} }
} }
@@ -895,7 +891,7 @@ function setVehicleRentPriceCommand(command, params, client) {
let vehicle = getPlayerVehicle(client); let vehicle = getPlayerVehicle(client);
if(!doesClientOwnVehicle(client, vehicle)) { if(!doesClientOwnVehicle(client, vehicle)) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageVehicles"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
messagePlayerError(client, "You can't set the rent price for this vehicle!"); messagePlayerError(client, "You can't set the rent price for this vehicle!");
} }
} }
@@ -903,10 +899,11 @@ function setVehicleRentPriceCommand(command, params, client) {
let amount = toInteger(params) || 0; let amount = toInteger(params) || 0;
getVehicleData(vehicle).rentPrice = amount; getVehicleData(vehicle).rentPrice = amount;
getVehicleData(vehicle).needsSaved = true;
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}rent price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`); messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}rent price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
getVehicleData(vehicle).needsSaved = true;
} }
// =========================================================================== // ===========================================================================
@@ -920,7 +917,7 @@ function setVehicleBuyPriceCommand(command, params, client) {
let vehicle = getPlayerVehicle(client); let vehicle = getPlayerVehicle(client);
if(!doesClientOwnVehicle(client, vehicle)) { if(!doesClientOwnVehicle(client, vehicle)) {
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("manageVehicles"))) { if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
messagePlayerError(client, "You can't set the buy price for this vehicle!"); messagePlayerError(client, "You can't set the buy price for this vehicle!");
} }
} }
@@ -928,10 +925,9 @@ function setVehicleBuyPriceCommand(command, params, client) {
let amount = toInteger(params) || 0; let amount = toInteger(params) || 0;
getVehicleData(vehicle).buyPrice = amount; getVehicleData(vehicle).buyPrice = amount;
getVehicleData(vehicle).needsSaved = true;
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)}'s {MAINCOLOUR}buy price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`); messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)}'s {MAINCOLOUR}buy price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
getVehicleData(vehicle).needsSaved = true;
} }
// =========================================================================== // ===========================================================================
@@ -953,6 +949,8 @@ function removeVehicleOwnerCommand(command, params, client) {
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_NONE; getVehicleData(vehicle).ownerType = VRR_VEHOWNER_NONE;
getVehicleData(vehicle).ownerId = 0; getVehicleData(vehicle).ownerId = 0;
getVehicleData(vehicle).needsSaved = true;
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to nobody!`); messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to nobody!`);
messagePlayerInfo(client, `Nobody will be able to use this vehicle until it receives a new owner (either bought or set by admin).`); messagePlayerInfo(client, `Nobody will be able to use this vehicle until it receives a new owner (either bought or set by admin).`);
} }
@@ -1328,31 +1326,33 @@ function checkVehicleBuying() {
let clients = getClients(); let clients = getClients();
for(let i in clients) { for(let i in clients) {
if(getPlayerData(clients[i])) { if(getPlayerData(clients[i])) {
if(getPlayerData(clients[i]).buyingVehicle) { if(isPlayerInAnyVehicle(clients[i])) {
if(getPlayerVehicle(clients[i]) == getPlayerData(clients[i]).buyingVehicle) { if(getPlayerData(clients[i]).buyingVehicle) {
if(getDistance(getVehiclePosition(getPlayerData(clients[i]).buyingVehicle), getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnPosition) > getGlobalConfig().buyVehicleDriveAwayDistance) { if(getPlayerVehicle(clients[i]) == getPlayerData(clients[i]).buyingVehicle) {
if(getPlayerCurrentSubAccount(clients[i]).cash < getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice) { if(getDistance(getVehiclePosition(getPlayerData(clients[i]).buyingVehicle), getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnPosition) > getGlobalConfig().buyVehicleDriveAwayDistance) {
messagePlayerError(client, "You don't have enough money to buy this vehicle!"); if(getPlayerCurrentSubAccount(clients[i]).cash < getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice) {
respawnVehicle(getPlayerData(clients[i]).buyingVehicle); messagePlayerError(client, "You don't have enough money to buy this vehicle!");
getPlayerData(clients[i]).buyingVehicle = false; respawnVehicle(getPlayerData(clients[i]).buyingVehicle);
return false; getPlayerData(clients[i]).buyingVehicle = false;
} return false;
}
createNewDealershipVehicle(getVehicleData(getPlayerData(clients[i]).buyingVehicle).model, getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnPosition, getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnRotation, getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice, getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerId); createNewDealershipVehicle(getVehicleData(getPlayerData(clients[i]).buyingVehicle).model, getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnPosition, getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnRotation, getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice, getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerId);
takePlayerCash(clients[i], getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice); takePlayerCash(clients[i], getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice);
updatePlayerCash(clients[i]); updatePlayerCash(clients[i]);
getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerId = getPlayerCurrentSubAccount(clients[i]).databaseId; getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerId = getPlayerCurrentSubAccount(clients[i]).databaseId;
getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerType = VRR_VEHOWNER_PLAYER; getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerType = VRR_VEHOWNER_PLAYER;
getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice = 0; getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice = 0;
getVehicleData(getPlayerData(clients[i]).buyingVehicle).rentPrice = 0; getVehicleData(getPlayerData(clients[i]).buyingVehicle).rentPrice = 0;
getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnLocked = false; getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnLocked = false;
getPlayerData(clients[i]).buyingVehicle = false;
messagePlayerSuccess(clients[i], "This vehicle is now yours! It will save wherever you leave it.");
}
} else {
messagePlayerError(client, "You canceled the vehicle purchase by exiting the vehicle!");
respawnVehicle(getPlayerData(clients[i]).buyingVehicle);
getPlayerData(clients[i]).buyingVehicle = false; getPlayerData(clients[i]).buyingVehicle = false;
messagePlayerSuccess(clients[i], "This vehicle is now yours! It will save wherever you leave it.");
} }
} else {
messagePlayerError(client, "You canceled the vehicle purchase by exiting the vehicle!");
respawnVehicle(getPlayerData(clients[i]).buyingVehicle);
getPlayerData(clients[i]).buyingVehicle = false;
} }
} }
} }