Use more util funcs
This commit is contained in:
@@ -80,7 +80,7 @@ function toggleAccountGUICommand(command, params, client) {
|
||||
showPlayerLoginGUI(client);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`);
|
||||
} else {
|
||||
messagePlayerNormal(client, `👋 Welcome back to Asshat Gaming RP, ${client.name}! Please /login to continue.`, getColourByName("softGreen"));
|
||||
messagePlayerNormal(client, `👋 Welcome back to Asshat Gaming RP, ${getPlayerName(client)}! Please /login to continue.`, getColourByName("softGreen"));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`);
|
||||
}
|
||||
} else {
|
||||
@@ -88,7 +88,7 @@ function toggleAccountGUICommand(command, params, client) {
|
||||
showPlayerRegistrationGUI(client);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
|
||||
} else {
|
||||
messagePlayerNormal(client, `👋 Welcome to Asshat Gaming RP, ${client.name}! Please /register to continue.`, getColourByName("softGreen"));
|
||||
messagePlayerNormal(client, `👋 Welcome to Asshat Gaming RP, ${getPlayerName(client)}! Please /register to continue.`, getColourByName("softGreen"));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
|
||||
}
|
||||
}
|
||||
@@ -103,14 +103,14 @@ function toggleAccountServerLogoCommand(command, params, client) {
|
||||
|
||||
if(!doesPlayerHaveLogoEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(true)}now [#FFFFFF]be shown the server logo (if enabled on current server)`);
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(true)}now ${getInlineChatColourByName("white")}be shown the server logo (if enabled on current server)`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`);
|
||||
if(getServerConfig().showLogo) {
|
||||
updatePlayerShowLogoState(client, true);
|
||||
}
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings | flagValue;
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(false)}not [#FFFFFF]be shown the server logo.`);
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(false)}not ${getInlineChatColourByName("white")}be shown the server logo.`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`);
|
||||
updatePlayerShowLogoState(client, false);
|
||||
}
|
||||
@@ -127,27 +127,27 @@ function toggleAccountTwoFactorAuthCommand(command, params, client) {
|
||||
|
||||
if(getEmailConfig().enabled) {
|
||||
if(getPlayerData(client).accountData.emailAddress != "") {
|
||||
messagePlayerError(client, "You need to add your email to your account to use two-factor authentication.");
|
||||
messagePlayerTip(client, "[#FFFFFF]Use [#AAAAAA]/setemail [#FFFFFF]to add your email.");
|
||||
messagePlayerError(client, `You need to add your email to your account to use two-factor authentication.`);
|
||||
messagePlayerTip(client, `${getInlineChatColourByName("white")}Use ${getInlineChatColourByName("lightGrey")}/setemail ${getInlineChatColourByName("white")}to add your email.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isAccountEmailVerified(getPlayerData(client).accountData)) {
|
||||
messagePlayerError(client, "You need to verify your email to your account to use two-factor authentication.");
|
||||
messagePlayerTip(client, "[#FFFFFF]Use [#AAAAAA]/verifyemail [#FFFFFF]to verify your email.");
|
||||
messagePlayerError(client, `You need to verify your email to your account to use two-factor authentication.`);
|
||||
messagePlayerTip(client, `${getInlineChatColourByName("white")}Use ${getInlineChatColourByName("lightGrey")}/verifyemail ${getInlineChatColourByName("white")}to verify your email.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveTwoFactorAuthEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, `[#FFFFFF]You have turned ${getBoolRedGreenInlineColour(false)}ON [#FFFFFF] two factor authentication![#AAAAAA]${addtoAuthenticatorCode}`);
|
||||
messagePlayerAlert(client, "You will be required to enter a code sent to your email every time you log on.");
|
||||
messagePlayerSuccess(client, `${getInlineChatColourByName("white")}You have turned ${getBoolRedGreenInlineColour(false)}ON ${getInlineChatColourByName("white")} two factor authentication!${getInlineChatColourByName("lightGrey")}${addtoAuthenticatorCode}`);
|
||||
messagePlayerAlert(client, `You will be required to enter a code sent to your email every time you log on.`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication ON for their account`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, `You have turned ${getBoolRedGreenInlineColour(false)}OFF [#FFFFFF]two-factor authentication for login.`);
|
||||
messagePlayerAlert(client, "You won't be required to enter a code sent to your email every time you log on anymore.");
|
||||
messagePlayerSuccess(client, `You have turned ${getBoolRedGreenInlineColour(false)}OFF ${getInlineChatColourByName("white")}two-factor authentication for login.`);
|
||||
messagePlayerAlert(client, `You won't be required to enter a code sent to your email every time you log on anymore.`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`);
|
||||
}
|
||||
return true;
|
||||
@@ -157,7 +157,7 @@ function toggleAccountTwoFactorAuthCommand(command, params, client) {
|
||||
|
||||
function registerCommand(command, params, client) {
|
||||
if(isPlayerRegistered(client)) {
|
||||
messagePlayerError(client, "Your name is already registered!");
|
||||
messagePlayerError(client, `Your name is already registered!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -168,8 +168,8 @@ function registerCommand(command, params, client) {
|
||||
|
||||
checkRegistration(client, params);
|
||||
//getPlayerData(client).accountData = accountData;
|
||||
//messagePlayerSuccess(client, "Your account has been created!");
|
||||
//messagePlayerAlert(client, "To play on the server, you will need to make a character.");
|
||||
//messagePlayerSuccess(client, `Your account has been created!`);
|
||||
//messagePlayerAlert(client, `To play on the server, you will need to make a character.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -184,19 +184,19 @@ function changePasswordCommand(command, params, client) {
|
||||
let oldPassword = splitParams[0];
|
||||
let newPassword = splitParams[1];
|
||||
|
||||
if(isAccountPasswordCorrect(getPlayerData(client).accountData, hashAccountPassword(client.name, oldPassword))) {
|
||||
messagePlayerError(client, "The old password is invalid!");
|
||||
if(isAccountPasswordCorrect(getPlayerData(client).accountData, hashAccountPassword(getPlayerName(client), oldPassword))) {
|
||||
messagePlayerError(client, `The old password is invalid!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPasswordMeetRequirements(newPassword)) {
|
||||
messagePlayerError(client, "The new password must meet the requirements!");
|
||||
messagePlayerInfo(client, "Passwords must have at least one capital letter, one lowercase letter, and one number!");
|
||||
messagePlayerError(client, `The new password must meet the requirements!`);
|
||||
messagePlayerInfo(client, `Passwords must have at least one capital letter, one lowercase letter, and one number!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
getPlayerData(client).accountData.password = hashAccountPassword(getPlayerData(client).accountData.name, params);
|
||||
messagePlayerSuccess(client, "Your password has been changed!");
|
||||
messagePlayerSuccess(client, `Your password has been changed!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -208,12 +208,12 @@ function setAccountChatScrollLinesCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(isNaN(params)) {
|
||||
messagePlayerError(client, "The line amount must be a number!");
|
||||
messagePlayerError(client, `The line amount must be a number!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(toInteger(params) < 1 || toInteger(params) > 6) {
|
||||
messagePlayerError(client, "The line amount must be between 1 and 6!");
|
||||
messagePlayerError(client, `The line amount must be between 1 and 6!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ function loginSuccess(client) {
|
||||
|
||||
if(getPlayerData(client).subAccounts.length == 0) {
|
||||
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerPromptGUI(client, "You have no characters. Would you like to make one?", "No characters");
|
||||
showPlayerPromptGUI(client, `You have no characters. Would you like to make one?`, "No characters");
|
||||
getPlayerData(client).promptType = VRR_PROMPT_CREATEFIRSTCHAR;
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`);
|
||||
} else {
|
||||
@@ -514,7 +514,7 @@ function loginSuccess(client) {
|
||||
sendRemovedWorldObjectsToPlayer(client);
|
||||
sendPlayerChatScrollLines(client, getPlayerData(client).accountData.chatScrollLines);
|
||||
|
||||
messagePlayerNormal(null, `👋 ${client.name} has joined the server`, getColourByName("softYellow"));
|
||||
messagePlayerNormal(null, `👋 ${getPlayerName(client)} has joined the server`, getColourByName("softYellow"));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -705,7 +705,7 @@ function checkLogin(client, password) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isAccountPasswordCorrect(getPlayerData(client).accountData, hashAccountPassword(client.name, password))) {
|
||||
if(!isAccountPasswordCorrect(getPlayerData(client).accountData, hashAccountPassword(getPlayerName(client), password))) {
|
||||
logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (wrong password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
|
||||
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerLoginFailedGUI(client, `Invalid password! ${getPlayerData(client).loginAttemptsRemaining} tries remaining.`);
|
||||
@@ -727,7 +727,7 @@ function checkLogin(client, password) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkRegistration(client, password, confirmPassword = "", emailAddress = "") {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Account]: Checking registration for " + toString(client.name));
|
||||
logToConsole(LOG_DEBUG, "[VRR.Account]: Checking registration for " + toString(getPlayerName(client)));
|
||||
|
||||
if(isPlayerRegistered(client)) {
|
||||
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
|
||||
@@ -794,7 +794,7 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
|
||||
}
|
||||
}
|
||||
|
||||
let accountData = createAccount(client.name, password, emailAddress);
|
||||
let accountData = createAccount(getPlayerName(client), password, emailAddress);
|
||||
if(!accountData) {
|
||||
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerRegistrationFailedGUI(client, "Your account could not be created!");
|
||||
@@ -855,7 +855,7 @@ function savePlayerToDatabase(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account]: Saving client ${client.name} to database ...`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account]: Saving client ${getPlayerName(client)} to database ...`);
|
||||
saveAccountToDatabase(getPlayerData(client).accountData);
|
||||
|
||||
if(getPlayerData(client).currentSubAccount != -1) {
|
||||
@@ -899,7 +899,7 @@ function initClient(client) {
|
||||
if(client != null) {
|
||||
|
||||
clearChatBox(client);
|
||||
let tempAccountData = loadAccountFromName(client.name, true);
|
||||
let tempAccountData = loadAccountFromName(getPlayerName(client), true);
|
||||
let tempSubAccounts = loadSubAccountsFromAccount(tempAccountData.databaseId);
|
||||
|
||||
getServerData().clients[client.index] = new serverClasses.clientData(client, tempAccountData, tempSubAccounts);
|
||||
@@ -918,7 +918,7 @@ function initClient(client) {
|
||||
showPlayerLoginGUI(client);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`);
|
||||
messagePlayerNormal(client, `Welcome back to Asshat Gaming RP, ${client.name}! Please /login to continue.`, getColourByName("softGreen"));
|
||||
messagePlayerNormal(client, `Welcome back to Asshat Gaming RP, ${getPlayerName(client)}! Please /login to continue.`, getColourByName("softGreen"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -927,7 +927,7 @@ function initClient(client) {
|
||||
showPlayerRegistrationGUI(client);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled).`);
|
||||
messagePlayerNormal(client, `Welcome to Asshat Gaming RP, ${client.name}! Please /register to continue.`, getColourByName("softGreen"));
|
||||
messagePlayerNormal(client, `Welcome to Asshat Gaming RP, ${getPlayerName(client)}! Please /register to continue.`, getColourByName("softGreen"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -939,7 +939,7 @@ function initClient(client) {
|
||||
function saveConnectionToDatabase(client) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
let safeName = escapeDatabaseString(dbConnection, client.name);
|
||||
let safeName = escapeDatabaseString(dbConnection, getPlayerName(client));
|
||||
let dbQueryString = `INSERT INTO conn_main (conn_when_connect, conn_server, conn_script_version, conn_game_version, conn_client_version, conn_name, conn_ip) VALUES (UNIX_TIMESTAMP(), ${getServerConfig().databaseId}, '${scriptVersion}', '${client.gameVersion}', '0.0.0', '${safeName}', INET_ATON('${client.ip}'))`;
|
||||
let query = queryDatabase(dbConnection, dbQueryString);
|
||||
setEntityData(client, "ag.connection", getDatabaseInsertId(dbConnection));
|
||||
|
||||
@@ -82,7 +82,7 @@ function ipBanCommand(command, params, client, fromDiscord) {
|
||||
let targetClient = getPlayerFromParams(splitParams[0]);
|
||||
let reason = splitParams.slice(1).join(" ");
|
||||
|
||||
messageAdminAction(`${targetClient.name} has been IP banned.`);
|
||||
messageAdminAction(`${targetgetPlayerName(client)} has been IP banned.`);
|
||||
banIPAddress(targetClient.ip, getPlayerData(client).accountData.databaseId, reason);
|
||||
server.banIP(targetClient.ip);
|
||||
targetClient.disconnect();
|
||||
@@ -107,7 +107,7 @@ function subNetBanCommand(command, params, client, fromDiscord) {
|
||||
let octetAmount = Number(splitParams[1]);
|
||||
let reason = splitParams.slice(2).join(" ");
|
||||
|
||||
messageAdminAction(`${targetClient.name} has been banned from the server (subnet ban).`);
|
||||
messageAdminAction(`${targetgetPlayerName(client)} has been banned from the server (subnet ban).`);
|
||||
banSubNet(targetClient.ip, getSubNet(targetClient.ip, octetAmount), getPlayerData(client).accountData.databaseId, reason);
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ function createBusinessCommand(command, params, client) {
|
||||
|
||||
saveBusinessToDatabase(getServerData().businesses.length-1);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]created business [#0099FF]${tempBusinessData.name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}created business ${getInlineChatColourByType("businessBlue")}${tempBusinessData.name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -145,7 +145,7 @@ function createBusinessLocationCommand(command, params, client) {
|
||||
let tempBusinessLocationData = createBusinessLocation(locationType, businessId);
|
||||
getServerData().businesses[businessId].push(tempBusinessLocationData);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]created location [#0099FF]${params} [#FFFFFF]for business [#0099FF]${tempBusinessData.name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}created location ${getInlineChatColourByType("businessBlue")}${params} ${getInlineChatColourByName("white")}for business ${getInlineChatColourByType("businessBlue")}${tempBusinessData.name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -185,7 +185,7 @@ function deleteBusinessCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]deleted business [#0099FF]${getBusinessData(businessId).name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}deleted business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name}`);
|
||||
deleteBusiness(businessId, getPlayerData(client).accountData.databaseId);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ function setBusinessNameCommand(command, params, client) {
|
||||
let oldBusinessName = getBusinessData(businessId).name;
|
||||
getBusinessData(businessId).name = newBusinessName;
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.name", getBusinessData(businessId).name, true);
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]renamed business [#0099FF]${oldBusinessName} [#FFFFFF]to [#0099FF]${newBusinessName}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}renamed business ${getInlineChatColourByType("businessBlue")}${oldBusinessName} ${getInlineChatColourByName("white")}to ${getInlineChatColourByType("businessBlue")}${newBusinessName}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -233,7 +233,7 @@ function setBusinessOwnerCommand(command, params, client) {
|
||||
|
||||
getBusinessData(businessId).ownerType = VRR_BIZOWNER_PLAYER;
|
||||
getBusinessData(businessId).ownerId = getServerData().clients[newBusinessOwner.index].accountData.databaseId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner to [#AAAAAA]${newBusinessOwner.name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}owner to ${getInlineChatColourByName("lightGrey")}${newBusinessOwner.name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -254,7 +254,7 @@ function setBusinessClanCommand(command, params, client) {
|
||||
|
||||
getBusinessData(businessId).ownerType = VRR_BIZOWNER_CLAN;
|
||||
getBusinessData(businessId).ownerId = getClanData(clanId).databaseId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner to the [#FF9900]${getClanData(clanId).name} [#FFFFFF]clan`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}owner to the ${getInlineChatColourByType("clanOrange")}${getClanData(clanId).name} ${getInlineChatColourByName("white")}clan`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -285,7 +285,7 @@ function setBusinessJobCommand(command, params, client) {
|
||||
|
||||
getBusinessData(businessId).ownerType = VRR_BIZOWNER_JOB;
|
||||
getBusinessData(businessId).ownerId = getJobData(jobId).databaseId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner to the [#FFFF00]${getJobData(jobId).name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}owner to the ${getInlineChatColourByType("jobYellow")}${getJobData(jobId).name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -304,7 +304,7 @@ function setBusinessPublicCommand(command, params, client) {
|
||||
|
||||
getBusinessData(businessId).ownerType = VRR_BIZOWNER_PUBLIC;
|
||||
getBusinessData(businessId).ownerId = 0;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner set to [#AAAAAA]public`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}owner set to ${getInlineChatColourByName("lightGrey")}public`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -323,7 +323,7 @@ function lockBusinessCommand(command, params, client) {
|
||||
|
||||
getBusinessData(businessId).locked = !getBusinessData(businessId).locked;
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.locked", getBusinessData(businessId).locked, true);
|
||||
messagePlayerSuccess(client, `${getLockedUnlockedEmojiFromBool((getBusinessData(businessId).locked))} Business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]${getLockedUnlockedTextFromBool((getBusinessData(businessId).locked))}!`);
|
||||
messagePlayerSuccess(client, `${getLockedUnlockedEmojiFromBool((getBusinessData(businessId).locked))} Business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}${getLockedUnlockedTextFromBool((getBusinessData(businessId).locked))}!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -339,7 +339,7 @@ function setBusinessEntranceFeeCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getBusinessData(businessId).entranceFee = entranceFee;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]entrance fee to [#AAAAAAA]$${entranceFee}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}entrance fee to [#AAAAAAA]$${entranceFee}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -380,7 +380,7 @@ function getBusinessInfoCommand(command, params, client) {
|
||||
break;
|
||||
}
|
||||
|
||||
messagePlayerInfo(client, `🏢 [#0099FF][Business Info] [#FFFFFF]Name: [#AAAAAA]${getBusinessData(businessId).name}, [#FFFFFF]Owner: [#AAAAAA]${ownerName} (${getBusinessOwnerTypeText(getBusinessData(businessId).ownerType)}), [#FFFFFF]Locked: [#AAAAAA]${getYesNoFromBool(intToBool(getBusinessData(businessId).locked))}, [#FFFFFF]ID: [#AAAAAA]${businessId}/${getBusinessData(businessId).databaseId}`);
|
||||
messagePlayerInfo(client, `🏢 ${getInlineChatColourByType("businessBlue")}[Business Info] ${getInlineChatColourByName("white")}Name: ${getInlineChatColourByName("lightGrey")}${getBusinessData(businessId).name}, ${getInlineChatColourByName("white")}Owner: ${getInlineChatColourByName("lightGrey")}${ownerName} (${getBusinessOwnerTypeText(getBusinessData(businessId).ownerType)}), ${getInlineChatColourByName("white")}Locked: ${getInlineChatColourByName("lightGrey")}${getYesNoFromBool(intToBool(getBusinessData(businessId).locked))}, ${getInlineChatColourByName("white")}ID: ${getInlineChatColourByName("lightGrey")}${businessId}/${getBusinessData(businessId).databaseId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -398,7 +398,7 @@ function setBusinessPickupCommand(command, params, client) {
|
||||
if(isNaN(typeParam)) {
|
||||
if(isNull(getGameConfig().pickupModels[getServerGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid business type! Use a business type name or a pickup model ID");
|
||||
messagePlayerInfo(client, `Pickup Types: [#AAAAAA]${Object.keys(getGameConfig().pickupModels[getServerGame()]).join(", ")}`)
|
||||
messagePlayerInfo(client, `Pickup Types: ${getInlineChatColourByName("lightGrey")}${Object.keys(getGameConfig().pickupModels[getServerGame()]).join(", ")}`)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ function setBusinessPickupCommand(command, params, client) {
|
||||
createBusinessEntrancePickup(businessId);
|
||||
createBusinessExitPickup(businessId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]pickup display to [#AAAAAA]${toLowerCase(typeParam)}'!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}pickup display to ${getInlineChatColourByName("lightGrey")}${toLowerCase(typeParam)}'!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -432,17 +432,17 @@ function setBusinessInteriorTypeCommand(command, params, client) {
|
||||
getBusinessData(businessId).exitPosition = toVector3(0.0, 0.0, 0.0);
|
||||
getBusinessData(businessId).exitInterior = 0;
|
||||
getBusinessData(businessId).hasInterior = false;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]remove business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]interior`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}remove business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}interior`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isNull(getGameConfig().interiorTemplates[getServerGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid interior type! Use an interior type name or an existing business database ID");
|
||||
messagePlayerInfo(client, `Interior Types: [#AAAAAA]${Object.keys(getGameConfig().interiorTemplates[getServerGame()]).join(", ")}`)
|
||||
messagePlayerInfo(client, `Interior Types: ${getInlineChatColourByName("lightGrey")}${Object.keys(getGameConfig().interiorTemplates[getServerGame()]).join(", ")}`)
|
||||
return false;
|
||||
}
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]interior type to [#AAAAAA]${toLowerCase(typeParam)}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}interior type to ${getInlineChatColourByName("lightGrey")}${toLowerCase(typeParam)}`);
|
||||
getBusinessData(businessId).exitPosition = getGameConfig().interiorTemplates[getServerGame()][typeParam].exitPosition;
|
||||
getBusinessData(businessId).exitInterior = getGameConfig().interiorTemplates[getServerGame()][typeParam].exitInterior;
|
||||
getBusinessData(businessId).exitDimension = getBusinessData(businessId).databaseId+getGlobalConfig().businessDimensionStart;
|
||||
@@ -480,7 +480,7 @@ function setBusinessBlipCommand(command, params, client) {
|
||||
if(isNaN(typeParam)) {
|
||||
if(isNull(getGameConfig().blipSprites[getServerGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid business type! Use a business type name or a blip image ID");
|
||||
messagePlayerInfo(client, `Blip Types: [#AAAAAA]${Object.keys(getGameConfig().blipSprites[getServerGame()]).join(", ")}`)
|
||||
messagePlayerInfo(client, `Blip Types: ${getInlineChatColourByName("lightGrey")}${Object.keys(getGameConfig().blipSprites[getServerGame()]).join(", ")}`)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ function setBusinessBlipCommand(command, params, client) {
|
||||
createBusinessLocationEntranceBlip(businessId, closestEntrance.index);
|
||||
createBusinessLocationExitBlip(businessId, closestEntrance.index);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]blip display to [#AAAAAA]${toLowerCase(typeParam)}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}blip display to ${getInlineChatColourByName("lightGrey")}${toLowerCase(typeParam)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -515,7 +515,7 @@ function giveDefaultItemsToBusinessCommand(command, params, client) {
|
||||
|
||||
if(isNull(getGameConfig().defaultBusinessItems[getServerGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid business items type! Use a business items type name");
|
||||
messagePlayerInfo(client, `Blip Types: [#AAAAAA]${Object.keys(getGameConfig().defaultBusinessItems[getServerGame()]).join(", ")}`)
|
||||
messagePlayerInfo(client, `Blip Types: ${getInlineChatColourByName("lightGrey")}${Object.keys(getGameConfig().defaultBusinessItems[getServerGame()]).join(", ")}`)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ function giveDefaultItemsToBusinessCommand(command, params, client) {
|
||||
|
||||
cacheBusinessItems(businessId);
|
||||
updateBusinessPickupLabelData(businessId);
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]gave business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]the default items for ${toLowerCase(typeParam)}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}gave business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}the default items for ${toLowerCase(typeParam)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -552,7 +552,7 @@ function deleteBusinessFloorItemsCommand(command, params, client) {
|
||||
|
||||
cacheBusinessItems(businessId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]deleted all on-sale items for business [#0099FF]${getBusinessData(businessId).name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}deleted all on-sale items for business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -574,7 +574,7 @@ function deleteBusinessStorageItemsCommand(command, params, client) {
|
||||
|
||||
cacheBusinessItems(businessId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]deleted all stored items for business [#0099FF]${getBusinessData(businessId).name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}deleted all stored items for business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -596,14 +596,14 @@ function withdrawFromBusinessCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(getBusinessData(businessId).till < amount) {
|
||||
messagePlayerError(client, `Business [#0099FF]${tempBusinessData.name} doesn't have that much money! Use /bizbalance.`);
|
||||
messagePlayerError(client, `Business ${getInlineChatColourByType("businessBlue")}${tempBusinessData.name} doesn't have that much money! Use /bizbalance.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
getBusinessData(businessId).till -= amount;
|
||||
givePlayerCash(client, amount);
|
||||
updatePlayerCash(client);
|
||||
messagePlayerSuccess(client, `You withdrew $${amount} from business [#0099FF]${getBusinessData(businessId).name} till`);
|
||||
messagePlayerSuccess(client, `You withdrew $${amount} from business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} till`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -631,7 +631,7 @@ function setBusinessBuyPriceCommand(command, params, client) {
|
||||
|
||||
getBusinessData(businessId).buyPrice = amount;
|
||||
setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.price", getBusinessData(businessId).buyPrice, true);
|
||||
messagePlayerSuccess(client, `[#FFFFFF]You set business [#0099FF]${getBusinessData(businessId).name}'s [#FFFFFF]for-sale price to [#AAAAAA]$${makeLargeNumberReadable(amount)}`);
|
||||
messagePlayerSuccess(client, `${getInlineChatColourByName("white")}You set business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name}'s ${getInlineChatColourByName("white")}for-sale price to ${getInlineChatColourByName("lightGrey")}$${makeLargeNumberReadable(amount)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -660,7 +660,7 @@ function depositIntoBusinessCommand(command, params, client) {
|
||||
getBusinessData(businessId).till += amount;
|
||||
takePlayerCash(client, amount);
|
||||
updatePlayerCash(client);
|
||||
messagePlayerSuccess(client, `You deposited $${amount} into business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]till`);
|
||||
messagePlayerSuccess(client, `You deposited $${amount} into business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}till`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -680,8 +680,8 @@ function orderItemForBusinessCommand(command, params, client) {
|
||||
let itemType = getItemTypeFromParams(splitParams.slice(0,-2).join(" "));
|
||||
|
||||
if(!getItemTypeData(itemType)) {
|
||||
messagePlayerError(client, "Invalid item type name or ID!");
|
||||
messagePlayerInfo(client, "Use [#AAAAAA]/itemtypes [#FFFFFF]for a list of items");
|
||||
messagePlayerError(client, `Invalid item type name or ID!`);
|
||||
messagePlayerInfo(client, `Use ${getInlineChatColourByName("lightGrey")}/itemtypes ${getInlineChatColourByName("white")}for a list of items`);
|
||||
return false;
|
||||
}
|
||||
let pricePerItem = getOrderPriceForItemType(itemType);
|
||||
@@ -714,13 +714,13 @@ function orderItemForBusinessCommand(command, params, client) {
|
||||
function orderItemForBusiness(businessId, itemType, amount) {
|
||||
if(getBusinessData(businessId).till < orderTotalCost) {
|
||||
let neededAmount = orderTotalCost-getBusinessData(businessId).till;
|
||||
//messagePlayerError(client, `The business doesn't have enough money (needs [#AAAAAA]$${neededAmount} [#FFFFFF]more)! Use [#AAAAAA]/bizdeposit [#FFFFFF]to add money to the business.`);
|
||||
//messagePlayerError(client, `The business doesn't have enough money (needs ${getInlineChatColourByName("lightGrey")}$${neededAmount} ${getInlineChatColourByName("white")}more)! Use ${getInlineChatColourByName("lightGrey")}/bizdeposit ${getInlineChatColourByName("white")}to add money to the business.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
getBusinessData(businessId).till -= orderTotalCost;
|
||||
addToBusinessInventory(businessId, itemType, amount);
|
||||
//messagePlayerSuccess(client, `You ordered ${amount} ${getPluralForm(getItemTypeData(itemType).name)} (${getItemValueDisplay(itemType, value)}) at $${getItemTypeData(itemType).orderPrice} each for business [#0099FF]${getBusinessData(businessId).name}`);
|
||||
//messagePlayerSuccess(client, `You ordered ${amount} ${getPluralForm(getItemTypeData(itemType).name)} (${getItemValueDisplay(itemType, value)}) at $${getItemTypeData(itemType).orderPrice} each for business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -737,7 +737,7 @@ function viewBusinessTillAmountCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerSuccess(client, `Business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]till has [#AAAAAA]$${getBusinessData(businessId).till}`);
|
||||
messagePlayerSuccess(client, `Business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}till has ${getInlineChatColourByName("lightGrey")}$${getBusinessData(businessId).till}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -751,12 +751,12 @@ function buyBusinessCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(getBusinessData(businessId).buyPrice <= 0) {
|
||||
messagePlayerError(client, `Business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]is not for sale!`);
|
||||
messagePlayerError(client, `Business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}is not for sale!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getPlayerCurrentSubAccount(client).cash < getBusinessData(businessId).buyPrice) {
|
||||
messagePlayerError(client, `You don't have enough money to buy business [#0099FF]${getBusinessData(businessId).name}!`);
|
||||
messagePlayerError(client, `You don't have enough money to buy business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name}!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -766,7 +766,7 @@ function buyBusinessCommand(command, params, client) {
|
||||
|
||||
updateBusinessPickupLabelData(businessId);
|
||||
|
||||
messagePlayerSuccess(client, `Business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]till has [#AAAAAA]$${getBusinessData(businessId).till}`);
|
||||
messagePlayerSuccess(client, `Business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}till has ${getInlineChatColourByName("lightGrey")}$${getBusinessData(businessId).till}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -793,7 +793,7 @@ function moveBusinessEntranceCommand(command, params, client) {
|
||||
createBusinessEntranceBlip(businessId);
|
||||
createBusinessEntrancePickup(businessId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]moved business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]entrance to their position`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}moved business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}entrance to their position`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -820,7 +820,7 @@ function moveBusinessExitCommand(command, params, client) {
|
||||
createBusinessExitBlip(businessId);
|
||||
createBusinessExitPickup(businessId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]moved business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]exit to their position`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}moved business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}exit to their position`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -935,6 +935,8 @@ function saveBusinessToDatabase(businessId) {
|
||||
${tempBusinessData.exitBlipModel},
|
||||
${boolToInt(tempBusinessData.hasInterior)}
|
||||
)`;
|
||||
|
||||
dbQueryString = dbQueryString.replace(/(?:\r\n|\r|\n|\t)/g, "");
|
||||
queryDatabase(dbConnection, dbQueryString);
|
||||
getServerData().businesses[businessId].databaseId = getDatabaseInsertId(dbConnection);
|
||||
} else {
|
||||
@@ -1013,7 +1015,13 @@ function createBusinessLocationEntrancePickup(businessId, locationId) {
|
||||
pickupModelId = getBusinessData(businessId).locations[locationId].entrancePickupModel;
|
||||
}
|
||||
|
||||
|
||||
getBusinessData(businessId).locations[locationId].entrancePickup = gta.createPickup(pickupModelId, getBusinessData(businessId).locations[locationId].entrancePosition);
|
||||
getBusinessData(businessId).locations[locationId].entrancePickup.onAllDimensions = false;
|
||||
getBusinessData(businessId).locations[locationId].entrancePickup.dimension = getBusinessData(businessId).locations[locationId].entranceDimension;
|
||||
getBusinessData(businessId).locations[locationId].entrancePickup.setData("ag.owner.type", VRR_PICKUP_BUSINESS_ENTRANCE, false);
|
||||
getBusinessData(businessId).locations[locationId].entrancePickup.setData("ag.owner.id", businessId, false);
|
||||
getBusinessData(businessId).locations[locationId].entrancePickup.setData("ag.label.type", VRR_LABEL_BUSINESS, true);
|
||||
//addToWorld(getBusinessData(businessId).locations[locationId].entrancePickup);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1032,7 +1040,7 @@ function createBusinessLocationEntranceBlip(businessId, locationId) {
|
||||
getBusinessData(businessId).locations[locationId].entranceBlip.dimension = getBusinessData(businessId).locations[locationId].entranceDimension;
|
||||
getBusinessData(businessId).locations[locationId].entranceBlip.setData("ag.owner.type", VRR_BLIP_BUSINESS_ENTRANCE, false);
|
||||
getBusinessData(businessId).locations[locationId].entranceBlip.setData("ag.owner.id", businessId, false);
|
||||
addToWorld(getBusinessData(businessId).locations[locationId].entranceBlip);
|
||||
//addToWorld(getBusinessData(businessId).locations[locationId].entranceBlip);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1053,7 +1061,7 @@ function createBusinessLocationExitPickup(businessId, locationId) {
|
||||
getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.owner.type", VRR_PICKUP_BUSINESS_EXIT, false);
|
||||
getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.owner.id", businessId, false);
|
||||
getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.label.type", VRR_LABEL_EXIT, true);
|
||||
addToWorld(getBusinessData(businessId).locations[locationId].exitPickup);
|
||||
//addToWorld(getBusinessData(businessId).locations[locationId].exitPickup);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1075,7 +1083,7 @@ function createBusinessLocationExitBlip(businessId, locationId) {
|
||||
//getBusinessData(businessId).exitBlip.interior = getBusinessData(businessId).exitInterior;
|
||||
getBusinessData(businessId).locations[locationId].exitBlip.setData("ag.owner.type", VRR_BLIP_BUSINESS_EXIT, false);
|
||||
getBusinessData(businessId).locations[locationId].exitBlip.setData("ag.owner.id", businessId, false);
|
||||
addToWorld(getBusinessData(businessId).locations[locationId].exitBlip);
|
||||
//addToWorld(getBusinessData(businessId).locations[locationId].exitBlip);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1183,6 +1191,8 @@ function doesBusinessHaveInterior(businessId) {
|
||||
return getBusinessData(businessId).hasInterior;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function deleteBusinessEntrancePickups(businessId) {
|
||||
for(let i in getServerData().businesses[businessId].locations) {
|
||||
deleteBusinessLocationEntrancePickup(businessId, i);
|
||||
@@ -1327,7 +1337,7 @@ function buyFromBusinessCommand(command, params, client) {
|
||||
if(getBusinessData(businessId).hasInterior) {
|
||||
if(!getPlayerBusiness(client)) {
|
||||
if(doesPlayerHaveKeyBindForCommand(client, "enter")) {
|
||||
messagePlayerTip(client, `You need to enter the business first! Press [#AAAAAA]${sdl.getKeyName(getPlayerKeyBindForCommand(client, "enter").key)} [#FFFFFF]to enter and exit a business`);
|
||||
messagePlayerTip(client, `You need to enter the business first! Press ${getInlineChatColourByName("lightGrey")}${sdl.getKeyName(getPlayerKeyBindForCommand(client, "enter").key)} ${getInlineChatColourByName("white")}to enter and exit a business`);
|
||||
} else {
|
||||
messagePlayerNormal(client, `You need to enter the business first! Use /enter to enter and exit a business`);
|
||||
}
|
||||
@@ -1357,7 +1367,7 @@ function buyFromBusinessCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(getPlayerCurrentSubAccount(client).cash < getBusinessData(businessId).floorItemCache[itemSlot-1].buyPrice*amount) {
|
||||
messagePlayerError(client, `You don't have enough money! You need [#AAAAAA]${getBusinessData(businessId).floorItemCache[itemSlot-1].buyPrice*amount-getPlayerCurrentSubAccount(client).cash} [#FFFFFF]more!`);
|
||||
messagePlayerError(client, `You don't have enough money! You need ${getInlineChatColourByName("lightGrey")}${getBusinessData(businessId).floorItemCache[itemSlot-1].buyPrice*amount-getPlayerCurrentSubAccount(client).cash} ${getInlineChatColourByName("white")}more!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1387,7 +1397,7 @@ function buyFromBusinessCommand(command, params, client) {
|
||||
destroyItem(getBusinessData(businessId).floorItemCache[itemSlot-1]);
|
||||
}
|
||||
|
||||
messagePlayerSuccess(client, `You bought ${amount} [#AAAAAA]${itemName} [#FFFFFF]for ${totalCost} ${priceEach}`);
|
||||
messagePlayerSuccess(client, `You bought ${amount} ${getInlineChatColourByName("lightGrey")}${itemName} ${getInlineChatColourByName("white")}for ${totalCost} ${priceEach}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1422,7 +1432,7 @@ function setBusinessItemSellPriceCommand(command, params, client) {
|
||||
|
||||
getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).buyPrice = newPrice;
|
||||
|
||||
messagePlayerSuccess(client, `You changed the price of the [#AAAAAA]${getItemTypeData(getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).itemTypeIndex).name}'s [#FFFFFF]in slot [#AAAAAA]${itemSlot} [#FFFFFF]from $${makeLargeNumberReadable(oldPrice)} to $${makeLargeNumberReadable(newprice)}`);
|
||||
messagePlayerSuccess(client, `You changed the price of the ${getInlineChatColourByName("lightGrey")}${getItemTypeData(getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).itemTypeIndex).name}'s ${getInlineChatColourByName("white")}in slot ${getInlineChatColourByName("lightGrey")}${itemSlot} ${getInlineChatColourByName("white")}from $${makeLargeNumberReadable(oldPrice)} to $${makeLargeNumberReadable(newprice)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -106,7 +106,7 @@ function adminChatCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messageAdmins(`[#FFFF00][Admin Chat] [#AAAAAA]${client.name} [#CCCCCC](${getPlayerStaffTitle(client)})[#FFFFFF]: ${params}`);
|
||||
messageAdmins(`${getInlineChatColourByType("jobYellow")}[Admin Chat] ${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} [#CCCCCC](${getPlayerStaffTitle(client)})${getInlineChatColourByName("white")}: ${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -141,7 +141,7 @@ function talkToNearbyPlayers(client, messageText) {
|
||||
function phoneOutgoingToNearbyPlayers(client, messageText) {
|
||||
let clients = getClientsInRange(getPlayerPosition(client), getGlobalConfig().talkDistance);
|
||||
for(let i in clients) {
|
||||
messagePlayerNormal(`[#CCCCCC]${getCharacterFullName(client)} [#AAAAAA](to phone): [#FFFFFF]${messageText}`);
|
||||
messagePlayerNormal(`[#CCCCCC]${getCharacterFullName(client)} ${getInlineChatColourByName("lightGrey")}(to phone): ${getInlineChatColourByName("white")}${messageText}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ function phoneOutgoingToNearbyPlayers(client, messageText) {
|
||||
function phoneIncomingToNearbyPlayers(client, messageText) {
|
||||
let clients = getClientsInRange(getPlayerPosition(client), getGlobalConfig().radioSpeakerDistance);
|
||||
for(let i in clients) {
|
||||
messagePlayerNormal(`[#CCCCCC]${getCharacterFullName(client)} [#AAAAAA](from phone): [#FFFFFF]${messageText}`);
|
||||
messagePlayerNormal(`[#CCCCCC]${getCharacterFullName(client)} ${getInlineChatColourByName("lightGrey")}(from phone): ${getInlineChatColourByName("white")}${messageText}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ function createClanCommand(command, params, client) {
|
||||
|
||||
// Create clan without owner. Can set owner with /clanowner afterward
|
||||
createClan(params);
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]created clan[#FF9900]${params}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}created clan ${getInlineChatColourByType("clanOrange")}${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -162,7 +162,7 @@ function deleteClanCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]deleted clan[#FF9900]${getClanData(clanId).name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}deleted clan ${getInlineChatColourByType("clanOrange")}${getClanData(clanId).name}`);
|
||||
deleteClan(clanId);
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ function setClanOwnerCommand(command, params, client) {
|
||||
getClanData(clanId).owner = getPlayerCurrentSubAccount(targetClient).databaseId;
|
||||
getPlayerCurrentSubAccount(targetClient).clanFlags = getClanFlagValue("all");
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set clan[#FF9900]${getClanData(clanId).name} [#FFFFFF]owner to [#AAAAAA]${getCharacterFullName(targetClient)}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set clan ${getInlineChatColourByType("clanOrange")}${getClanData(clanId).name} ${getInlineChatColourByName("white")}owner to ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(targetClient)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -221,7 +221,7 @@ function setClanTagCommand(command, params, client) {
|
||||
|
||||
getClanData(clanId).params = params;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set clan[#FF9900]${getClanData(clanId).index} [#FFFFFF]tag to [#AAAAAA]${params}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set clan ${getInlineChatColourByType("clanOrange")}${getClanData(clanId).index} ${getInlineChatColourByName("white")}tag to ${getInlineChatColourByName("lightGrey")}${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -246,7 +246,7 @@ function setClanNameCommand(command, params, client) {
|
||||
|
||||
getClanData(clanId).name = params;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set clan[#FF9900]${getClanData(clanId).index} [#FFFFFF]name to [#AAAAAA]${params}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set clan ${getInlineChatColourByType("clanOrange")}${getClanData(clanId).index} ${getInlineChatColourByName("white")}name to ${getInlineChatColourByName("lightGrey")}${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -278,8 +278,8 @@ function setClanMemberTagCommand(command, params, client) {
|
||||
|
||||
getPlayerCurrentSubAccount(targetClient).clanTag = tag;
|
||||
|
||||
messagePlayerSuccess(client, `You set [#AAAAAA]${getCharacterFullName(targetClient)}'s [#FFFFFF]clan tag to [#AAAAAA]${tag}`);
|
||||
messagePlayerAlert(client, `[#AAAAAA]${getCharacterFullName(targetClient)} [#FFFFFF]set your clan tag to [#AAAAAA]${tag}`);
|
||||
messagePlayerSuccess(client, `You set ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(targetClient)}'s ${getInlineChatColourByName("white")}clan tag to ${getInlineChatColourByName("lightGrey")}${tag}`);
|
||||
messagePlayerAlert(client, `${getInlineChatColourByName("lightGrey")}${getCharacterFullName(targetClient)} ${getInlineChatColourByName("white")}set your clan tag to ${getInlineChatColourByName("lightGrey")}${tag}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -346,7 +346,7 @@ function addClanMemberFlagCommand(command, params, client) {
|
||||
|
||||
let flagValue = getClanFlagValue(splitParams[1]);
|
||||
getPlayerCurrentSubAccount(client).clanFlags = getPlayerCurrentSubAccount(client).clanFlags | flagValue;
|
||||
messagePlayerSuccess(client, `You added the [#AAAAAA]${splitParams[1]} [#FFFFFF]clan flag to [#AAAAAA]${getCharacterFullName(client)}`);
|
||||
messagePlayerSuccess(client, `You added the ${getInlineChatColourByName("lightGrey")}${splitParams[1]} ${getInlineChatColourByName("white")}clan flag to ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(client)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -383,7 +383,7 @@ function removeClanMemberFlagCommand(command, params, client) {
|
||||
|
||||
let flagValue = getClanFlagValue(splitParams[1]);
|
||||
getPlayerCurrentSubAccount(client).clanFlags = getPlayerCurrentSubAccount(client).clanFlags & ~flagValue;
|
||||
messagePlayerSuccess(client, `You removed the [#AAAAAA]${splitParams[1]} [#FFFFFF]clan flag from [#AAAAAA]${getCharacterFullName(client)}`);
|
||||
messagePlayerSuccess(client, `You removed the ${getInlineChatColourByName("lightGrey")}${splitParams[1]} ${getInlineChatColourByName("white")}clan flag from ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(client)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -421,7 +421,7 @@ function addClanRankFlagCommand(command, params, client) {
|
||||
let flagValue = getClanFlagValue(splitParams[1]);
|
||||
|
||||
getClanRankData(clanId, rankId).flags = getClanRankData(clanId, rankId).flags | flagValue;
|
||||
messagePlayerSuccess(client, `You added the [#AAAAAA]${splitParams[1]} [#FFFFFF]clan flag to rank [#AAAAAA]${getClanRankData(clanId, rankId).name}`);
|
||||
messagePlayerSuccess(client, `You added the ${getInlineChatColourByName("lightGrey")}${splitParams[1]} ${getInlineChatColourByName("white")}clan flag to rank ${getInlineChatColourByName("lightGrey")}${getClanRankData(clanId, rankId).name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -459,7 +459,7 @@ function removeClanRankFlagCommand(command, params, client) {
|
||||
let flagValue = getClanFlagValue(splitParams[1]);
|
||||
|
||||
getClanRankData(clanId, rankId).flags = getClanRankData(clanId, rankId).flags & ~flagValue;
|
||||
messagePlayerSuccess(client, `You removed the [#AAAAAA]${splitParams[1]} [#FFFFFF]clan flag from rank [#AAAAAA]${getClanRankData(clanId, rankId).name}`);
|
||||
messagePlayerSuccess(client, `You removed the ${getInlineChatColourByName("lightGrey")}${splitParams[1]} ${getInlineChatColourByName("white")}clan flag from rank ${getInlineChatColourByName("lightGrey")}${getClanRankData(clanId, rankId).name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -491,7 +491,7 @@ function setClanMemberTitleCommand(command, params, client) {
|
||||
|
||||
let oldMemberTitle = getPlayerCurrentSubAccount(client).clanTitle;
|
||||
getPlayerCurrentSubAccount(client).clanTitle = params;
|
||||
messagePlayerSuccess(client, `You changed the name of [#AAAAAA]${getCharacterFullName(client)} [#FFFFFF]from [#AAAAAA]${oldMemberTitle} [#FFFFFF]to [#AAAAAA]${params}`);
|
||||
messagePlayerSuccess(client, `You changed the name of ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(client)} ${getInlineChatColourByName("white")}from ${getInlineChatColourByName("lightGrey")}${oldMemberTitle} ${getInlineChatColourByName("white")}to ${getInlineChatColourByName("lightGrey")}${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -523,7 +523,7 @@ function setClanRankTitleCommand(command, params, client) {
|
||||
|
||||
let oldRankName = getClanRankData(clanId, rankId).name;
|
||||
getClanRankData(clanId, rankId).name = params;
|
||||
messagePlayerSuccess(client, `You changed the name of rank ${rankId} from [#AAAAAA]${oldRankName} [#FFFFFF]to [#AAAAAA]${params}`);
|
||||
messagePlayerSuccess(client, `You changed the name of rank ${rankId} from ${getInlineChatColourByName("lightGrey")}${oldRankName} ${getInlineChatColourByName("white")}to ${getInlineChatColourByName("lightGrey")}${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -75,7 +75,7 @@ function addAllNetworkHandlers() {
|
||||
|
||||
function updatePlayerNameTag(client) {
|
||||
//logToConsole(LOG_DEBUG, `[VRR.Client] Sending ${getPlayerDisplayForConsole(client)}'s updated nametag to all players`);
|
||||
triggerNetworkEvent("ag.nametag", null, client.name, getPlayerNameForNameTag(client), getPlayerColour(client), false, client.ping);
|
||||
triggerNetworkEvent("ag.nametag", null, getPlayerName(client), getPlayerNameForNameTag(client), getPlayerColour(client), false, client.ping);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -92,7 +92,7 @@ function updateAllPlayerNameTags() {
|
||||
|
||||
function updatePlayerPing(client) {
|
||||
//logToConsole(LOG_DEBUG, `[VRR.Client] Sending ${getPlayerDisplayForConsole(client)}'s ping to all players`);
|
||||
triggerNetworkEvent("ag.ping", null, client.name, client.ping);
|
||||
triggerNetworkEvent("ag.ping", null, getPlayerName(client), client.ping);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -213,7 +213,7 @@ function updatePlayerSnowState(client) {
|
||||
function sendExcludedModelsForGroundSnowToPlayer(client) {
|
||||
if(getGameConfig().excludedGroundSnowModels[getServerGame()].length > 0) {
|
||||
for(let i in getGameConfig().excludedGroundSnowModels[getServerGame()]) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Misc] Sending excluded model ${i} for ground snow to ${client.name}`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Misc] Sending excluded model ${i} for ground snow to ${getPlayerName(client)}`);
|
||||
triggerNetworkEvent("ag.excludeGroundSnow", client, getGameConfig().excludedGroundSnowModels[getServerGame()][i]);
|
||||
}
|
||||
}
|
||||
@@ -224,7 +224,7 @@ function sendExcludedModelsForGroundSnowToPlayer(client) {
|
||||
function sendRemovedWorldObjectsToPlayer(client) {
|
||||
if(getGameConfig().removedWorldObjects[getServerGame()].length > 0) {
|
||||
for(let i in getGameConfig().removedWorldObjects[getServerGame()]) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending removed world object ${i} (${getGameConfig().removedWorldObjects[getServerGame()][i].model}) to ${client.name}`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending removed world object ${i} (${getGameConfig().removedWorldObjects[getServerGame()][i].model}) to ${getPlayerName(client)}`);
|
||||
triggerNetworkEvent("ag.removeWorldObject", client, getGameConfig().removedWorldObjects[getServerGame()][i].model, getGameConfig().removedWorldObjects[getServerGame()][i].position, getGameConfig().removedWorldObjects[getServerGame()][i].range);
|
||||
}
|
||||
}
|
||||
@@ -258,14 +258,14 @@ function updatePlayerHotBar(client) {
|
||||
|
||||
function setPlayerWeaponDamageEnabled(client, state) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending weapon damage state for ${getPlayerDisplayForConsole(client)} to all players`);
|
||||
triggerNetworkEvent("ag.weaponDamageEnabled", null, client.name, state);
|
||||
triggerNetworkEvent("ag.weaponDamageEnabled", null, getPlayerName(client), state);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerWeaponDamageEvent(client, eventType) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending weapon damage event (${eventType}) for ${getPlayerDisplayForConsole(client)} to all players`);
|
||||
triggerNetworkEvent("ag.weaponDamageEvent", null, client.name, eventType);
|
||||
triggerNetworkEvent("ag.weaponDamageEvent", null, getPlayerName(client), eventType);
|
||||
getPlayerData(client).weaponDamageEvent = eventType;
|
||||
}
|
||||
|
||||
|
||||
@@ -456,12 +456,12 @@ function disableCommand(command, params, client) {
|
||||
params = toLowerCase(params);
|
||||
|
||||
if(!getCommand(params)) {
|
||||
messagePlayerError(client, `The command [#AAAAAA]/${params} [#FFFFFF] does not exist!`);
|
||||
messagePlayerError(client, `The command ${getInlineChatColourByName("lightGrey")}/${params} ${getInlineChatColourByName("white")} does not exist!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
getCommand(params).enabled = false;
|
||||
messagePlayerSuccess(client, `Command [#AAAAAA]/${params} [#FFFFFF]has been disabled!`);
|
||||
messagePlayerSuccess(client, `Command ${getInlineChatColourByName("lightGrey")}/${params} ${getInlineChatColourByName("white")}has been disabled!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -476,12 +476,12 @@ function enableCommand(command, params, client) {
|
||||
params = toLowerCase(params);
|
||||
|
||||
if(!getCommand(params)) {
|
||||
messagePlayerError(client, `The command [#AAAAAA]/${params} [#FFFFFF] does not exist!`);
|
||||
messagePlayerError(client, `The command ${getInlineChatColourByName("lightGrey")}/${params} ${getInlineChatColourByName("white")} does not exist!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
getCommand(params).enabled = true;
|
||||
messagePlayerSuccess(client, `Command [#AAAAAA]/${params} [#FFFFFF]has been enabled!`);
|
||||
messagePlayerSuccess(client, `Command ${getInlineChatColourByName("lightGrey")}/${params} ${getInlineChatColourByName("white")}has been enabled!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ function disableAllCommandsByType(command, params, client) {
|
||||
params = toLowerCase(params);
|
||||
|
||||
if(isNull(getServerData().commands[params])) {
|
||||
messagePlayerError(client, `Command type [#AAAAAA]${params} [#FFFFFF]does not exist!`);
|
||||
messagePlayerError(client, `Command type ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}does not exist!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ function disableAllCommandsByType(command, params, client) {
|
||||
getServerData().commands[params][i].enabled = false;
|
||||
}
|
||||
|
||||
messagePlayerSuccess(client, `[#FF9900]All [#AAAAAA]${params} [#FFFFFF]commands have been disabled!`);
|
||||
messagePlayerSuccess(client, `${getInlineChatColourByType("clanOrange")}All ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}commands have been disabled!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ function enableAllCommandsByType(command, params, client) {
|
||||
params = toLowerCase(params);
|
||||
|
||||
if(isNull(getServerData().commands[params])) {
|
||||
messagePlayerError(client, `Command type [#AAAAAA]${params} [#FFFFFF]does not exist!`);
|
||||
messagePlayerError(client, `Command type ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}does not exist!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ function enableAllCommandsByType(command, params, client) {
|
||||
getServerData().commands[params][i].enabled = true;
|
||||
}
|
||||
|
||||
messagePlayerSuccess(client, `[#FF9900]All [#AAAAAA]${params} [#FFFFFF]commands have been enabled!`);
|
||||
messagePlayerSuccess(client, `${getInlineChatColourByType("clanOrange")}All ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}commands have been enabled!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -554,20 +554,20 @@ function processPlayerCommand(command, params, client) {
|
||||
|
||||
if(!doesCommandExist(toLowerCase(command))) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `The command [#AAAAAA]/${command} [#FFFFFF]does not exist! Use /help for commands and information.`);
|
||||
messagePlayerError(client, `The command ${getInlineChatColourByName("lightGrey")}/${command} ${getInlineChatColourByName("white")}does not exist! Use /help for commands and information.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!commandData.enabled) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `The command [#AAAAAA]/${command} [#FFFFFF]is disabled!`);
|
||||
messagePlayerError(client, `The command ${getInlineChatColourByName("lightGrey")}/${command} ${getInlineChatColourByName("white")}is disabled!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(doesCommandRequireLogin(toLowerCase(command))) {
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `You must be logged in to use the [#AAAAAA]/${command} [#FFFFFF]command!`);
|
||||
messagePlayerError(client, `You must be logged in to use the ${getInlineChatColourByName("lightGrey")}/${command} ${getInlineChatColourByName("white")}command!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -575,7 +575,7 @@ function processPlayerCommand(command, params, client) {
|
||||
//if(isClientFromDiscord(client)) {
|
||||
// if(!isCommandAllowedOnDiscord(command)) {
|
||||
// console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`);
|
||||
// messagePlayerError(client, `The [#AAAAAA]/${command} [#FFFFFF] command isn't available on discord!`);
|
||||
// messagePlayerError(client, `The ${getInlineChatColourByName("lightGrey")}/${command} ${getInlineChatColourByName("white")} command isn't available on discord!`);
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
@@ -583,7 +583,7 @@ function processPlayerCommand(command, params, client) {
|
||||
if(!client.console) {
|
||||
if(!doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(command)))) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `You do not have permission to use the [#AAAAAA]/${toLowerCase(command)} [#FFFFFF]command!`);
|
||||
messagePlayerError(client, `You do not have permission to use the ${getInlineChatColourByName("lightGrey")}/${toLowerCase(command)} ${getInlineChatColourByName("white")}command!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1053,7 +1053,7 @@ function setTimeCommand(command, params, client) {
|
||||
gta.time.hour = hour;
|
||||
gta.time.minute = minute;
|
||||
|
||||
messageAdminAction(`${client.name} set the time to ${makeReadableTime(hour, minute)}`);
|
||||
messageAdminAction(`${getPlayerName(client)} set the time to ${makeReadableTime(hour, minute)}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1070,7 +1070,7 @@ function setMinuteDurationCommand(command, params, client) {
|
||||
getServerConfig().minuteDuration = minuteDuration;
|
||||
setTimeMinuteDuration(null, minuteDuration);
|
||||
|
||||
messageAdminAction(`${client.name} set the minute duration to ${minuteDuration}ms`);
|
||||
messageAdminAction(`${getPlayerName(client)} set the minute duration to ${minuteDuration}ms`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1093,7 +1093,7 @@ function setWeatherCommand(command, params, client) {
|
||||
gta.forceWeather(toInteger(weatherId));
|
||||
getServerConfig().weather = weatherId;
|
||||
|
||||
messageAdminAction(`${client.name} set the weather to [#AAAAAA]${getGameData().weatherNames[getServerGame()][toInteger(weatherId)]}`);
|
||||
messageAdminAction(`${getPlayerName(client)} set the weather to ${getInlineChatColourByName("lightGrey")}${getGameData().weatherNames[getServerGame()][toInteger(weatherId)]}`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -1115,7 +1115,7 @@ function setSnowingCommand(command, params, client) {
|
||||
|
||||
updatePlayerSnowState(null);
|
||||
|
||||
messageAdminAction(`${client.name} turned falling snow ${getBoolRedGreenInlineColour(fallingSnow)}${getOnOffFromBool(fallingSnow)} [#FFFFFF]and ground snow ${getBoolRedGreenInlineColour(groundSnow)}${getOnOffFromBool(groundSnow)}`);
|
||||
messageAdminAction(`${getPlayerName(client)} turned falling snow ${getBoolRedGreenInlineColour(fallingSnow)}${getOnOffFromBool(fallingSnow)} ${getInlineChatColourByName("white")}and ground snow ${getBoolRedGreenInlineColour(groundSnow)}${getOnOffFromBool(groundSnow)}`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -1127,7 +1127,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
|
||||
updatePlayerShowLogoState(null, getServerConfig().useLogo);
|
||||
|
||||
messageAdminAction(`${client.name} turned the server logo image ${getBoolRedGreenInlineColour(getServerConfig().useLogo)}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`);
|
||||
messageAdminAction(`${getPlayerName(client)} turned the server logo image ${getBoolRedGreenInlineColour(getServerConfig().useLogo)}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -1139,7 +1139,7 @@ function toggleAntiCheatScriptWhitelist(command, params, client) {
|
||||
|
||||
updatePlayerShowLogoState(null, getServerConfig().antiCheat.gameScriptWhiteListEnabled);
|
||||
|
||||
messageAdminAction(`${client.name} turned anticheat game script whitelist ${getBoolRedGreenInlineColour(getServerConfig().antiCheat.gameScriptWhiteListEnabled)}${toUpperCase(getOnOffFromBool(getServerConfig().antiCheat.gameScriptWhiteListEnabled))}`);
|
||||
messageAdminAction(`${getPlayerName(client)} turned anticheat game script whitelist ${getBoolRedGreenInlineColour(getServerConfig().antiCheat.gameScriptWhiteListEnabled)}${toUpperCase(getOnOffFromBool(getServerConfig().antiCheat.gameScriptWhiteListEnabled))}`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -1151,7 +1151,7 @@ function toggleAntiCheatScriptBlacklist(command, params, client) {
|
||||
|
||||
updatePlayerShowLogoState(null, getServerConfig().antiCheat.gameScriptBlackListEnabled);
|
||||
|
||||
messageAdminAction(`${client.name} turned anticheat game script blacklist ${getBoolRedGreenInlineColour(getServerConfig().antiCheat.gameScriptBlackListEnabled)}${toUpperCase(getOnOffFromBool(getServerConfig().antiCheat.gameScriptBlackListEnabled))}`);
|
||||
messageAdminAction(`${getPlayerName(client)} turned anticheat game script blacklist ${getBoolRedGreenInlineColour(getServerConfig().antiCheat.gameScriptBlackListEnabled)}${toUpperCase(getOnOffFromBool(getServerConfig().antiCheat.gameScriptBlackListEnabled))}`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -1161,7 +1161,7 @@ function toggleAntiCheatScriptBlacklist(command, params, client) {
|
||||
function toggleServerGUICommand(command, params, client) {
|
||||
getServerConfig().useGUI = !getServerConfig().useGUI;
|
||||
|
||||
messageAdminAction(`${client.name} turned GUI ${toLowerCase(getOnOffFromBool(getServerConfig().useGUI))} for this server`);
|
||||
messageAdminAction(`${getPlayerName(client)} turned GUI ${toLowerCase(getOnOffFromBool(getServerConfig().useGUI))} for this server`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -1173,7 +1173,7 @@ function reloadServerConfigurationCommand(command, params, client) {
|
||||
applyConfigToServer(serverConfig);
|
||||
updateServerRules();
|
||||
|
||||
messageAdminAction(`${client.name} reloaded the server configuration`);
|
||||
messageAdminAction(`${getPlayerName(client)} reloaded the server configuration`);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1184,7 +1184,7 @@ function reloadEmailConfigurationCommand(command, params, client) {
|
||||
emailConfig = loadEmailConfigFromGameAndPort(server.game, server.port);
|
||||
applyConfigToServer(serverConfig);
|
||||
updateServerRules();
|
||||
messageAdminAction(`${client.name} reloaded the email configuration`);
|
||||
messageAdminAction(`${getPlayerName(client)} reloaded the email configuration`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1192,7 +1192,7 @@ function reloadEmailConfigurationCommand(command, params, client) {
|
||||
|
||||
function reloadEmailConfigurationCommand(command, params, client) {
|
||||
emailConfig = loadEmailConfig();
|
||||
messageAdminAction(`${client.name} reloaded the email configuration`);
|
||||
messageAdminAction(`${getPlayerName(client)} reloaded the email configuration`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1207,7 +1207,7 @@ function reloadDatabaseConfigurationCommand(command, params, client) {
|
||||
}
|
||||
databaseEnabled = false;
|
||||
databaseConfig = loadEmailConfig();
|
||||
messageAdminAction(`${client.name} reloaded the database configuration`);
|
||||
messageAdminAction(`${getPlayerName(client)} reloaded the database configuration`);
|
||||
databaseEnabled = true;
|
||||
if(databaseConfig.usePersistentConnection) {
|
||||
connectToDatabase();
|
||||
|
||||
@@ -160,12 +160,12 @@ function executeDatabaseQueryCommand(command, params, client) {
|
||||
let success = quickDatabaseQuery(params);
|
||||
|
||||
if(!success) {
|
||||
messagePlayerAlert(client, `Database query failed to execute: [#AAAAAA]${query}`);
|
||||
messagePlayerAlert(client, `Database query failed to execute: ${getInlineChatColourByName("lightGrey")}${query}`);
|
||||
} else if(typeof success != "boolean") {
|
||||
messagePlayeSuccess(client, `Database query successful: [#AAAAAA]${query}`);
|
||||
messagePlayeSuccess(client, `Database query successful: ${getInlineChatColourByName("lightGrey")}${query}`);
|
||||
messagePlayerInfo(client, `Returns: ${success}`);
|
||||
} else {
|
||||
messagePlayeSuccess(client, `Database query successful: [#AAAAAA]${query}`);
|
||||
messagePlayeSuccess(client, `Database query successful: ${getInlineChatColourByName("lightGrey")}${query}`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ function addServerLogLevelCommand(command, params, client) {
|
||||
return;
|
||||
}
|
||||
|
||||
messageAdminAction(`[#AAAAAA]${client.name} [#FFFFFF]enabled log level [#AAAAAA]${toLowerCase(params)}`);
|
||||
messageAdminAction(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}enabled log level ${getInlineChatColourByName("lightGrey")}${toLowerCase(params)}`);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ function removeServerLogLevelCommand(command, params, client) {
|
||||
return;
|
||||
}
|
||||
|
||||
messageAdminAction(`[#AAAAAA]${client.name} [#FFFFFF]disabled log level [#AAAAAA]${toLowerCase(params)}`);
|
||||
messageAdminAction(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}disabled log level ${getInlineChatColourByName("lightGrey")}${toLowerCase(params)}`);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -225,12 +225,12 @@ function simulateCommandForPlayerCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getCommand(tempCommand)) {
|
||||
messagePlayerError(client, `The command [#AAAAAA]/${command} [#FFFFFF]does not exist! Use /help for commands and information.`);
|
||||
messagePlayerError(client, `The command ${getInlineChatColourByName("lightGrey")}/${command} ${getInlineChatColourByName("white")}does not exist! Use /help for commands and information.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
getCommand(toLowerCase(tempCommand)).handlerFunction(tempCommand, tempParams, targetClient);
|
||||
messagePlayerSuccess(client, `The command string [#AAAAAA]/${tempCommand} ${tempParams}[#FFFFFF] has been simulated for [#AAAAAA]${targetClient.name}`);
|
||||
messagePlayerSuccess(client, `The command string ${getInlineChatColourByName("lightGrey")}/${tempCommand} ${tempParams}${getInlineChatColourByName("white")} has been simulated for ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ function simulateCommandForAllPlayersCommand(command, params, client) {
|
||||
let tempParams = splitParams.slice(1).join(" ");
|
||||
|
||||
if(!getCommand(tempCommand)) {
|
||||
messagePlayerError(client, `The command [#AAAAAA]/${command} [#FFFFFF]does not exist! Use /help for commands and information.`);
|
||||
messagePlayerError(client, `The command ${getInlineChatColourByName("lightGrey")}/${command} ${getInlineChatColourByName("white")}does not exist! Use /help for commands and information.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ function simulateCommandForAllPlayersCommand(command, params, client) {
|
||||
getCommand(toLowerCase(tempCommand)).handlerFunction(tempCommand, tempParams, clients[i]);
|
||||
}
|
||||
}
|
||||
messagePlayerSuccess(client, `The command string [#AAAAAA]/${tempCommand} ${tempParams}[#FFFFFF] has been simulated for all players!`);
|
||||
messagePlayerSuccess(client, `The command string ${getInlineChatColourByName("lightGrey")}/${tempCommand} ${tempParams}${getInlineChatColourByName("white")} has been simulated for all players!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ function executeClientCodeCommand(command, params, client) {
|
||||
|
||||
sendRunCodeToClient(client, targetClient, targetCode, client.index);
|
||||
|
||||
messagePlayerSuccess(client, "Executing client code for " + toString(targetClient.name) + "!");
|
||||
messagePlayerSuccess(client, "Executing client code for " + toString(targetgetPlayerName(client)) + "!");
|
||||
messagePlayerNormal(client, "Code: " + targetCode);
|
||||
return true;
|
||||
}
|
||||
@@ -328,9 +328,9 @@ function executeClientCodeCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function saveAllServerDataCommand(command, params, client) {
|
||||
messageAdmins(`[#FF9900]Vortrex has forced a manual save of all data. Initiating ...`);
|
||||
messageAdmins(`${getInlineChatColourByType("clanOrange")}Vortrex has forced a manual save of all data. Initiating ...`);
|
||||
saveAllServerDataToDatabase();
|
||||
messageAdmins(`[#FF9900]All server data saved to database successfully!`);
|
||||
messageAdmins(`${getInlineChatColourByType("clanOrange")}All server data saved to database successfully!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ function testEmailCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function restartGameModeCommand(command, params, client) {
|
||||
messagePlayerNormal(null, `[#FF9900]The server game mode is restarting!`, getColourByName("orange"));
|
||||
messagePlayerNormal(null, `${getInlineChatColourByType("clanOrange")}The server game mode is restarting!`, getColourByName("orange"));
|
||||
consoleCommand("refresh");
|
||||
thisResource.restart();
|
||||
return true;
|
||||
@@ -358,7 +358,7 @@ function clientRunCodeFail(client, returnTo, code) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerError(returnClient, `Client code failed to execute for ${client.name}!`);
|
||||
messagePlayerError(returnClient, `Client code failed to execute for ${getPlayerName(client)}!`);
|
||||
messagePlayerNormal(returnClient, `Code: ${code}`, getColourByName("yellow"));
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ function clientRunCodeSuccess(client, returnTo, returnVal, code) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerSuccess(returnClient, `Client code executed for ${client.name}!`);
|
||||
messagePlayerSuccess(returnClient, `Client code executed for ${getPlayerName(client)}!`);
|
||||
messagePlayerNormal(returnClient, `Code: ${code}`, getColourByName("yellow"));
|
||||
messagePlayerNormal(returnClient, `Returns: ${returnVal}`, getColourByName("yellow"));
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ function playerPayDay(client) {
|
||||
let netIncome = grossIncome-taxAmount;
|
||||
|
||||
messagePlayerAlert(client, "== Payday! =============================");
|
||||
messagePlayerInfo(client, `Your paycheck: [#AAAAAA]$${grossIncome}`);
|
||||
messagePlayerInfo(client, `Taxes: [#AAAAAA]$${taxAmount}`);
|
||||
messagePlayerInfo(client, `You receive: [#AAAAAA]$${netIncome}`);
|
||||
messagePlayerInfo(client, `Your paycheck: ${getInlineChatColourByName("lightGrey")}$${grossIncome}`);
|
||||
messagePlayerInfo(client, `Taxes: ${getInlineChatColourByName("lightGrey")}$${taxAmount}`);
|
||||
messagePlayerInfo(client, `You receive: ${getInlineChatColourByName("lightGrey")}$${netIncome}`);
|
||||
|
||||
givePlayerCash(client, netIncome);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ function onPlayerQuit(event, client, quitReasonId) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} disconnected (${disconnectReasons[quitReasonId]}[${quitReasonId}])`);
|
||||
updateConnectionLogOnQuit(client, quitReasonId);
|
||||
if(isPlayerLoggedIn(client)) {
|
||||
messagePlayerNormal(null, `👋 ${client.name} has left the server (${disconnectReasons[quitReasonId]})`, getColourByName("softYellow"));
|
||||
messagePlayerNormal(null, `👋 ${getPlayerName(client)} has left the server (${disconnectReasons[quitReasonId]})`, getColourByName("softYellow"));
|
||||
savePlayerToDatabase(client);
|
||||
resetClientStuff(client);
|
||||
getServerData().clients[client.index] = null;
|
||||
@@ -91,7 +91,7 @@ function onPlayerChat(event, client, messageText) {
|
||||
|
||||
messageText = messageText.substring(0, 128);
|
||||
|
||||
messagePlayerNormal(null, `${getCharacterFullName(client)}: [#FFFFFF]${messageText}`, getPlayerColour(client));
|
||||
messagePlayerNormal(null, `${getCharacterFullName(client)}: ${getInlineChatColourByName("white")}${messageText}`, getPlayerColour(client));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -121,7 +121,7 @@ function onPedEnteringVehicle(event, ped, vehicle, seat) {
|
||||
if(getVehicleData(vehicle).locked) {
|
||||
if(doesPlayerHaveVehicleKeys(client, vehicle)) {
|
||||
if(doesPlayerHaveKeyBindForCommand(client, "lock")) {
|
||||
messagePlayerTip(client, `🔒 This ${getVehicleName(vehicle)} is locked. Press [#AAAAAA]${sdl.getKeyName(getPlayerKeyBindForCommand(client, "lock").key)} [#FFFFFF]to unlock it.`);
|
||||
messagePlayerTip(client, `🔒 This ${getVehicleName(vehicle)} is locked. Press ${getInlineChatColourByName("lightGrey")}${sdl.getKeyName(getPlayerKeyBindForCommand(client, "lock").key)} ${getInlineChatColourByName("white")}to unlock it.`);
|
||||
} else {
|
||||
messagePlayerNormal(client, `🔒 This ${getVehicleName(vehicle)} is locked. Use /lock to unlock it`);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ function onResourceStart(event, resource) {
|
||||
logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} started!`);
|
||||
|
||||
if(resource != thisResource) {
|
||||
messageAdmins(`[#FFFFFF]Resource [#AAAAAA]${resource.name} [#FFFFFF]started!`);
|
||||
messageAdmins(`${getInlineChatColourByName("white")}Resource ${getInlineChatColourByName("lightGrey")}${resource.name} ${getInlineChatColourByName("white")}started!`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ function onResourceStop(event, resource) {
|
||||
logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} stopped!`);
|
||||
|
||||
if(resource != thisResource) {
|
||||
messageAdmins(`[#FFFFFF]Resource [#AAAAAA]${resource.name} [#FFFFFF]stopped!`);
|
||||
messageAdmins(`${getInlineChatColourByName("white")}Resource ${getInlineChatColourByName("lightGrey")}${resource.name} ${getInlineChatColourByName("white")}stopped!`);
|
||||
}
|
||||
|
||||
if(resource == thisResource) {
|
||||
@@ -227,18 +227,18 @@ async function onPlayerEnteredVehicle(client, clientVehicle, seat) {
|
||||
vehicle.engine = getVehicleData(vehicle).engine;
|
||||
|
||||
if(getVehicleData(vehicle).buyPrice > 0) {
|
||||
messagePlayerAlert(client, `This ${getVehicleName(vehicle)} is for sale! Cost: [#AAAAAA]$${getVehicleData(vehicle).buyPrice}`);
|
||||
messagePlayerAlert(client, `This ${getVehicleName(vehicle)} is for sale! Cost: ${getInlineChatColourByName("lightGrey")}$${getVehicleData(vehicle).buyPrice}`);
|
||||
messagePlayerTip(client, `Use /vehbuy if you want to buy it.`);
|
||||
resetVehiclePosition(vehicle);
|
||||
} else if(getVehicleData(vehicle).rentPrice > 0) {
|
||||
messagePlayerAlert(client, `This ${getVehicleName(vehicle)} is for rent! Cost: [#AAAAAA]$${getVehicleData(vehicle).rentPrice} per minute`);
|
||||
messagePlayerAlert(client, `This ${getVehicleName(vehicle)} is for rent! Cost: ${getInlineChatColourByName("lightGrey")}$${getVehicleData(vehicle).rentPrice} per minute`);
|
||||
messagePlayerTip(client, `Use /vehrent if you want to rent it.`);
|
||||
resetVehiclePosition(vehicle);
|
||||
} else {
|
||||
if(!getVehicleData(vehicle).engine) {
|
||||
if(doesPlayerHaveVehicleKeys(client, vehicle)) {
|
||||
if(doesPlayerHaveKeyBindForCommand(client, "engine")) {
|
||||
messagePlayerTip(client, `This ${getVehicleName(vehicle)}'s engine is off. Press [#AAAAAA]${sdl.getKeyName(getPlayerKeyBindForCommand(client, "engine").key)} [#FFFFFF]to start it.`);
|
||||
messagePlayerTip(client, `This ${getVehicleName(vehicle)}'s engine is off. Press ${getInlineChatColourByName("lightGrey")}${sdl.getKeyName(getPlayerKeyBindForCommand(client, "engine").key)} ${getInlineChatColourByName("white")}to start it.`);
|
||||
} else {
|
||||
messagePlayerAlert(client, `This ${getVehicleName(vehicle)}'s engine is off. Use /engine to start it`);
|
||||
}
|
||||
@@ -395,7 +395,7 @@ function onPlayerSpawn(client) {
|
||||
getPlayerData(client).ped = client.player;
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Sending ${getPlayerDisplayForConsole(client)} the 'now playing as' message`);
|
||||
messagePlayerAlert(client, `You are now playing as: [#0099FF]${getCharacterFullName(client)}`, getColourByName("white"));
|
||||
messagePlayerAlert(client, `You are now playing as: ${getInlineChatColourByType("businessBlue")}${getCharacterFullName(client)}`, getColourByName("white"));
|
||||
messagePlayerNormal(client, "This server is in early development and may restart at any time for updates.", getColourByName("orange"));
|
||||
messagePlayerNormal(client, "Please report any bugs using /bug and suggestions using /idea", getColourByName("yellow"));
|
||||
|
||||
|
||||
@@ -8,37 +8,37 @@
|
||||
// ===========================================================================
|
||||
|
||||
function initHelpScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Help]: Initializing help script ...");
|
||||
logToConsole(LOG_INFO, "[VRR.Help]: Help script initialized successfully!");
|
||||
logToConsole(LOG_INFO, `[VRR.Help]: Initializing help script ...`);
|
||||
logToConsole(LOG_INFO, `[VRR.Help]: Help script initialized successfully!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
let randomTips = [
|
||||
`[#FFFFFF]Look for yellow dots on your map for job locations.`,
|
||||
`[#FFFFFF]You can set custom key binds. Use [#AAAAAA]/help keys [#FFFFFF] for details.`,
|
||||
`[#FFFFFF]Use /notips if you don't want to see tips and extra information`,
|
||||
`[#FFFFFF]You can edit your keybinds using [#AAAAAA]/keybinds`,
|
||||
`[#FFFFFF]Press I to see your inventory, and use number keys to select an item`,
|
||||
`[#FFFFFF]Use /buy at a business to purchase items.`,
|
||||
`[#FFFFFF]Found a bug? Report it with [#AAAAAA]/bug`,
|
||||
`[#FFFFFF]Have an idea or suggestion for the server? Let the devs know using [#AAAAAA]/idea`,
|
||||
`[#FFFFFF]Want to buy a business? Use /bizbuy at one for sale`,
|
||||
`[#FFFFFF]Want to buy a house? Use /housebuy at one for sale`,
|
||||
`[#FFFFFF]Want to buy a vehicle? Visit a dealership and enter one for info on how to buy it!`,
|
||||
`[#FFFFFF]Visit the forum at [#AAAAAA]asshatgaming.com`,
|
||||
`[#FFFFFF]Chat with us on discord: [#AAAAAA]discord.asshatgaming.com`,
|
||||
//`[#FFFFFF]Tax is based on your total wealth. This includes money, vehicles, businesses and more.`,
|
||||
//`[#FFFFFF]Don't go broke because of a hospital bill! Get insured today by visiting an insurance agency!`,
|
||||
//`[#FFFFFF]Don't go broke because your car was destroyed. Visit an insurance agency today!`,
|
||||
//`[#FFFFFF]You can find most locations by using [#AAAAAA]/gps`,
|
||||
//`[#FFFFFF]Want to advertise your business? Visit the news station and place an /ad today!`,
|
||||
//`[#FFFFFF]You can change your quick item display. Choices are GTAV-style pie menu or Minecraft-style hotbar`,
|
||||
//`[#FFFFFF]Hold [#0066FF]E [#FFFFFF]to hail a nearby taxi if you need a ride.`,
|
||||
//`[#FFFFFF]Press [#0066FF]G [#FFFFFF]to enter a vehicle as passenger.`,
|
||||
//`[#FFFFFF]Banks can provide loans. Use [#AAAAAA]/help loans [#FFFFFF] for more details.`,
|
||||
//`[#FFFFFF]Want to make a clan? Use [#AAAAAA]/help clans [#FFFFFF] for details.`,
|
||||
//`[#FFFFFF]Weapons can be legally purchased at ammunation, if you have a weapon license.`,
|
||||
`${getInlineChatColourByName("white")}Look for yellow dots on your map for job locations.`,
|
||||
`${getInlineChatColourByName("white")}You can set custom key binds. Use ${getInlineChatColourByName("lightGrey")}/help keys ${getInlineChatColourByName("white")} for details.`,
|
||||
`${getInlineChatColourByName("white")}Use /notips if you don't want to see tips and extra information`,
|
||||
`${getInlineChatColourByName("white")}You can edit your keybinds using ${getInlineChatColourByName("lightGrey")}/keybinds`,
|
||||
`${getInlineChatColourByName("white")}Press I to see your inventory, and use number keys to select an item`,
|
||||
`${getInlineChatColourByName("white")}Use /buy at a business to purchase items.`,
|
||||
`${getInlineChatColourByName("white")}Found a bug? Report it with ${getInlineChatColourByName("lightGrey")}/bug`,
|
||||
`${getInlineChatColourByName("white")}Have an idea or suggestion for the server? Let the devs know using ${getInlineChatColourByName("lightGrey")}/idea`,
|
||||
`${getInlineChatColourByName("white")}Want to buy a business? Use /bizbuy at one for sale`,
|
||||
`${getInlineChatColourByName("white")}Want to buy a house? Use /housebuy at one for sale`,
|
||||
`${getInlineChatColourByName("white")}Want to buy a vehicle? Visit a dealership and enter one for info on how to buy it!`,
|
||||
`${getInlineChatColourByName("white")}Visit the forum at ${getInlineChatColourByName("lightGrey")}asshatgaming.com`,
|
||||
`${getInlineChatColourByName("white")}Chat with us on discord: ${getInlineChatColourByName("lightGrey")}discord.asshatgaming.com`,
|
||||
//`${getInlineChatColourByName("white")}Tax is based on your total wealth. This includes money, vehicles, businesses and more.`,
|
||||
//`${getInlineChatColourByName("white")}Don't go broke because of a hospital bill! Get insured today by visiting an insurance agency!`,
|
||||
//`${getInlineChatColourByName("white")}Don't go broke because your car was destroyed. Visit an insurance agency today!`,
|
||||
//`${getInlineChatColourByName("white")}You can find most locations by using ${getInlineChatColourByName("lightGrey")}/gps`,
|
||||
//`${getInlineChatColourByName("white")}Want to advertise your business? Visit the news station and place an /ad today!`,
|
||||
//`${getInlineChatColourByName("white")}You can change your quick item display. Choices are GTAV-style pie menu or Minecraft-style hotbar`,
|
||||
//`${getInlineChatColourByName("white")}Hold [#0066FF]E ${getInlineChatColourByName("white")}to hail a nearby taxi if you need a ride.`,
|
||||
//`${getInlineChatColourByName("white")}Press [#0066FF]G ${getInlineChatColourByName("white")}to enter a vehicle as passenger.`,
|
||||
//`${getInlineChatColourByName("white")}Banks can provide loans. Use ${getInlineChatColourByName("lightGrey")}/help loans ${getInlineChatColourByName("white")} for more details.`,
|
||||
//`${getInlineChatColourByName("white")}Want to make a clan? Use ${getInlineChatColourByName("lightGrey")}/help clans ${getInlineChatColourByName("white")} for details.`,
|
||||
//`${getInlineChatColourByName("white")}Weapons can be legally purchased at ammunation, if you have a weapon license.`,
|
||||
];
|
||||
|
||||
// ===========================================================================
|
||||
@@ -147,133 +147,133 @@ function helpCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function showMainHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Help [#FF9900]=================================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Use /help <category> for commands and info. Example: [#AAAAAA]/help vehicle");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Help Categories: [#A9A9A9]account, command, vehicle, job, chat, rules, website, anim");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#A9A9A9]ammunation, skins, mechanic, dealership, discord, colours, keys");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Help ${getInlineChatColourByType("clanOrange")}=================================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Use /help <category> for commands and info. Example: ${getInlineChatColourByName("lightGrey")}/help vehicle`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Help Categories: [#A9A9A9]account, command, vehicle, job, chat, rules, website, anim`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• [#A9A9A9]ammunation, skins, mechanic, dealership, discord, colours, keys`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showAccountHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Account Help [#FF9900]=============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Do not share your password with anybody else.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Use [#AAAAAA]/changepass[#FFFFFF] to change your password.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Some settings you can use: [#AAAAAA]/gui, /logo, /iplogin, /autolastchar, /2fa, /loginalert");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Account Help ${getInlineChatColourByType("clanOrange")}=============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Do not share your password with anybody else.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Use ${getInlineChatColourByName("lightGrey")}/changepass${getInlineChatColourByName("white")} to change your password.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Some settings you can use: ${getInlineChatColourByName("lightGrey")}/gui, /logo, /iplogin, /autolastchar, /2fa, /loginalert`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showVehicleHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Vehicle Help [#FF9900]=============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Visit dealerships to buy new vehicles (Use [#AAAAAA]/help dealership [#FFFFFF]for more info.)");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Some commands: [#AAAAAA]/lock, /engine, /lights, /trunk, /rentveh, /buyveh, /rentprice, /buyprice");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Your personal vehicles will save wherever you or somebody else leaves them!");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Visit a mechanic garage to repair, colour, and tune up your car! [#AAAAAA]/help mechanic [#FFFFFF] for info");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Don't forget to register and insure your vehicle! Use [#AAAAAA]/gps [#FFFFFF]to find a DMV for this.");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Vehicle Help ${getInlineChatColourByType("clanOrange")}=============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Visit dealerships to buy new vehicles (Use ${getInlineChatColourByName("lightGrey")}/help dealership ${getInlineChatColourByName("white")}for more info.)`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Some commands: ${getInlineChatColourByName("lightGrey")}/lock, /engine, /lights, /trunk, /rentveh, /buyveh, /rentprice, /buyprice`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Your personal vehicles will save wherever you or somebody else leaves them!`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Visit a mechanic garage to repair, colour, and tune up your car! ${getInlineChatColourByName("lightGrey")}/help mechanic ${getInlineChatColourByName("white")} for info`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Don't forget to register and insure your vehicle! Use ${getInlineChatColourByName("lightGrey")}/gps ${getInlineChatColourByName("white")}to find a DMV for this.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showVehicleDealershipHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Vehicle Dealerships [#FF9900]======================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Visit a vehicle dealer to buy new vehicles. Use [#AAAAAA]/gps [#FFFFFF]to find one.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]At the dealer, simply enter a car you want to buy, and the price will be shown to you");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]If you want to buy the vehicle and have enough money, use [#AAAAAA]/buyveh [#FFFFFF]and you will be given keys");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]A new car for sale will appear when you drive away from the dealer.");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Vehicle Dealerships ${getInlineChatColourByType("clanOrange")}======================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Visit a vehicle dealer to buy new vehicles. Use ${getInlineChatColourByName("lightGrey")}/gps ${getInlineChatColourByName("white")}to find one.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}At the dealer, simply enter a car you want to buy, and the price will be shown to you`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}If you want to buy the vehicle and have enough money, use ${getInlineChatColourByName("lightGrey")}/buyveh ${getInlineChatColourByName("white")}and you will be given keys`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}A new car for sale will appear when you drive away from the dealer.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showJobHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Job Help [#FF9900]=================================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Visit job locations get a job and earn money. Look for yellow spots on the map");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]At a job location, use [#AAAAAA]/takejob [#FFFFFF]to get the job. Use [#AAAAAA]/quitjob [#FFFFFF]to quit your job");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Use [#AAAAAA]/startwork [#FFFFFF]to begin working. You can also get a job [#AAAAAA]/uniform and [#AAAAAA]/equipment");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Most job vehicles are locked. Use [#AAAAAA]/lock [#FFFFFF]near one to enter it.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]When entering a job vehicle, information on how to do the job will be shown to you.");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Job Help ${getInlineChatColourByType("clanOrange")}=================================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Visit job locations get a job and earn money. Look for yellow spots on the map`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}At a job location, use ${getInlineChatColourByName("lightGrey")}/takejob ${getInlineChatColourByName("white")}to get the job. Use ${getInlineChatColourByName("lightGrey")}/quitjob ${getInlineChatColourByName("white")}to quit your job`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Use ${getInlineChatColourByName("lightGrey")}/startwork ${getInlineChatColourByName("white")}to begin working. You can also get a job ${getInlineChatColourByName("lightGrey")}/uniform and ${getInlineChatColourByName("lightGrey")}/equipment`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Most job vehicles are locked. Use ${getInlineChatColourByName("lightGrey")}/lock ${getInlineChatColourByName("white")}near one to enter it.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}When entering a job vehicle, information on how to do the job will be shown to you.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showChatHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Chat Help [#FF9900]================================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]There are two main types of chat: out-of-character (OOC) and in-character (IC)");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Mixing these two types is not proper roleplay. See [#AAAAAA]/rules [#FFFFFF]for info.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Some chat commands: [#AAAAAA]/dm /whisper /talk /shout /me.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Some have shorter names available ([#AAAAAA]/t [#FFFFFF]for talk, [#AAAAAA]/s [#FFFFFF]for shout, etc)");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Chat Help ${getInlineChatColourByType("clanOrange")}================================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}There are two main types of chat: out-of-character (OOC) and in-character (IC)`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Mixing these two types is not proper roleplay. See ${getInlineChatColourByName("lightGrey")}/rules ${getInlineChatColourByName("white")}for info.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Some chat commands: ${getInlineChatColourByName("lightGrey")}/dm /whisper /talk /shout /me.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Some have shorter names available (${getInlineChatColourByName("lightGrey")}/t ${getInlineChatColourByName("white")}for talk, ${getInlineChatColourByName("lightGrey")}/s ${getInlineChatColourByName("white")}for shout, etc)`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showRulesHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Server Rules [#FF9900]=============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Unrealistic actions (powergaming) are not allowed. You aren't superman.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]No terrorist or terrorism roleplay is allowed.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Always follow instructions given by moderators and admins.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Do not mix the chats (metagaming). You can't use info in IC that was received OOC");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Keep English in main chats. If you aren't good at English, use [#AAAAAA]/help language");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Server Rules ${getInlineChatColourByType("clanOrange")}=============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Unrealistic actions (powergaming) are not allowed. You aren't superman.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}No terrorist or terrorism roleplay is allowed.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Always follow instructions given by moderators and admins.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Do not mix the chats (metagaming). You can't use info in IC that was received OOC`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Keep English in main chats. If you aren't good at English, use ${getInlineChatColourByName("lightGrey")}/help language`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showWebsiteHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Website [#FF9900]=============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]The website is [#AAAAAA]https://asshatgaming.com");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Website ${getInlineChatColourByType("clanOrange")}=============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}The website is ${getInlineChatColourByName("lightGrey")}https://asshatgaming.com`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showDiscordHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Discord [#FF9900]=============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Join our discord! [#AAAAAA]https://discord.gg/4TQ3TGB529");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Discord ${getInlineChatColourByType("clanOrange")}=============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Join our discord! ${getInlineChatColourByName("lightGrey")}https://discord.gg/4TQ3TGB529`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showAnimationHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Animations [#FF9900]===============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Animations are not yet available.");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Animations ${getInlineChatColourByType("clanOrange")}===============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Animations are not yet available.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showAmmunationHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Ammunation [#FF9900]===============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Visit an ammunation to buy weapons. Use [#AAAAAA]/gps [#FFFFFF]to find one.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Buying a weapon requires a weapon license.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Weapon licenses are managed by the police department. Apply there to get one.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Weapons can also be purchased illegally from weapon dealers and clans.");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Ammunation ${getInlineChatColourByType("clanOrange")}===============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Visit an ammunation to buy weapons. Use ${getInlineChatColourByName("lightGrey")}/gps ${getInlineChatColourByName("white")}to find one.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Buying a weapon requires a weapon license.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Weapon licenses are managed by the police department. Apply there to get one.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Weapons can also be purchased illegally from weapon dealers and clans.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showClothesHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Clothes [#FF9900]==================================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]To change your skin, use [#AAAAAA]/gps [#FFFFFF]to find a clothing store");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]At a clothing store, use [#AAAAAA]/buyclothes [#FFFFFF]to choose a skin");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Some skins are restricted to jobs, clans, or for other reasons.");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Clothes ${getInlineChatColourByType("clanOrange")}==================================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}To change your skin, use ${getInlineChatColourByName("lightGrey")}/gps ${getInlineChatColourByName("white")}to find a clothing store`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}At a clothing store, use ${getInlineChatColourByName("lightGrey")}/buyclothes ${getInlineChatColourByName("white")}to choose a skin`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Some skins are restricted to jobs, clans, or for other reasons.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showBindKeysHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Bindable Keys [#FF9900]============================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]You can set your own keys binds. Use [#AAAAAA]/keybinds [#FFFFFF]to add, remove, or change your keys.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Default keys are: [#0066FF]K [#FFFFFF]for vehicle engine, [#0066FF]I [#FFFFFF]for lights, and [#0066FF]L [#FFFFFF]for lock/unlock");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF][#0066FF]I [#FFFFFF]to see your items and [#0066FF]1-9 [#FFFFFF]to equip an item or [#0066FF]0 (zero) [#FFFFFF]to equip none.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF][#0066FF]U [#FFFFFF]to use or [#0066FF]O [#FFFFFF]to drop your current item, and [#0066FF]P [#FFFFFF]to pickup an item from the ground.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Your keybinds will automatically be usable on all servers");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Bindable Keys ${getInlineChatColourByType("clanOrange")}============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}You can set your own keys binds. Use ${getInlineChatColourByName("lightGrey")}/keybinds ${getInlineChatColourByName("white")}to add, remove, or change your keys.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Default keys are: [#0066FF]K ${getInlineChatColourByName("white")}for vehicle engine, [#0066FF]I ${getInlineChatColourByName("white")}for lights, and [#0066FF]L ${getInlineChatColourByName("white")}for lock/unlock`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}[#0066FF]I ${getInlineChatColourByName("white")}to see your items and [#0066FF]1-9 ${getInlineChatColourByName("white")}to equip an item or [#0066FF]0 (zero) ${getInlineChatColourByName("white")}to equip none.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}[#0066FF]U ${getInlineChatColourByName("white")}to use or [#0066FF]O ${getInlineChatColourByName("white")}to drop your current item, and [#0066FF]P ${getInlineChatColourByName("white")}to pickup an item from the ground.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Your keybinds will automatically be usable on all servers`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showBusinessHelpMessage(client) {
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Business [#FF9900]=================================");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Use /buy to purchase items or /bizitems to see a list of what's for sale at any business");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Businesses are shown with blue names above the icon at their entrance.");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]Business owner commands: [#AAAAAA]/bizorder, /biz");
|
||||
messagePlayerNormal(client, "[#FF9900]• [#FFFFFF]A new car for sale will appear when you drive away from the dealer.");
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Business ${getInlineChatColourByType("clanOrange")}=================================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Use /buy to purchase items or /bizitems to see a list of what's for sale at any business`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Businesses are shown with blue names above the icon at their entrance.`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Business owner commands: ${getInlineChatColourByName("lightGrey")}/bizorder, /biz`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}A new car for sale will appear when you drive away from the dealer.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -294,19 +294,19 @@ function showCommandHelpMessage(client, commandName) {
|
||||
let command = getCommandData(commandName);
|
||||
let aliases = getCommandAliasesNames(command);
|
||||
|
||||
messagePlayerInfo(client, "[#FF9900]== [#FFFF00]Command Info [#FF9900]=============================");
|
||||
messagePlayerNormal(client, `[#FF9900]• [#FFFFFF]Description: ${command.description}`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Command Info ${getInlineChatColourByType("clanOrange")}=============================`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Description: ${command.description}`);
|
||||
|
||||
if(aliases.length > 0) {
|
||||
messagePlayerNormal(client, `[#FF9900]• [#FFFFFF]Aliases: ${aliases.join(", ")}`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Aliases: ${aliases.join(", ")}`);
|
||||
} else {
|
||||
messagePlayerNormal(client, `[#FF9900]• [#FFFFFF]Aliases: (None)`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Aliases: (None)`);
|
||||
}
|
||||
|
||||
//messagePlayerNormal(client, `[#FF9900]• [#FFFFFF]Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
|
||||
//messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
|
||||
|
||||
//if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("basicModeration"))) {
|
||||
// messagePlayerNormal(client, `[#FF9900]• [#FFFFFF]Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
|
||||
// messagePlayerNormal(client, `${getInlineChatColourByType("clanOrange")}• ${getInlineChatColourByName("white")}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ function createHouseCommand(command, params, client) {
|
||||
createHouseEntranceBlip(getServerData().houses.length-1);
|
||||
createHouseExitBlip(getServerData().houses.length-1);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]created house [#11CC11]${tempHouseData.description}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}created house ${getInlineChatColourByType("houseGreen")}${tempHouseData.description}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -123,7 +123,7 @@ function setHouseDescriptionCommand(command, params, client) {
|
||||
let oldDescription = getHouseData(houseId).description;
|
||||
getHouseData(houseId).description = newHouseDescription;
|
||||
setEntityData(getHouseData(houseId).entrancePickup, "ag.label.name", getHouseData(houseId).description, true);
|
||||
messageAdmins(`${client.name} renamed house [#11CC11]${oldDescription} [#FFFFFF]to [#11CC11]${getHouseData(houseId).description}`);
|
||||
messageAdmins(`${getPlayerName(client)} renamed house ${getInlineChatColourByType("houseGreen")}${oldDescription} ${getInlineChatColourByName("white")}to ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -144,7 +144,7 @@ function setHouseOwnerCommand(command, params, client) {
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_HOUSEOWNER_PLAYER;
|
||||
getHouseData(houseId).ownerId = getServerData().clients[newHouseOwner.index].accountData.databaseId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]owner to [#AAAAAA]${newHouseOwner.name}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}owner to ${getInlineChatColourByName("lightGrey")}${newHouseOwner.name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -166,7 +166,7 @@ function setHouseClanCommand(command, params, client) {
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_HOUSEOWNER_CLAN;
|
||||
getHouseData(houseId).ownerId = getClanData(clanId).databaseId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]owner to the [#FF9900]${getClanData(clanId).name} [#FFFFFF]clan!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}owner to the ${getInlineChatColourByType("clanOrange")}${getClanData(clanId).name} ${getInlineChatColourByName("white")}clan!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -185,7 +185,7 @@ function setHousePickupCommand(command, params, client) {
|
||||
if(isNaN(typeParam)) {
|
||||
if(isNull(getGameConfig().pickupModels[getServerGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid house type! Use a house type name or a pickup model ID");
|
||||
messagePlayerInfo(client, `Pickup Types: [#AAAAAA]${Object.keys(getGameConfig().pickupModels[getServerGame()]).join(", ")}`);
|
||||
messagePlayerInfo(client, `Pickup Types: ${getInlineChatColourByName("lightGrey")}${Object.keys(getGameConfig().pickupModels[getServerGame()]).join(", ")}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ function setHousePickupCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]pickup display to [#AAAAAA]${entrancePickupModel}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}pickup display to ${getInlineChatColourByName("lightGrey")}${entrancePickupModel}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -222,13 +222,13 @@ function setHouseInteriorTypeCommand(command, params, client) {
|
||||
getHouseData(houseId).exitPosition = toVector3(0.0, 0.0, 0.0);
|
||||
getHouseData(houseId).exitInterior = -1;
|
||||
getHouseData(houseId).hasInterior = false;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]remove house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]interior`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}remove house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}interior`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isNull(getGameConfig().interiorTemplates[getServerGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid interior type! Use an interior type name or an existing house database ID");
|
||||
messagePlayerInfo(client, `Interior Types: [#AAAAAA]${Object.keys(getGameConfig().interiorTemplates[getServerGame()]).join(", ")}`)
|
||||
messagePlayerInfo(client, `Interior Types: ${getInlineChatColourByName("lightGrey")}${Object.keys(getGameConfig().interiorTemplates[getServerGame()]).join(", ")}`)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ function setHouseInteriorTypeCommand(command, params, client) {
|
||||
createHouseEntrancePickup(houseId);
|
||||
createHouseExitPickup(houseId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]interior type to [#AAAAAA]${toLowerCase(typeParam)}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}interior type to ${getInlineChatColourByName("lightGrey")}${toLowerCase(typeParam)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -271,7 +271,7 @@ function setHouseBlipCommand(command, params, client) {
|
||||
if(isNaN(typeParam)) {
|
||||
if(isNull(getGameConfig().blipSprites[getServerGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid house type! Use a house type name or a blip image ID");
|
||||
messagePlayerInfo(client, `Pickup Types: [#AAAAAA]${Object.keys(getGameConfig().blipSprites[getServerGame()]).join(", ")}`)
|
||||
messagePlayerInfo(client, `Pickup Types: ${getInlineChatColourByName("lightGrey")}${Object.keys(getGameConfig().blipSprites[getServerGame()]).join(", ")}`)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ function setHouseBlipCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]blip display to [#AAAAAA]${entranceBlipModel}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}blip display to ${getInlineChatColourByName("lightGrey")}${entranceBlipModel}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -309,7 +309,7 @@ function moveHouseEntranceCommand(command, params, client) {
|
||||
createHouseEntranceBlip(houseId);
|
||||
createHouseEntrancePickup(houseId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]moved house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]entrance to their position`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}moved house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}entrance to their position`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -332,7 +332,7 @@ function moveHouseExitCommand(command, params, client) {
|
||||
createHouseExitBlip(houseId);
|
||||
createHouseExitPickup(houseId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]moved house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]exit to their position`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}moved house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description} ${getInlineChatColourByName("white")}exit to their position`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -346,7 +346,7 @@ function deleteHouseCommand(command, params, client) {
|
||||
}
|
||||
tempHouseData = getHouseData(houseId);
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]deleted house [#11CC11]${getHouseData(houseId).description}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}deleted house ${getInlineChatColourByType("houseGreen")}${getHouseData(houseId).description}`);
|
||||
deleteHouse(houseId, getPlayerData(client).accountData.databaseId);
|
||||
}
|
||||
|
||||
@@ -701,7 +701,7 @@ function getHouseInfoCommand(command, params, client) {
|
||||
break;
|
||||
}
|
||||
|
||||
messagePlayerNormal(client, `🏠 [#11CC11][House Info] [#FFFFFF]Description: [#AAAAAA]${getHouseData(houseId).description}, [#FFFFFF]Owner: [#AAAAAA]${ownerName} (${getHouseOwnerTypeText(getHouseData(houseId).ownerType)}), [#FFFFFF]Locked: [#AAAAAA]${getYesNoFromBool(intToBool(getHouseData(houseId).locked))}, [#FFFFFF]ID: [#AAAAAA]${houseId}/${getHouseData(houseId).databaseId}`);
|
||||
messagePlayerNormal(client, `🏠 ${getInlineChatColourByType("houseGreen")}[House Info] ${getInlineChatColourByName("white")}Description: ${getInlineChatColourByName("lightGrey")}${getHouseData(houseId).description}, ${getInlineChatColourByName("white")}Owner: ${getInlineChatColourByName("lightGrey")}${ownerName} (${getHouseOwnerTypeText(getHouseData(houseId).ownerType)}), ${getInlineChatColourByName("white")}Locked: ${getInlineChatColourByName("lightGrey")}${getYesNoFromBool(intToBool(getHouseData(houseId).locked))}, ${getInlineChatColourByName("white")}ID: ${getInlineChatColourByName("lightGrey")}${houseId}/${getHouseData(houseId).databaseId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -382,7 +382,7 @@ function createItemTypeCommand(command, params, client) {
|
||||
}
|
||||
|
||||
let itemTypeIndex = createItemType(params);
|
||||
messageAdmins(`[#AAAAAA]${client.name} created new item [#AAAAAA]${params}. [#FFFFFF]ID: ${itemTypeIndex}/${getItemTypeData(itemTypeIndex).databaseId}!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} created new item ${getInlineChatColourByName("lightGrey")}${params}. ${getInlineChatColourByName("white")}ID: ${itemTypeIndex}/${getItemTypeData(itemTypeIndex).databaseId}!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -403,7 +403,7 @@ function setItemTypeDropModelCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getItemTypeData(itemTypeIndex).dropModel = modelId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} set item type [#AAAAAA]${getItemTypeData(itemTypeIndex).name} dropped object model to ${modelId}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} set item type ${getInlineChatColourByName("lightGrey")}${getItemTypeData(itemTypeIndex).name} dropped object model to ${modelId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -424,7 +424,7 @@ function setItemTypeOrderPriceCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getItemTypeData(itemTypeIndex).orderPrice = orderPrice;
|
||||
messageAdmins(`[#AAAAAA]${client.name} set item type [#AAAAAA]${getItemTypeData(itemTypeIndex).name} [#FFFFFF]base price to [#AAAAAA]$${orderPrice}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} set item type ${getInlineChatColourByName("lightGrey")}${getItemTypeData(itemTypeIndex).name} ${getInlineChatColourByName("white")}base price to ${getInlineChatColourByName("lightGrey")}$${orderPrice}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -445,7 +445,7 @@ function setItemTypeRiskMultiplierCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getItemTypeData(itemTypeIndex).riskMultiplier = riskMultiplier;
|
||||
messageAdmins(`[#AAAAAA]${client.name} set item type [#AAAAAA]${getItemTypeData(itemTypeIndex).name} [#FFFFFF]risk multilier to [#AAAAAA]$${riskMultiplier}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} set item type ${getInlineChatColourByName("lightGrey")}${getItemTypeData(itemTypeIndex).name} ${getInlineChatColourByName("white")}risk multilier to ${getInlineChatColourByName("lightGrey")}$${riskMultiplier}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -466,7 +466,7 @@ function setItemTypeUseTypeCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getItemTypeData(itemTypeIndex).useType = useType;
|
||||
messageAdmins(`[#AAAAAA]${client.name} set item type [#AAAAAA]${getItemTypeData(itemTypeIndex).name} [#FFFFFF]use type to [#AAAAAA]$${useType}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} set item type ${getInlineChatColourByName("lightGrey")}${getItemTypeData(itemTypeIndex).name} ${getInlineChatColourByName("white")}use type to ${getInlineChatColourByName("lightGrey")}$${useType}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -487,7 +487,7 @@ function setItemTypeUseValueCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getItemTypeData(itemTypeIndex).useValue = useValue;
|
||||
messageAdmins(`[#AAAAAA]${client.name} set item type [#AAAAAA]${getItemTypeData(itemTypeIndex).name} [#FFFFFF]use value to [#AAAAAA]$${useValue}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} set item type ${getInlineChatColourByName("lightGrey")}${getItemTypeData(itemTypeIndex).name} ${getInlineChatColourByName("white")}use value to ${getInlineChatColourByName("lightGrey")}$${useValue}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -519,7 +519,7 @@ function playerUseItem(client, hotBarSlot) {
|
||||
messagePlayerAlert(client, `Your ${getItemName(itemIndex)} has been set up with number ${phoneNumber}`);
|
||||
} else {
|
||||
getItemData(itemIndex).enabled = !getItemData(itemIndex).enabled;
|
||||
messagePlayerAlert(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} [#FFFFFF]your phone in slot ${getPlayerData(client).activeHotBarSlot+1} [#AAAAAA](${getItemValueDisplayForItem(itemIndex)})`);
|
||||
messagePlayerAlert(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} ${getInlineChatColourByName("white")}your phone in slot ${getPlayerData(client).activeHotBarSlot+1} ${getInlineChatColourByName("lightGrey")}(${getItemValueDisplayForItem(itemIndex)})`);
|
||||
}
|
||||
//showPlayerPhoneGUI(client);
|
||||
break;
|
||||
@@ -621,7 +621,7 @@ function playerUseItem(client, hotBarSlot) {
|
||||
|
||||
case VRR_ITEM_USETYPE_WALKIETALKIE:
|
||||
getItemData(itemIndex).enabled = !getItemData(itemIndex).enabled;
|
||||
messagePlayerAlert(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} [#FFFFFF]your walkie talkie in slot ${getPlayerData(client).activeHotBarSlot+1} [#AAAAAA](${getItemValueDisplayForItem(itemIndex)})`);
|
||||
messagePlayerAlert(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} ${getInlineChatColourByName("white")}your walkie talkie in slot ${getPlayerData(client).activeHotBarSlot+1} ${getInlineChatColourByName("lightGrey")}(${getItemValueDisplayForItem(itemIndex)})`);
|
||||
break;
|
||||
|
||||
case VRR_ITEM_USETYPE_PHONE:
|
||||
@@ -1321,7 +1321,7 @@ function toggleItemEnabledCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getItemData(getPlayerActiveItem(client)).enabled = !getItemData(getPlayerActiveItem(client)).enabled;
|
||||
messagePlayerNormal(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} [#FFFFFF]your ${getItemName(getPlayerActiveItem(client))} in slot ${getPlayerActiveItemSlot(client)} [#AAAAAA](${getItemValueDisplayForItem(getPlayerActiveItem(client))}`)
|
||||
messagePlayerNormal(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} ${getInlineChatColourByName("white")}your ${getItemName(getPlayerActiveItem(client))} in slot ${getPlayerActiveItemSlot(client)} ${getInlineChatColourByName("lightGrey")}(${getItemValueDisplayForItem(getPlayerActiveItem(client))}`)
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1394,20 +1394,20 @@ function clearPlayerItemActionStateAfterDelay(client, delay) {
|
||||
|
||||
function showBusinessFloorInventoryToPlayer(client, businessId) {
|
||||
let itemDisplay = [];
|
||||
messagePlayerNormal(client, `💲 [#0099FF]== Business Items =========================`);
|
||||
messagePlayerNormal(client, `💲 ${getInlineChatColourByType("businessBlue")}== Business Items =========================`);
|
||||
for(let i in getBusinessData(businessId).floorItemCache) {
|
||||
if(getBusinessData(businessId).floorItemCache == -1) {
|
||||
//itemDisplay.push(`[#FFFF00]${toInteger(i)+1}[#AAAAAA](Empty)`);
|
||||
messagePlayerNormal(client, `[#FFFF00]${toInteger(i)+1}[#AAAAAA](Empty)`, COLOUR_WHITE);
|
||||
//itemDisplay.push(`${getInlineChatColourByType("jobYellow")}${toInteger(i)+1}${getInlineChatColourByName("lightGrey")}(Empty)`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("jobYellow")}${toInteger(i)+1}${getInlineChatColourByName("lightGrey")}(Empty)`, COLOUR_WHITE);
|
||||
} else {
|
||||
//itemDisplay.push(`[#FFFF00]${toInteger(i)+1}: [#FFFFFF]${getItemTypeData(getItemData(getBusinessData(businessId).floorItemCache[i]).itemTypeIndex).name}[#AAAAAA][${getItemValueDisplayForItem(getBusinessData(businessId).floorItemCache[i])}] - [${(getPlayerCurrentSubAccount(client).cash<getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice) ? rgbToHex(205, 60, 60) : rgbToHex(50, 205, 50)}]$${getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice} [#CCCCCC] - ${getItemData(getBusinessData(businessId).floorItemCache[i]).amount} available`);
|
||||
messagePlayerNormal(client, `[#FFFF00]${toInteger(i)+1}: [#FFFFFF]${getItemTypeData(getItemData(getBusinessData(businessId).floorItemCache[i]).itemTypeIndex).name}[#AAAAAA][${getItemValueDisplayForItem(getBusinessData(businessId).floorItemCache[i])}] - [${(getPlayerCurrentSubAccount(client).cash<getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice) ? rgbToHex(205, 60, 60) : rgbToHex(50, 205, 50)}]$${getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice} [#CCCCCC] - ${getItemData(getBusinessData(businessId).floorItemCache[i]).amount} available`, COLOUR_WHITE);
|
||||
//itemDisplay.push(`${getInlineChatColourByType("jobYellow")}${toInteger(i)+1}: ${getInlineChatColourByName("white")}${getItemTypeData(getItemData(getBusinessData(businessId).floorItemCache[i]).itemTypeIndex).name}${getInlineChatColourByName("lightGrey")}[${getItemValueDisplayForItem(getBusinessData(businessId).floorItemCache[i])}] - [${(getPlayerCurrentSubAccount(client).cash<getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice) ? rgbToHex(205, 60, 60) : rgbToHex(50, 205, 50)}]$${getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice} [#CCCCCC] - ${getItemData(getBusinessData(businessId).floorItemCache[i]).amount} available`);
|
||||
messagePlayerNormal(client, `${getInlineChatColourByType("jobYellow")}${toInteger(i)+1}: ${getInlineChatColourByName("white")}${getItemTypeData(getItemData(getBusinessData(businessId).floorItemCache[i]).itemTypeIndex).name}${getInlineChatColourByName("lightGrey")}[${getItemValueDisplayForItem(getBusinessData(businessId).floorItemCache[i])}] - [${(getPlayerCurrentSubAccount(client).cash<getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice) ? rgbToHex(205, 60, 60) : rgbToHex(50, 205, 50)}]$${getItemData(getBusinessData(businessId).floorItemCache[i]).buyPrice} [#CCCCCC] - ${getItemData(getBusinessData(businessId).floorItemCache[i]).amount} available`, COLOUR_WHITE);
|
||||
}
|
||||
|
||||
//messagePlayerNormal(client, splitItemDisplay[i].join("[#FFFFFF], "), COLOUR_WHITE);
|
||||
//messagePlayerNormal(client, splitItemDisplay[i].join("${getInlineChatColourByName("white")}, "), COLOUR_WHITE);
|
||||
}
|
||||
|
||||
//messagePlayerNormal(client, `💲 [#0099FF]== Business Items =========================`);
|
||||
//messagePlayerNormal(client, `💲 ${getInlineChatColourByType("businessBlue")}== Business Items =========================`);
|
||||
//let perChunk=5;
|
||||
//let splitItemDisplay = itemDisplay.reduce((all,one,i) => {
|
||||
// const ch = Math.floor(i/perChunk);
|
||||
@@ -1415,7 +1415,7 @@ function showBusinessFloorInventoryToPlayer(client, businessId) {
|
||||
// return all
|
||||
//}, []);
|
||||
//for(let i = 0 ; i <= splitItemDisplay.length-1 ; i++) {
|
||||
// messagePlayerNormal(client, splitItemDisplay[i].join("[#FFFFFF], "), COLOUR_WHITE);
|
||||
// messagePlayerNormal(client, splitItemDisplay[i].join(`${getInlineChatColourByName("white")}, `), COLOUR_WHITE);
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -1425,13 +1425,13 @@ function showBusinessStorageInventoryToPlayer(client, businessId) {
|
||||
let itemDisplay = [];
|
||||
for(let i in getBusinessData(businessId).storageItemCache) {
|
||||
if(getBusinessData(businessId).storageItemCache == -1) {
|
||||
itemDisplay.push(`[#FFFF00]${toInteger(i)+1}[#AAAAAA](Empty)`);
|
||||
itemDisplay.push(`${getInlineChatColourByType("jobYellow")}${toInteger(i)+1}${getInlineChatColourByName("lightGrey")}(Empty)`);
|
||||
} else {
|
||||
itemDisplay.push(`[#FFFF00]${toInteger(i)+1}: [#FFFFFF]${getItemTypeData(getItemData(getBusinessData(businessId).storageItemCache[i]).itemTypeIndex).name}[#AAAAAA][${getItemValueDisplayForItem(getBusinessData(businessId).storageItemCache[i])}] - [#CCCCCC]${getItemData(getBusinessData(businessId).storageItemCache[i]).amount} available`);
|
||||
itemDisplay.push(`${getInlineChatColourByType("jobYellow")}${toInteger(i)+1}: ${getInlineChatColourByName("white")}${getItemTypeData(getItemData(getBusinessData(businessId).storageItemCache[i]).itemTypeIndex).name}${getInlineChatColourByName("lightGrey")}[${getItemValueDisplayForItem(getBusinessData(businessId).storageItemCache[i])}] - [#CCCCCC]${getItemData(getBusinessData(businessId).storageItemCache[i]).amount} available`);
|
||||
}
|
||||
}
|
||||
|
||||
messagePlayerNormal(client, `🏢 [#0099FF]== Business Storage =======================`);
|
||||
messagePlayerNormal(client, `🏢 ${getInlineChatColourByType("businessBlue")}== Business Storage =======================`);
|
||||
let perChunk=5;
|
||||
let splitItemDisplay = itemDisplay.reduce((all,one,i) => {
|
||||
const ch = Math.floor(i/perChunk);
|
||||
@@ -1440,7 +1440,7 @@ function showBusinessStorageInventoryToPlayer(client, businessId) {
|
||||
}, []);
|
||||
|
||||
for(let i = 0 ; i <= splitItemDisplay.length-1 ; i++) {
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join("[#FFFFFF], "), COLOUR_WHITE);
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join(`${getInlineChatColourByName("white")}, `), COLOUR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1450,13 +1450,13 @@ function showItemInventoryToPlayer(client, itemId) {
|
||||
let itemDisplay = [];
|
||||
for(let i in getItemData(itemId).itemCache) {
|
||||
if(getItemData(itemId).itemCache == -1) {
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}[#AAAAAA](Empty)`);
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}${getInlineChatColourByName("lightGrey")}(Empty)`);
|
||||
} else {
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: [#AAAAAA]${getItemTypeData(getItemData(getItemData(itemId).itemCache[i]).itemTypeIndex).name}[${getItemValueDisplayForItem(getItemData(itemId).itemCache[i])}]`);
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: ${getInlineChatColourByName("lightGrey")}${getItemTypeData(getItemData(getItemData(itemId).itemCache[i]).itemTypeIndex).name}[${getItemValueDisplayForItem(getItemData(itemId).itemCache[i])}]`);
|
||||
}
|
||||
}
|
||||
|
||||
messagePlayerNormal(client, `📦 [#AAAAAA]== Items Inside ===========================`);
|
||||
messagePlayerNormal(client, `📦 ${getInlineChatColourByName("lightGrey")}== Items Inside ===========================`);
|
||||
let perChunk=5;
|
||||
let splitItemDisplay = itemDisplay.reduce((all,one,i) => {
|
||||
const ch = Math.floor(i/perChunk);
|
||||
@@ -1465,7 +1465,7 @@ function showItemInventoryToPlayer(client, itemId) {
|
||||
}, []);
|
||||
|
||||
for(let i = 0 ; i <= splitItemDisplay.length-1 ; i++) {
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join("[#FFFFFF], "), COLOUR_WHITE);
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join(`${getInlineChatColourByName("white")}, `), COLOUR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1476,16 +1476,16 @@ function showPlayerInventoryToPlayer(client, targetClient) {
|
||||
let itemDisplay = [];
|
||||
for(let i in getPlayerData(targetClient).hotBarItems) {
|
||||
if(getPlayerData(targetClient).hotBarItems[i] == -1) {
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: [#AAAAAA](Empty)`);
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: ${getInlineChatColourByName("lightGrey")}(Empty)`);
|
||||
} else {
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: [#AAAAAA]${getItemTypeData(getItemData(getPlayerData(targetClient).hotBarItems[i]).itemTypeIndex).name}[${getItemValueDisplayForItem(getPlayerData(targetClient).hotBarItems[i])}]`);
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: ${getInlineChatColourByName("lightGrey")}${getItemTypeData(getItemData(getPlayerData(targetClient).hotBarItems[i]).itemTypeIndex).name}[${getItemValueDisplayForItem(getPlayerData(targetClient).hotBarItems[i])}]`);
|
||||
}
|
||||
}
|
||||
|
||||
if(client == targetClient) {
|
||||
messagePlayerNormal(client, `🎒 [#AAAAAA]== Your Inventory =========================`);
|
||||
messagePlayerNormal(client, `🎒 ${getInlineChatColourByName("lightGrey")}== Your Inventory =========================`);
|
||||
} else {
|
||||
messagePlayerNormal(client, `🎒 [#AAAAAA]== ${getCharacterFullName(targetClient)}'s Inventory =========================`);
|
||||
messagePlayerNormal(client, `🎒 ${getInlineChatColourByName("lightGrey")}== ${getCharacterFullName(targetClient)}'s Inventory =========================`);
|
||||
}
|
||||
|
||||
let perChunk=5;
|
||||
@@ -1496,7 +1496,7 @@ function showPlayerInventoryToPlayer(client, targetClient) {
|
||||
}, []);
|
||||
|
||||
for(let i = 0 ; i <= splitItemDisplay.length-1 ; i++) {
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join("[#FFFFFF], "), COLOUR_WHITE);
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join(`${getInlineChatColourByName("white")}, `), COLOUR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1506,13 +1506,13 @@ function showHouseInventoryToPlayer(client, houseId) {
|
||||
let itemDisplay = [];
|
||||
for(let i in getHouseData(houseId).itemCache) {
|
||||
if(getHouseData(houseId).itemCache == -1) {
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}[#AAAAAA](Empty)`);
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}${getInlineChatColourByName("lightGrey")}(Empty)`);
|
||||
} else {
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: [#AAAAAA]${getItemTypeData(getItemData(getHouseData(houseId).itemCache[i]).itemTypeIndex).name}[${getItemValueDisplayForItem(getBusinessData(houseId).itemCache[i])}]`);
|
||||
itemDisplay.push(`[#CCCCCC]${toInteger(i)+1}: ${getInlineChatColourByName("lightGrey")}${getItemTypeData(getItemData(getHouseData(houseId).itemCache[i]).itemTypeIndex).name}[${getItemValueDisplayForItem(getBusinessData(houseId).itemCache[i])}]`);
|
||||
}
|
||||
}
|
||||
|
||||
messagePlayerNormal(client, `🏠 [#11CC11]== House Items ============================`);
|
||||
messagePlayerNormal(client, `🏠 ${getInlineChatColourByType("houseGreen")}== House Items ============================`);
|
||||
let perChunk=5;
|
||||
let splitItemDisplay = itemDisplay.reduce((all,one,i) => {
|
||||
const ch = Math.floor(i/perChunk);
|
||||
@@ -1521,7 +1521,7 @@ function showHouseInventoryToPlayer(client, houseId) {
|
||||
}, []);
|
||||
|
||||
for(let i = 0 ; i <= splitItemDisplay.length-1 ; i++) {
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join("[#FFFFFF], "), COLOUR_WHITE);
|
||||
messagePlayerNormal(client, splitItemDisplay[i].join(`${getInlineChatColourByName("white")}, `), COLOUR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ function walkieTalkieTransmit(radioFrequency, messageText, transmittingPlayer) {
|
||||
function walkieTalkieOutgoingToNearbyPlayers(client, messageText) {
|
||||
let clients = getPlayersInRange(getPlayerPosition(client), getGlobalConfig().talkDistance);
|
||||
for(let i in clients) {
|
||||
messagePlayerNormal(clients[i], `[#CCCCCC]${getCharacterFullName(client)} [#AAAAAA](to radio): [#FFFFFF]${messageText}`);
|
||||
messagePlayerNormal(clients[i], `[#CCCCCC]${getCharacterFullName(client)} ${getInlineChatColourByName("lightGrey")}(to radio): ${getInlineChatColourByName("white")}${messageText}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ function walkieTalkieOutgoingToNearbyPlayers(client, messageText) {
|
||||
function walkieTalkieIncomingToNearbyPlayers(client, messageText) {
|
||||
let clients = getPlayersInRange(getPlayerPosition(client), getGlobalConfig().walkieTalkieSpeakerDistance);
|
||||
for(let i in clients) {
|
||||
messagePlayerNormal(clients[i], `[#CCCCCC]${getCharacterFullName(client)} [#AAAAAA](from radio): [#FFFFFF]${messageText}`);
|
||||
messagePlayerNormal(clients[i], `[#CCCCCC]${getCharacterFullName(client)} ${getInlineChatColourByName("lightGrey")}(from radio): ${getInlineChatColourByName("white")}${messageText}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ function setWalkieTalkieFrequencyCommand(command, params, client) {
|
||||
if(doesPlayerHaveKeyBindForCommand(client, "use")) {
|
||||
messagePlayerError(client, `Your walkie talkie is turned off. Press ${sdl.getKeyName(getPlayerKeyBindForCommand(client, "use").key)} to turn it on`);
|
||||
} else {
|
||||
messagePlayerError(client, `Your walkie talkie is turned off. Type [#AAAAAA]/use [#FFFFFF]to turn it on`);
|
||||
messagePlayerError(client, `Your walkie talkie is turned off. Type ${getInlineChatColourByName("lightGrey")}/use ${getInlineChatColourByName("white")}to turn it on`);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ function takeJobCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(getPlayerCurrentSubAccount(client).job > VRR_JOB_NONE) {
|
||||
messagePlayerError(client, `[#FFFFFF]You already have a job! Use [#AAAAAA]/quitjob [#FFFFFF]to quit your current job.`);
|
||||
messagePlayerError(client, `${getInlineChatColourByName("white")}You already have a job! Use ${getInlineChatColourByName("lightGrey")}/quitjob ${getInlineChatColourByName("white")}to quit your current job.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ function takeJobCommand(command, params, client) {
|
||||
}
|
||||
|
||||
takeJob(client, closestJobLocation.jobIndex);
|
||||
messagePlayerSuccess(client, `[#FFFFFF]You now have the [#FFFF00]${jobData.name} [#FFFFFF]job`);
|
||||
messagePlayerSuccess(client, `${getInlineChatColourByName("white")}You now have the ${getInlineChatColourByType("jobYellow")}${jobData.name} ${getInlineChatColourByName("white")}job`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ function startWorking(client) {
|
||||
function getJobInfoCommand(command, params, client) {
|
||||
let closestJobLocation = getClosestJobLocation(getPlayerPosition(client));
|
||||
|
||||
messagePlayerInfo(client, `[#FFFF00][Job Info] [#FFFFFF]Name: [#AAAAAA]${getJobData(closestJobLocation.job).name}, [#FFFFFF]Enabled: [#AAAAAA]${getYesNoFromBool(intToBool(getJobData(closestJobLocation.job).enabled))}, [#FFFFFF]Whitelisted: [#AAAAAA]${getYesNoFromBool(intToBool(getJobData(closestJobLocation.job).whiteListEnabled))}, [#FFFFFF]Blacklisted: [#AAAAAA]${getYesNoFromBool(intToBool(getJobData(closestJobLocation.job).blackListEnabled))}, [#FFFFFF]ID: [#AAAAAA]${getJobData(closestJobLocation.job).id}/${closestJobLocation.job}`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("jobYellow")}[Job Info] ${getInlineChatColourByName("white")}Name: ${getInlineChatColourByName("lightGrey")}${getJobData(closestJobLocation.job).name}, ${getInlineChatColourByName("white")}Enabled: ${getInlineChatColourByName("lightGrey")}${getYesNoFromBool(intToBool(getJobData(closestJobLocation.job).enabled))}, ${getInlineChatColourByName("white")}Whitelisted: ${getInlineChatColourByName("lightGrey")}${getYesNoFromBool(intToBool(getJobData(closestJobLocation.job).whiteListEnabled))}, ${getInlineChatColourByName("white")}Blacklisted: ${getInlineChatColourByName("lightGrey")}${getYesNoFromBool(intToBool(getJobData(closestJobLocation.job).blackListEnabled))}, ${getInlineChatColourByName("white")}ID: ${getInlineChatColourByName("lightGrey")}${getJobData(closestJobLocation.job).id}/${closestJobLocation.job}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -480,7 +480,7 @@ function getJobInfoCommand(command, params, client) {
|
||||
function getJobLocationInfoCommand(command, params, client) {
|
||||
let closestJobLocation = getClosestJobLocation(getPlayerPosition(client));
|
||||
|
||||
messagePlayerInfo(client, `[#FFFF00][Job Location Info] [#FFFFFF]Job: [#AAAAAA]${getJobData(closestJobLocation.job).name} (${getJobData(closestJobLocation.job).id}/${closestJobLocation.job}), [#FFFFFF]Enabled: [#AAAAAA]${getYesNoFromBool(closestJobLocation.enabled)}, [#FFFFFF]Database ID: [#AAAAAA]${closestJobLocation.databaseId}`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("jobYellow")}[Job Location Info] ${getInlineChatColourByName("white")}Job: ${getInlineChatColourByName("lightGrey")}${getJobData(closestJobLocation.job).name} (${getJobData(closestJobLocation.job).id}/${closestJobLocation.job}), ${getInlineChatColourByName("white")}Enabled: ${getInlineChatColourByName("lightGrey")}${getYesNoFromBool(closestJobLocation.enabled)}, ${getInlineChatColourByName("white")}Database ID: ${getInlineChatColourByName("lightGrey")}${closestJobLocation.databaseId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -617,7 +617,7 @@ function jobUniformCommand(command, params, client) {
|
||||
|
||||
setPlayerSkin(client, getJobData(jobId).uniforms[uniformId-1].skin);
|
||||
|
||||
//messagePlayerSuccess(client, `You have been given a [#AAAAAA]${uniforms[uniformId-1].name} [#FFFFFF]uniform and you can put it on from your inventory.`);
|
||||
//messagePlayerSuccess(client, `You have been given a ${getInlineChatColourByName("lightGrey")}${uniforms[uniformId-1].name} ${getInlineChatColourByName("white")}uniform and you can put it on from your inventory.`);
|
||||
meActionToNearbyPlayers(client, `puts on ${getProperDeterminerForName(getJobData(jobId).uniforms[uniformId-1].name)} ${getJobData(jobId).uniforms[uniformId-1].name} uniform`);
|
||||
//let itemId = createItem(getItemTypeFromParams("Outfit"), getJobData(jobId).uniforms[uniformId-1].skin, VRR_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId);
|
||||
//let freeSlot = getPlayerFirstEmptyHotBarSlot(client);
|
||||
@@ -774,7 +774,7 @@ function createJobLocationCommand(command, params, client) {
|
||||
}
|
||||
|
||||
createJobLocation(jobId, getPlayerPosition(client), getPlayerInterior(client), getPlayerDimension(client));
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]created a location for the [#AAAAAA]${getJobData(jobId).name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}created a location for the ${getInlineChatColourByName("lightGrey")}${getJobData(jobId).name} ${getInlineChatColourByName("white")}job`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ function createJobLocationCommand(command, params, client) {
|
||||
function deleteJobLocationCommand(command, params, client) {
|
||||
let closestJobLocation = getClosestJobLocation(getPlayerPosition(client));
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]deleted location [#AAAAAA]${closestJobLocation.databaseId} [#FFFFFF]for the [#AAAAAA]${getJobData(closestJobLocation.jobIndex).name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}deleted location ${getInlineChatColourByName("lightGrey")}${closestJobLocation.databaseId} ${getInlineChatColourByName("white")}for the ${getInlineChatColourByName("lightGrey")}${getJobData(closestJobLocation.jobIndex).name} ${getInlineChatColourByName("white")}job`);
|
||||
|
||||
quickDatabaseQuery(`DELETE FROM job_loc WHERE job_loc_id = ${closestJobLocation.databaseId}`);
|
||||
|
||||
@@ -804,7 +804,7 @@ function toggleJobLocationEnabledCommand(command, params, client) {
|
||||
let closestJobLocation = getClosestJobLocation(getPlayerPosition(client));
|
||||
|
||||
closestJobLocation.enabled = !closestJobLocation.enabled;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]${getEnabledDisabledFromBool(closestJobLocation.enabled)} location [#AAAAAA]${closestJobLocation.databaseId} [#FFFFFF]for the [#AAAAAA]${getJobData(closestJobLocation.jobIndex).name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}${getEnabledDisabledFromBool(closestJobLocation.enabled)} location ${getInlineChatColourByName("lightGrey")}${closestJobLocation.databaseId} ${getInlineChatColourByName("white")}for the ${getInlineChatColourByName("lightGrey")}${getJobData(closestJobLocation.jobIndex).name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -818,7 +818,7 @@ function toggleJobEnabledCommand(command, params, client) {
|
||||
let jobId = getJobFromParams(params) || getClosestJobLocation(getPlayerPosition(client)).jobIndex;
|
||||
|
||||
getJobData(jobId).enabled = !getJobData(jobId).enabled;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]${getEnabledDisabledFromBool(getJobData(jobId).enabled)} [#FFFFFF]the [#AAAAAA]${getJobData(jobId).name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}${getEnabledDisabledFromBool(getJobData(jobId).enabled)} ${getInlineChatColourByName("white")}the ${getInlineChatColourByName("lightGrey")}${getJobData(jobId).name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -832,7 +832,7 @@ function toggleJobWhiteListCommand(command, params, client) {
|
||||
let jobId = getJobFromParams(params) || getClosestJobLocation(getPlayerPosition(client)).jobIndex;
|
||||
|
||||
getJobData(jobId).whiteListEnabled = !getJobData(jobId).whiteListEnabled;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]${getEnabledDisabledFromBool(getJobData(jobId).whiteListEnabled)} [#FFFFFF]the whitelist for the [#AAAAAA]${getJobData(jobId).name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}${getEnabledDisabledFromBool(getJobData(jobId).whiteListEnabled)} ${getInlineChatColourByName("white")}the whitelist for the ${getInlineChatColourByName("lightGrey")}${getJobData(jobId).name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -846,7 +846,7 @@ function toggleJobBlackListCommand(command, params, client) {
|
||||
let jobId = getJobFromParams(params) || getClosestJobLocation(getPlayerPosition(client)).jobIndex;
|
||||
|
||||
getJobData(jobId).blackListEnabled = !getJobData(jobId).blackListEnabled;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]${getEnabledDisabledFromBool(getJobData(jobId).blackListEnabled)} [#FFFFFF]the blacklist for the [#AAAAAA]${getJobData(jobId).name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}${getEnabledDisabledFromBool(getJobData(jobId).blackListEnabled)} ${getInlineChatColourByName("white")}the blacklist for the ${getInlineChatColourByName("lightGrey")}${getJobData(jobId).name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -876,7 +876,7 @@ function addPlayerToJobBlackListCommand(command, params, client) {
|
||||
}
|
||||
|
||||
addPlayerToJobBlackList(targetClient, jobId);
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]added ${getCharacterFullName(targetClient)} [#FFFFFF]to the blacklist for the [#AAAAAA]${jobData.name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}added ${getCharacterFullName(targetClient)} ${getInlineChatColourByName("white")}to the blacklist for the ${getInlineChatColourByName("lightGrey")}${jobData.name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -906,7 +906,7 @@ function removePlayerFromJobBlackListCommand(command, params, client) {
|
||||
}
|
||||
|
||||
removePlayerFromJobBlackList(targetClient, jobId);
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]removed ${getCharacterFullName(targetClient)} [#FFFFFF]from the blacklist for the [#AAAAAA]${jobData.name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}removed ${getCharacterFullName(targetClient)} ${getInlineChatColourByName("white")}from the blacklist for the ${getInlineChatColourByName("lightGrey")}${jobData.name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -936,7 +936,7 @@ function addPlayerToJobWhiteListCommand(command, params, client) {
|
||||
}
|
||||
|
||||
addPlayerToJobWhiteList(targetClient, jobId);
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]added ${getCharacterFullName(targetClient)} [#FFFFFF]to the whitelist for the [#AAAAAA]${jobData.name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}added ${getCharacterFullName(targetClient)} ${getInlineChatColourByName("white")}to the whitelist for the ${getInlineChatColourByName("lightGrey")}${jobData.name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -966,7 +966,7 @@ function removePlayerFromJobWhiteListCommand(command, params, client) {
|
||||
}
|
||||
|
||||
removePlayerFromJobWhiteList(targetClient, jobId);
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]removed ${getCharacterFullName(targetClient)} [#FFFFFF]from the whitelist for the [#AAAAAA]${jobData.name} [#FFFFFF]job`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}removed ${getCharacterFullName(targetClient)} ${getInlineChatColourByName("white")}from the whitelist for the ${getInlineChatColourByName("lightGrey")}${jobData.name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1068,7 +1068,7 @@ function startJobRoute(client) {
|
||||
getPlayerVehicle(client).colour1 = getBusRouteData(getPlayerIsland(client), busRoute).busColour;
|
||||
getPlayerVehicle(client).colour2 = 1;
|
||||
showCurrentBusStop(client);
|
||||
messagePlayerNormal(client, `🚌 You are now driving the [#AAAAAA]${getBusRouteData(getPlayerIsland(client), busRoute).name} [#FFFFFF]bus route! Drive to the green checkpoint.`);
|
||||
messagePlayerNormal(client, `🚌 You are now driving the ${getInlineChatColourByName("lightGrey")}${getBusRouteData(getPlayerIsland(client), busRoute).name} ${getInlineChatColourByName("white")}bus route! Drive to the green checkpoint.`);
|
||||
} else if(doesPlayerHaveJobType(client, VRR_JOB_GARBAGE)) {
|
||||
let garbageRoute = getRandomBusRoute(getPlayerIsland(client));
|
||||
getPlayerData(client).jobRoute = garbageRoute;
|
||||
@@ -1078,7 +1078,7 @@ function startJobRoute(client) {
|
||||
getPlayerVehicle(client).colour1 = getGarbageRouteData(getPlayerIsland(client), garbageRoute).garbageTruckColour;
|
||||
getPlayerVehicle(client).colour2 = 1;
|
||||
showCurrentGarbageStop(client);
|
||||
messagePlayerNormal(client, `🚌 You are now driving the [#AAAAAA]${getGarbageRouteData(getPlayerIsland(client), garbageRoute).name} [#FFFFFF]garbage route! Drive to the grey checkpoint.`);
|
||||
messagePlayerNormal(client, `🚌 You are now driving the ${getInlineChatColourByName("lightGrey")}${getGarbageRouteData(getPlayerIsland(client), garbageRoute).name} ${getInlineChatColourByName("white")}garbage route! Drive to the grey checkpoint.`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ function finishSuccessfulBusRoute(client) {
|
||||
let payout = toInteger(applyServerInflationMultiplier(getBusRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).payout));
|
||||
getPlayerData(client).payDayAmount = getPlayerData(client).payDayAmount + payout;
|
||||
messagePlayerNormal(client, `You finished the ${getBusRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).name} bus route!. Your bus has been returned to the bus depot.`, getColourByName("yellow"));
|
||||
messagePlayerNormal(client, `You earned $${getBusRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).payout*getServerData().inflationMultiplier}. Your total paycheck of [#AAAAAA]${getPlayerData(client).payDayAmount} will be received in [#AAAAAA]${getTimeDifferenceDisplay(sdl.ticks-getPlayerData(client).payDayTickStart)}`);
|
||||
messagePlayerNormal(client, `You earned $${getBusRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).payout*getServerData().inflationMultiplier}. Your total paycheck of ${getInlineChatColourByName("lightGrey")}${getPlayerData(client).payDayAmount} will be received in ${getInlineChatColourByName("lightGrey")}${getTimeDifferenceDisplay(sdl.ticks-getPlayerData(client).payDayTickStart)}`);
|
||||
getPlayerData(client).jobRouteVehicle = false;
|
||||
getPlayerData(client).jobRoute = 0;
|
||||
getPlayerData(client).jobRouteStop = 0;
|
||||
|
||||
@@ -148,7 +148,7 @@ function finishSuccessfulGarbageRoute(client) {
|
||||
let payout = toInteger(applyServerInflationMultiplier(getGarbageRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).payout));
|
||||
getPlayerData(client).payDayAmount = getPlayerData(client).payDayAmount + payout;
|
||||
messagePlayerNormal(client, `You finished the ${getGarbageRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).name} garbage route! Your trashmaster has been returned to the garbage depot.`, getColourByName("yellow"));
|
||||
messagePlayerNormal(client, `You earned $${getGarbageRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).payout*getServerData().inflationMultiplier}. Your total paycheck of [#AAAAAA]${getPlayerData(client).payDayAmount} will be received in [#AAAAAA]${getTimeDifferenceDisplay(sdl.ticks-getPlayerData(client).payDayTickStart)}: $${getPlayerData(client).payDayAmount}`);
|
||||
messagePlayerNormal(client, `You earned $${getGarbageRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).payout*getServerData().inflationMultiplier}. Your total paycheck of ${getInlineChatColourByName("lightGrey")}${getPlayerData(client).payDayAmount} will be received in ${getInlineChatColourByName("lightGrey")}${getTimeDifferenceDisplay(sdl.ticks-getPlayerData(client).payDayTickStart)}: $${getPlayerData(client).payDayAmount}`);
|
||||
getPlayerData(client).jobRouteVehicle = false;
|
||||
getPlayerData(client).jobRoute = 0;
|
||||
getPlayerData(client).jobRouteStop = 0;
|
||||
|
||||
@@ -245,7 +245,7 @@ function playerArrivedAtPizzaDeliveryDestination(client) {
|
||||
let payout = applyServerInflationMultiplier(getPizzaDeliveryPay(getPlayerData(client).jobDeliveryStart, getPlayerData(client).jobDeliveryStop));
|
||||
getPlayerData(client).payDayAmount += payout;
|
||||
messagePlayerNormal(client, `You delivered the pizza! Return to the pizza restaurant if you want to deliver another pizza.`, getColourByName("yellow"));
|
||||
messagePlayerNormal(client, `You earned $${payout}. Your total paycheck of [#AAAAAA]${getPlayerData(client).payDayAmount} will be received in [#AAAAAA]${getTimeDisplayUntilPlayerPayDay(client)}`);
|
||||
messagePlayerNormal(client, `You earned $${payout}. Your total paycheck of ${getInlineChatColourByName("lightGrey")}${getPlayerData(client).payDayAmount} will be received in ${getInlineChatColourByName("lightGrey")}${getTimeDisplayUntilPlayerPayDay(client)}`);
|
||||
getPlayerData(client).jobDeliveryVehicle = false;
|
||||
getPlayerData(client).jobDeliveryStart = 0;
|
||||
getPlayerData(client).jobDeliveryStop = 0;
|
||||
|
||||
@@ -145,7 +145,7 @@ function addKeyBindCommand(command, params, client) {
|
||||
if(!keyId) {
|
||||
messagePlayerError(client, "The key ID or name you input is invalid!");
|
||||
messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces.");
|
||||
messagePlayerInfo(client, "Examples: [#AAAAAA]1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl");
|
||||
messagePlayerInfo(client, "Examples: ${getInlineChatColourByName("lightGrey")}1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ function addKeyBindCommand(command, params, client) {
|
||||
}
|
||||
|
||||
addPlayerKeyBind(keyId, tempCommand, tempParams);
|
||||
messagePlayerSuccess(client, `You binded the [#AAAAAA]${sdl.getKeyName(keyId)} [#FFFFFF]key to command: [#AAAAAA]/${tempCommand} ${tempParams}`);
|
||||
messagePlayerSuccess(client, `You binded the ${getInlineChatColourByName("lightGrey")}${sdl.getKeyName(keyId)} ${getInlineChatColourByName("white")}key to command: ${getInlineChatColourByName("lightGrey")}/${tempCommand} ${tempParams}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -173,7 +173,7 @@ function removeKeyBindCommand(command, params, client) {
|
||||
if(!keyId) {
|
||||
messagePlayerError(client, "The key ID or name you input is invalid!");
|
||||
messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces.");
|
||||
messagePlayerInfo(client, "Examples: [#AAAAAA]1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl");
|
||||
messagePlayerInfo(client, "Examples: ${getInlineChatColourByName("lightGrey")}1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ function removeKeyBindCommand(command, params, client) {
|
||||
}
|
||||
|
||||
removePlayerKeyBind(client, keyId);
|
||||
messagePlayerSuccess(client, `You removed the keybind for the [#AAAAAA]${sdl.getKeyName(keyId)} [#FFFFFF]key`);
|
||||
messagePlayerSuccess(client, `You removed the keybind for the ${getInlineChatColourByName("lightGrey")}${sdl.getKeyName(keyId)} ${getInlineChatColourByName("white")}key`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -79,7 +79,7 @@ function messagePlayerSyntax(client, messageText) {
|
||||
}
|
||||
|
||||
if(!isClientFromDiscord(client)) {
|
||||
messagePlayerNormal(client, `⌨️ USAGE: [#FFFFFF] ${messageText}`, getColourByType("syntaxMessage"));
|
||||
messagePlayerNormal(client, `⌨️ USAGE: ${getInlineChatColourByName("white")} ${messageText}`, getColourByType("syntaxMessage"));
|
||||
} else {
|
||||
messageDiscordUser(client, `:keyboard: ${messageText}`);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ function messagePlayerAlert(client, messageText) {
|
||||
}
|
||||
|
||||
if(!isClientFromDiscord(client)) {
|
||||
messagePlayerNormal(client, `⚠️ [#FFFFFF] ${messageText}`, getColourByName("white"));
|
||||
messagePlayerNormal(client, `⚠️ ${getInlineChatColourByName("white")} ${messageText}`, getColourByName("white"));
|
||||
} else {
|
||||
messageDiscordUser(client, `:warning: ${messageText}`);
|
||||
}
|
||||
@@ -109,7 +109,7 @@ function messagePlayerSuccess(client, messageText) {
|
||||
}
|
||||
|
||||
if(!isClientFromDiscord(client)) {
|
||||
messagePlayerNormal(client, `👍 [#FFFFFF] ${messageText}`, getColourByName("white"));
|
||||
messagePlayerNormal(client, `👍 ${getInlineChatColourByName("white")} ${messageText}`, getColourByName("white"));
|
||||
} else {
|
||||
messageDiscordUser(client, `:thumbsup: ${messageText}`);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ function messagePlayerInfo(client, messageText) {
|
||||
}
|
||||
|
||||
if(!isClientFromDiscord(client)) {
|
||||
messagePlayerNormal(client, `ℹ️ [#FFFFFF] ${messageText}`, getColourByName("white"));
|
||||
messagePlayerNormal(client, `ℹ️ ${getInlineChatColourByName("white")} ${messageText}`, getColourByName("white"));
|
||||
} else {
|
||||
messageDiscordUser(client, `:information_source: ${messageText}`);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ function messagePlayerTip(client, messageText) {
|
||||
}
|
||||
|
||||
if(!isClientFromDiscord(client)) {
|
||||
messagePlayerNormal(client, `ℹ️ [#FFFFFF] ${messageText}`, getColourByName("white"));
|
||||
messagePlayerNormal(client, `ℹ️ ${getInlineChatColourByName("white")} ${messageText}`, getColourByName("white"));
|
||||
} else {
|
||||
messageDiscordUser(client, `:information_source: ${messageText}`);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ function messagePlayerClanChat(client, clanChattingClient, messageText) {
|
||||
// ===========================================================================
|
||||
|
||||
function messagePlayerAdminChat(client, adminChattingClient, messageText) {
|
||||
messagePlayerNormal(client, `🛡️ [ADMIN CHAT] [#AAAAAA]${getPlayerData(adminChattingClient).accountData.staffTitle} [#CCCCCC]${getPlayerData(adminChattingClient).accountData.name}: [#FFFFFF]${messageText}`, getColourByType("orange"));
|
||||
messagePlayerNormal(client, `🛡️ [ADMIN CHAT] ${getInlineChatColourByName("lightGrey")}${getPlayerData(adminChattingClient).accountData.staffTitle} [#CCCCCC]${getPlayerData(adminChattingClient).accountData.name}: ${getInlineChatColourByName("white")}${messageText}`, getColourByType("orange"));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -288,7 +288,7 @@ function getPlayerInfoCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerInfo(client, `[#AAAAAA][Player Info] [#FFFFFF]Account: [#AAAAAA]${getPlayerData(targetClient).accountData.name}[${getPlayerData(targetClient).accountData.databaseId}], [#FFFFFF]Character: [#AAAAAA]${getCharacterFullName(client)}[${getPlayerCurrentSubAccount(client).databaseId}], [#FFFFFF]Connected: [#AAAAAA]${getTimeDifferenceDisplay(Math.ceil(sdl.tick/1000), getPlayerData(targetClient).connectTime)} ago, [#FFFFFF]Game Version: [#AAAAAA]${targetClient.gameVersion}, [#FFFFFFF]Client Version: [#AAAAAA]${getPlayerData(targetClient).clientVersion}`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByName("lightGrey")}[Player Info] ${getInlineChatColourByName("white")}Account: ${getInlineChatColourByName("lightGrey")}${getPlayerData(targetClient).accountData.name}[${getPlayerData(targetClient).accountData.databaseId}], ${getInlineChatColourByName("white")}Character: ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(client)}[${getPlayerCurrentSubAccount(client).databaseId}], ${getInlineChatColourByName("white")}Connected: ${getInlineChatColourByName("lightGrey")}${getTimeDifferenceDisplay(Math.ceil(sdl.tick/1000), getPlayerData(targetClient).connectTime)} ago, ${getInlineChatColourByName("white")}Game Version: ${getInlineChatColourByName("lightGrey")}${targetClient.gameVersion}, [#FFFFFFF]Client Version: ${getInlineChatColourByName("lightGrey")}${getPlayerData(targetClient).clientVersion}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -334,7 +334,7 @@ function showPlayerPrompt(client, promptType, promptMessage, promptTitle) {
|
||||
showPlayerPromptGUI(client, promptMessage, promptTitle);
|
||||
} else {
|
||||
messagePlayerNormal(client, `❓ ${promptMessage}`);
|
||||
messagePlayerInfo(client, `[#FFFFFF]Use [#AAAAAA]/yes or [#AAAAAA]/no`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByName("white")}Use ${getInlineChatColourByName("lightGrey")}/yes or ${getInlineChatColourByName("lightGrey")}/no`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ function kickClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdminAction(`${targetClient.name} has been kicked from the server.`);
|
||||
messageAdminAction(`${targetgetPlayerName(client)} has been kicked from the server.`);
|
||||
targetClient.disconnect();
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@ function setClientStaffTitleCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getPlayerData(targetClient).accountData.staffTitle = staffTitle;
|
||||
messagePlayerSuccess(client, `You set ${targetClient.name}'s staff title to ${staffTitle}`);
|
||||
messagePlayerAlert(client, `${client.name} set your staff title to ${staffTitle}`);
|
||||
messagePlayerSuccess(client, `You set ${targetgetPlayerName(client)}'s staff title to ${staffTitle}`);
|
||||
messagePlayerAlert(client, `${getPlayerName(client)} set your staff title to ${staffTitle}`);
|
||||
targetClient.disconnect();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ function muteClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdminAction(`${targetClient.name} has been muted by an admin!`);
|
||||
messageAdminAction(`${targetgetPlayerName(client)} has been muted by an admin!`);
|
||||
getPlayerData(targetClient).muted = true;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ function unMuteClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdminAction(`${targetClient.name} has been unmuted by an admin!`);
|
||||
messageAdminAction(`${targetgetPlayerName(client)} has been unmuted by an admin!`);
|
||||
getPlayerData(targetClient).muted = false;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ function freezeClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdminAction(`${toString(targetClient.name)} has been frozen by an admin!`);
|
||||
messageAdminAction(`${toString(targetgetPlayerName(client))} has been frozen by an admin!`);
|
||||
//setPlayerFrozenState(client, state);
|
||||
setPlayerControlState(client, false);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ function unFreezeClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdminAction(`${toString(targetClient.name)} has been un-frozen by an admin!`);
|
||||
messageAdminAction(`${toString(targetgetPlayerName(client))} has been un-frozen by an admin!`);
|
||||
//sendPlayerFrozenState(client, false);
|
||||
setPlayerControlState(client, true);
|
||||
}
|
||||
@@ -198,7 +198,7 @@ function gotoPlayerCommand(command, params, client) {
|
||||
setPlayerDimension(client, getPlayerInterior(targetClient));
|
||||
}, 1000);
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to [#AAAAAA]${targetClient.name}`);
|
||||
messagePlayerSuccess(client, `You teleported to ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -222,7 +222,7 @@ function gotoVehicleCommand(command, params, client) {
|
||||
setPlayerDimension(client, getElementDimension(vehicle));
|
||||
}, 500);
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to a [#CC22CC]${getVehicleName(vehicle)} [#AAAAAA](ID ${vehicle.id})`);
|
||||
messagePlayerSuccess(client, `You teleported to a ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("lightGrey")}(ID ${vehicle.id})`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -247,7 +247,7 @@ function gotoBusinessCommand(command, params, client) {
|
||||
setPlayerDimension(client, getBusinessData(businessId).entranceDimension);
|
||||
}, 500);
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to business [#0099FF]${getBusinessData(businessId).name} [#AAAAAA](ID ${businessId})`);
|
||||
messagePlayerSuccess(client, `You teleported to business ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("lightGrey")}(ID ${businessId})`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -272,7 +272,7 @@ function gotoGameLocationCommand(command, params, client) {
|
||||
setPlayerDimension(client, 0);
|
||||
}, 500);
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to game location [#AAAAAA]${getGameData().locations[gameLocationId][0]}`);
|
||||
messagePlayerSuccess(client, `You teleported to game location ${getInlineChatColourByName("lightGrey")}${getGameData().locations[gameLocationId][0]}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -297,7 +297,7 @@ function gotoHouseCommand(command, params, client) {
|
||||
setPlayerDimension(client, getHouseData(houseId).entranceDimension);
|
||||
}, 500);
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to business [#0099FF]${getHouseData(houseId).description} [#AAAAAA](ID ${houseId})`);
|
||||
messagePlayerSuccess(client, `You teleported to business ${getInlineChatColourByType("businessBlue")}${getHouseData(houseId).description} ${getInlineChatColourByName("lightGrey")}(ID ${houseId})`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -329,7 +329,7 @@ function gotoJobLocationCommand(command, params, client) {
|
||||
setPlayerInterior(client, getJobData(jobId).locations[jobLocationId].interior);
|
||||
setPlayerDimension(client, getJobData(jobId).locations[jobLocationId].dimension);
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to location [#AAAAAA]${jobLocationId} [#FFFFFF]for the [#AAAAAA]${getJobData(jobId).name} [#FFFFFF]job`);
|
||||
messagePlayerSuccess(client, `You teleported to location ${getInlineChatColourByName("lightGrey")}${jobLocationId} ${getInlineChatColourByName("white")}for the ${getInlineChatColourByName("lightGrey")}${getJobData(jobId).name} ${getInlineChatColourByName("white")}job`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -356,7 +356,7 @@ function gotoPositionCommand(command, params, client) {
|
||||
setPlayerInterior(client, Number(int));
|
||||
setPlayerDimension(client, Number(vw));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to coordinates [#AAAAAA]${x}, ${y}, ${z} with interior ${int} and dimension ${vw}`);
|
||||
messagePlayerSuccess(client, `You teleported to coordinates ${getInlineChatColourByName("lightGrey")}${x}, ${y}, ${z} with interior ${int} and dimension ${vw}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -382,7 +382,7 @@ function teleportBackwardCommand(command, params, client) {
|
||||
|
||||
setPlayerPosition(client, getPosBehindPos(getPlayerPosition(client), getPlayerHeading(client), params));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported backward [#AAAAAA]${params} [#FFFFFF]meters`);
|
||||
messagePlayerSuccess(client, `You teleported backward ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -395,7 +395,7 @@ function teleportLeftCommand(command, params, client) {
|
||||
|
||||
setPlayerPosition(client, getPosToLeftOfPos(getPlayerPosition(client), getPlayerHeading(client), params));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported left [#AAAAAA]${params} [#FFFFFF]meters`);
|
||||
messagePlayerSuccess(client, `You teleported left ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -408,7 +408,7 @@ function teleportUpCommand(command, params, client) {
|
||||
|
||||
setPlayerPosition(client, getPosAbovePos(getPlayerPosition(client), params));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported up [#AAAAAA]${params} [#FFFFFF]meters`);
|
||||
messagePlayerSuccess(client, `You teleported up ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -421,7 +421,7 @@ function teleportDownCommand(command, params, client) {
|
||||
|
||||
setPlayerPosition(client, getPosBelowPos(getPlayerPosition(client), params));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported down [#AAAAAA]${params} [#FFFFFF]meters`);
|
||||
messagePlayerSuccess(client, `You teleported down ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -434,7 +434,7 @@ function teleportRightCommand(command, params, client) {
|
||||
|
||||
setPlayerPosition(client, getPosToRightOfPos(getPlayerPosition(client), getPlayerHeading(client), params));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported right [#AAAAAA]${params} [#FFFFFF]meters`);
|
||||
messagePlayerSuccess(client, `You teleported right ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -453,13 +453,13 @@ function playerInteriorCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(getParamsCount(params, " ") == 1) {
|
||||
messagePlayerInfo(client, `${targetClient.name}'s interior is [#AAAAAA]${getPlayerInterior(targetClient)}`);
|
||||
messagePlayerInfo(client, `${targetgetPlayerName(client)}'s interior is ${getInlineChatColourByName("lightGrey")}${getPlayerInterior(targetClient)}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
let interiorId = splitParams[1];
|
||||
setPlayerInterior(targetClient, Number(interiorId));
|
||||
messagePlayerSuccess(client, `You set ${targetClient.name}'s interior to [#AAAAAA]${interiorId}`);
|
||||
messagePlayerSuccess(client, `You set ${targetgetPlayerName(client)}'s interior to ${getInlineChatColourByName("lightGrey")}${interiorId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -478,13 +478,13 @@ function playerVirtualWorldCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(getParamsCount(params, " ") == 1) {
|
||||
messagePlayerInfo(client, `[#AAAAAA]${targetClient.name}'s [#FFFFFF]virtual world is [#AAAAAA]${getPlayerDimension(targetClient)}`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}'s ${getInlineChatColourByName("white")}virtual world is ${getInlineChatColourByName("lightGrey")}${getPlayerDimension(targetClient)}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
let dimensionId = splitParams[1];
|
||||
setPlayerDimension(targetClient, Number(dimensionId));
|
||||
messagePlayerSuccess(client, `You set [#AAAAAA]${targetClient.name}'s [#FFFFFF]virtual world to [#AAAAAA]${dimensionId}`);
|
||||
messagePlayerSuccess(client, `You set ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}'s ${getInlineChatColourByName("white")}virtual world to ${getInlineChatColourByName("lightGrey")}${dimensionId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -515,7 +515,7 @@ function getPlayerCommand(command, params, client) {
|
||||
setEntityData(client, "ag.inHouse", getPlayerBusiness(client));
|
||||
}
|
||||
|
||||
messagePlayerSuccess(client, `You teleported [#AAAAAA]${targetClient.name} [#FFFFFF]to you.`);
|
||||
messagePlayerSuccess(client, `You teleported ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)} ${getInlineChatColourByName("white")}to you.`);
|
||||
messagePlayerAlert(targetClient, `An admin has teleported you to their location`);
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ function addStaffFlagCommand(command, params, client) {
|
||||
}
|
||||
|
||||
givePlayerStaffFlag(targetClient, flagName);
|
||||
messagePlayerSuccess(client, `You have ${getBoolRedGreenInlineColour(true)}given [#AAAAAA]${targetClient.name} [#FFFFFF]the [#AAAAAA]${flagName} [#FFFFFF]staff flag`);
|
||||
messagePlayerSuccess(client, `You have ${getBoolRedGreenInlineColour(true)}given ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)} ${getInlineChatColourByName("white")}the ${getInlineChatColourByName("lightGrey")}${flagName} ${getInlineChatColourByName("white")}staff flag`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -584,7 +584,7 @@ function takeStaffFlagCommand(command, params, client) {
|
||||
}
|
||||
|
||||
takePlayerStaffFlag(targetClient, flagName);
|
||||
messagePlayerSuccess(client, `You have ${getBoolRedGreenInlineColour(false)}taken [#FFFFFF]the [#AAAAAA]${flagName} [#FFFFFF]staff flag from [#AAAAAA]${targetClient.name}`);
|
||||
messagePlayerSuccess(client, `You have ${getBoolRedGreenInlineColour(false)}taken ${getInlineChatColourByName("white")}the ${getInlineChatColourByName("lightGrey")}${flagName} ${getInlineChatColourByName("white")}staff flag from ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -618,7 +618,7 @@ function clearStaffFlagsCommand(command, params, client) {
|
||||
}
|
||||
|
||||
clearPlayerStaffFlags(targetClient);
|
||||
messagePlayerSuccess(client, `You have removed all staff flags from [#AAAAAA]${targetClient.name}`);
|
||||
messagePlayerSuccess(client, `You have removed all staff flags from ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -659,7 +659,7 @@ function getStaffFlagsCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messagePlayerInfo(client, `[#FFFFFF]${targetClient.name}'s staff flags: [#AAAAAA]${tempStaffFlags.join("[#FFFFFF], [#AAAAAA]")}`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByName("white")}${targetgetPlayerName(client)}'s staff flags: ${getInlineChatColourByName("lightGrey")}${tempStaffFlags.join("${getInlineChatColourByName("white")}, ${getInlineChatColourByName("lightGrey")}")}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -679,7 +679,7 @@ function allStaffFlagsCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerInfo(client, `[#FFFFFF]Staff flags: [#AAAAAA]${getServerBitFlagKeys().join("[#FFFFFF], [#AAAAAA]")}`);
|
||||
messagePlayerInfo(client, `${getInlineChatColourByName("white")}Staff flags: ${getInlineChatColourByName("lightGrey")}${getServerBitFlagKeys().join("${getInlineChatColourByName("white")}, ${getInlineChatColourByName("lightGrey")}")}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -701,8 +701,8 @@ function givePlayerMoneyCommand(command, params, client) {
|
||||
|
||||
givePlayerMoney(client, toInteger(amount));
|
||||
updatePlayerCash(targetClient);
|
||||
messagePlayerSuccess(client, `You gave [#AAAAAA]$${amount} [#FFFFFF]to [#AAAAAA]${getCharacterFullName(targetClient)}`);
|
||||
messagePlayerAlert(client, `An admin gave you [#AAAAAA]$${amount}`);
|
||||
messagePlayerSuccess(client, `You gave ${getInlineChatColourByName("lightGrey")}$${amount} ${getInlineChatColourByName("white")}to ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(targetClient)}`);
|
||||
messagePlayerAlert(client, `An admin gave you ${getInlineChatColourByName("lightGrey")}$${amount}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -729,11 +729,11 @@ function forcePlayerAccentCommand(command, params, client) {
|
||||
setPlayerAccentText(client, newAccent);
|
||||
|
||||
if(newAccent == "") {
|
||||
messagePlayerSuccess(client, `You removed [#AAAAAA]${getCharacterFullName(targetClient)}'s [#FFFFFF]accent.`);
|
||||
messagePlayerSuccess(client, `You removed ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(targetClient)}'s ${getInlineChatColourByName("white")}accent.`);
|
||||
messagePlayerAlert(client, `An admin removed your accent.`);
|
||||
} else {
|
||||
messagePlayerSuccess(client, `You set [#AAAAAA]${getCharacterFullName(targetClient)}'s [#FFFFFF]accent to [#AAAAAA]${newAccent}`);
|
||||
messagePlayerAlert(client, `An admin set your accent to [#AAAAAA]${newAccent}`);
|
||||
messagePlayerSuccess(client, `You set ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(targetClient)}'s ${getInlineChatColourByName("white")}accent to ${getInlineChatColourByName("lightGrey")}${newAccent}`);
|
||||
messagePlayerAlert(client, `An admin set your accent to ${getInlineChatColourByName("lightGrey")}${newAccent}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,7 +753,7 @@ function forceCharacterNameChangeCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerSuccess(client, `You forced [#AAAAAA]${targetClient.name} (${getCharacterFullName(targetClient)}) [#FFFFFF]to change their character's name.`);
|
||||
messagePlayerSuccess(client, `You forced ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)} (${getCharacterFullName(targetClient)}) ${getInlineChatColourByName("white")}to change their character's name.`);
|
||||
showPlayerNewCharacterFailedGUI(client, "Non-RP name! Choose a new one:");
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ function forceCharacterNameCommand(command, params, client) {
|
||||
getPlayerCurrentSubAccount(client).firstName = firstName;
|
||||
getPlayerCurrentSubAccount(client).lastName = lastName;
|
||||
|
||||
messagePlayerSuccess(client, `You forced [#AAAAAA]${targetClient.name}'s [#FFFFFF]current character name from [#AAAAAA]${oldName} [#FFFFFF]to [#AAAAAA]${newName}`);
|
||||
messagePlayerSuccess(client, `You forced ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}'s ${getInlineChatColourByName("white")}current character name from ${getInlineChatColourByName("lightGrey")}${oldName} ${getInlineChatColourByName("white")}to ${getInlineChatColourByName("lightGrey")}${newName}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
318
scripts/server/native/gtac.js
Normal file
318
scripts/server/native/gtac.js
Normal file
@@ -0,0 +1,318 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// ===========================================================================
|
||||
// FILE: gtac.js
|
||||
// DESC: Provides natives for GTA Connected (GTA III, VC, SA, & IV)
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
// Use data for each because args are probably gonna be way different for each mod
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerPosition(client) {
|
||||
if(getServerGame() == GAME_GTA_IV) {
|
||||
return getPlayerData(client).syncPosition;
|
||||
} else {
|
||||
if(client.player != null) {
|
||||
return client.player.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerPosition(client, position) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s position to ${position.x}, ${position.y}, ${position.z}`);
|
||||
sendPlayerSetPosition(client, position);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerHeading(client) {
|
||||
if(getServerGame() == GAME_GTA_IV) {
|
||||
return getPlayerData(client).syncHeading;
|
||||
} else {
|
||||
if(client.player != null) {
|
||||
return client.player.heading;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerHeading(client, heading) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s heading to ${heading}`);
|
||||
sendPlayerSetHeading(client, heading);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerVehicle(client) {
|
||||
if(getServerGame() == GAME_GTA_IV) {
|
||||
return getPlayerData().syncVehicle;
|
||||
} else {
|
||||
if(client.player.vehicle) {
|
||||
return client.player.vehicle;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerDimension(client) {
|
||||
return client.player.dimension;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerInterior(client) {
|
||||
return getPlayerCurrentSubAccount(client).interior || 0;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerDimension(client, dimension) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s dimension to ${dimension}`);
|
||||
client.player.dimension = dimension;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerInterior(client, interior) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s interior to ${interior}`);
|
||||
sendPlayerSetInterior(client, interior);
|
||||
getPlayerCurrentSubAccount(client).interior = interior;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerInAnyVehicle(client) {
|
||||
if(getServerGame() == GAME_GTA_IV) {
|
||||
return (getPlayerData().syncVehicle != null);
|
||||
} else {
|
||||
return (client.player.vehicle != null);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerVehicleSeat(client) {
|
||||
if(!isPlayerInAnyVehicle(client)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for(let i = 0 ; i <= 8 ; i++) {
|
||||
if(getPlayerVehicle(client).getOccupant(i) == client.player) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerSpawned(client) {
|
||||
return getPlayerData(client).spawned;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getVehiclePosition(vehicle) {
|
||||
return vehicle.position;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getVehicleHeading(vehicle) {
|
||||
return vehicle.heading;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getVehicleSyncer(vehicle) {
|
||||
return getElementSyncer(vehicle);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getVehicleForNetworkEvent(vehicle) {
|
||||
return vehicle;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function deleteGameElement(element) {
|
||||
logToConsole(LOG_DEBUG, `Destroying game element ${element.id} (Type: ${element.type})`);
|
||||
if(element != null) {
|
||||
destroyElement(element);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerInFrontVehicleSeat(client) {
|
||||
return (getPlayerVehicleSeat(client) == 0 || getPlayerVehicleSeat(client) == 1);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function removePlayerFromVehicle(client) {
|
||||
logToConsole(LOG_DEBUG, `Removing ${getPlayerDisplayForConsole(client)} from their vehicle`);
|
||||
sendPlayerRemoveFromVehicle(client);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerSkin(client, skin) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s skin to ${skin} (${getSkinNameFromId(skin)})`);
|
||||
client.player.modelIndex = skin;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerSkin(client) {
|
||||
return client.player.modelIndex;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerHealth(client, health) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s health to ${health}`);
|
||||
sendPlayerSetHealth(client, health);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerHealth(client) {
|
||||
return client.player.health;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerArmour(client, armour) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s armour to ${armour}`);
|
||||
sendPlayerSetArmour(client, armour);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerArmour(client) {
|
||||
return client.player.armour;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerCash(client, amount) {
|
||||
getPlayerCurrentSubAccount(client).cash = toInteger(amount);
|
||||
updatePlayerCash(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function givePlayerCash(client, amount) {
|
||||
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash + toInteger(amount);
|
||||
updatePlayerCash(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function takePlayerCash(client, amount) {
|
||||
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash - toInteger(amount);
|
||||
updatePlayerCash(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function disconnectPlayer(client) {
|
||||
logToConsole(LOG_DEBUG, `Disconnecting (kicking) ${getPlayerDisplayForConsole(client)}`);
|
||||
client.disconnect();
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getElementSyncer(element) {
|
||||
return getClients()[element.syncer];
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerWeaponAmmo(client) {
|
||||
return client.player.weaponAmmunition;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerVelocity(client, velocity) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s velocity to ${velocity.x}, ${velocity.y}, ${velocity.z}`);
|
||||
client.player.velocity = velocity;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerVelocity(client, velocity) {
|
||||
return client.player.velocity;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getElementDimension(element) {
|
||||
return element.dimension;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setElementDimension(element, dimension) {
|
||||
return element.dimension = dimension;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function givePlayerHealth(client, amount) {
|
||||
if(getPlayerHealth(client)+amount > 100) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s health to 100`);
|
||||
setPlayerHealth(client, 100);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s health to ${getPlayerHealth(client)+amount}`);
|
||||
setPlayerHealth(client, getPlayerHealth(client)+amount);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function givePlayerArmour(client, amount) {
|
||||
if(getPlayerArmour(client)+amount > 100) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s armour to 100`);
|
||||
setPlayerArmour(client, 100);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s armour to ${getPlayerArmour(client)+amount}`);
|
||||
setPlayerArmour(client, getPlayerArmour(client)+amount);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getServerGame() {
|
||||
return getGame();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function consolePrint(text) {
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerName(client) {
|
||||
return client.name;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -2,8 +2,8 @@
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// ===========================================================================
|
||||
// FILE: native.js
|
||||
// DESC: Provides util function to wrap mod-specific stuff
|
||||
// FILE: oakwood.js
|
||||
// DESC: Provides natives for Project Oakwood (Mafia 1)
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
@@ -303,4 +303,16 @@ function getServerGame() {
|
||||
return getGame();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function consolePrint(text) {
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerName(client) {
|
||||
return client.name;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -937,7 +937,7 @@ function getPlayerDisplayForConsole(client) {
|
||||
if(isNull(client)) {
|
||||
return "(Unknown client)";
|
||||
}
|
||||
return `${client.name}[${client.index}]`;
|
||||
return `${getPlayerName(client)}[${client.index}]`;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -946,7 +946,7 @@ function getPlayerNameForNameTag(client) {
|
||||
if(isPlayerSpawned(client)) {
|
||||
return `${getPlayerCurrentSubAccount(client).firstName} ${getPlayerCurrentSubAccount(client).lastName}`;
|
||||
}
|
||||
return client.name;
|
||||
return getPlayerName(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -133,7 +133,7 @@ function createVehicleCommand(command, params, client) {
|
||||
let frontPos = getPosInFrontOfPos(getPlayerPosition(client), getPlayerHeading(client), getGlobalConfig().spawnCarDistance);
|
||||
let vehicle = createPermanentVehicle(modelId, frontPos, getPlayerHeading(client));
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]created a [#CC22CC]${getVehicleName(vehicle)}!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}created a ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)}!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -154,7 +154,7 @@ function createTemporaryVehicleCommand(command, params, client) {
|
||||
let frontPos = getPosInFrontOfPos(getPlayerPosition(client), getPlayerHeading(client), getGlobalConfig().spawnCarDistance);
|
||||
let vehicle = createTemporaryVehicle(modelId, frontPos, getPlayerHeading(client));
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]created a temporary [#CC22CC]${getVehicleName(vehicle)}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}created a temporary ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -586,7 +586,7 @@ function setVehicleJobCommand(command, params, client) {
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_JOB;
|
||||
getVehicleData(vehicle).ownerId = jobId;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to the [#FFFF00]${getJobData(jobId).name} [#FFFFFF]job! (Job ID ${jobId})`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}owner to the ${getInlineChatColourByType("jobYellow")}${getJobData(jobId).name} ${getInlineChatColourByName("white")}job! (Job ID ${jobId})`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -613,10 +613,10 @@ function setVehicleRankCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
getVehicleData(vehicle).rank = getClanRankData(getVehicleData(vehicle).ownerId, rankId).databaseId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]rank to [#AAAAAA]${getClanRankData(getVehicleData(vehicle).ownerId, rankId).name} [#FFFFFF]of the [#FF9900]${getClanData(getVehicleData(vehicle).ownerId).name} [#FFFFFFclan!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}rank to ${getInlineChatColourByName("lightGrey")}${getClanRankData(getVehicleData(vehicle).ownerId, rankId).name} ${getInlineChatColourByName("white")}of the ${getInlineChatColourByType("clanOrange")}${getClanData(getVehicleData(vehicle).ownerId).name} [#FFFFFFclan!`);
|
||||
} else if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_JOB) {
|
||||
getVehicleData(vehicle).rank = rankId;
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]rank to [#AAAAAA]${rankId} [#FFFFFF]of the [#FFFF00]${getJobData(getVehicleData(vehicle).ownerId).name} [#FFFFFF]job!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}rank to ${getInlineChatColourByName("lightGrey")}${rankId} ${getInlineChatColourByName("white")}of the ${getInlineChatColourByType("jobYellow")}${getJobData(getVehicleData(vehicle).ownerId).name} ${getInlineChatColourByName("white")}job!`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ function setVehicleClanCommand(command, params, client) {
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_CLAN;
|
||||
getVehicleData(vehicle).ownerId = getClanData(clanId).databaseId;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to the [#FF9900]${getClanData(clanId).name} [#FFFFFF]clan`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}owner to the ${getInlineChatColourByType("clanOrange")}${getClanData(clanId).name} ${getInlineChatColourByName("white")}clan`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -656,7 +656,7 @@ function setVehicleToBusinessCommand(command, params, client) {
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_BIZ;
|
||||
getVehicleData(vehicle).ownerId = getBusinessData(businessId).databaseId;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to the [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]business`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}owner to the ${getInlineChatColourByType("businessBlue")}${getBusinessData(businessId).name} ${getInlineChatColourByName("white")}business`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -678,7 +678,7 @@ function setVehicleOwnerCommand(command, params, client) {
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_PLAYER;
|
||||
getVehicleData(vehicle).ownerId = getPlayerCurrentSubAccount(targetClient).databaseId;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to [#AAAAAA]${getClientSubAccountName(targetClient)}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}owner to ${getInlineChatColourByName("lightGrey")}${getClientSubAccountName(targetClient)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -701,7 +701,7 @@ function setVehicleRentPriceCommand(command, params, client) {
|
||||
|
||||
getVehicleData(vehicle).rentPrice = amount;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]rent price to [#AAAAAA]$${amount}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}rent price to ${getInlineChatColourByName("lightGrey")}$${amount}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -724,7 +724,7 @@ function setVehicleBuyPriceCommand(command, params, client) {
|
||||
|
||||
getVehicleData(vehicle).buyPrice = amount;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)}'s [#FFFFFF]buy price to [#AAAAAA]$${amount}!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)}'s ${getInlineChatColourByName("white")}buy price to ${getInlineChatColourByName("lightGrey")}$${amount}!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -746,7 +746,7 @@ function removeVehicleOwnerCommand(command, params, client) {
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_NONE;
|
||||
getVehicleData(vehicle).ownerId = 0;
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to nobody!`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}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).`);
|
||||
}
|
||||
|
||||
@@ -796,7 +796,7 @@ function getVehicleInfoCommand(command, params, client) {
|
||||
break;
|
||||
}
|
||||
|
||||
messagePlayerNormal(client, `🚗 [#CC22CC][Vehicle Info] [#FFFFFF]ID: [#AAAAAA]${vehicle.id}, [#FFFFFF]DatabaseID: [#AAAAAA]${vehicleData.databaseId}, [#FFFFFF]Owner: [#AAAAAA]${ownerName}[ID ${vehicleData.ownerId}] (${ownerType}), [#FFFFFF]Type: [#AAAAAA]${getVehicleName(vehicle)}[${vehicle.modelIndex}], [#FFFFFF]BuyPrice: [#AAAAAA]${vehicleData.buyPrice}, [#FFFFFF]RentPrice: [#AAAAAA]${vehicleData.rentPrice}`);
|
||||
messagePlayerNormal(client, `🚗 ${getInlineChatColourByType("vehiclePurple")}[Vehicle Info] ${getInlineChatColourByName("white")}ID: ${getInlineChatColourByName("lightGrey")}${vehicle.id}, ${getInlineChatColourByName("white")}DatabaseID: ${getInlineChatColourByName("lightGrey")}${vehicleData.databaseId}, ${getInlineChatColourByName("white")}Owner: ${getInlineChatColourByName("lightGrey")}${ownerName}[ID ${vehicleData.ownerId}] (${ownerType}), ${getInlineChatColourByName("white")}Type: ${getInlineChatColourByName("lightGrey")}${getVehicleName(vehicle)}[${vehicle.modelIndex}], ${getInlineChatColourByName("white")}BuyPrice: ${getInlineChatColourByName("lightGrey")}${vehicleData.buyPrice}, ${getInlineChatColourByName("white")}RentPrice: ${getInlineChatColourByName("lightGrey")}${vehicleData.rentPrice}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -817,7 +817,7 @@ function toggleVehicleSpawnLockCommand(command, params, client) {
|
||||
getVehicleData(vehicle).spawnLocked = spawnLocked;
|
||||
}
|
||||
|
||||
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]to spawn [#AAAAAA]${(spawnLocked) ? "at it's current location" : "wherever a player leaves it."}`);
|
||||
messageAdmins(`${getInlineChatColourByName("lightGrey")}${getPlayerName(client)} ${getInlineChatColourByName("white")}set their ${getInlineChatColourByType("vehiclePurple")}${getVehicleName(vehicle)} ${getInlineChatColourByName("white")}to spawn ${getInlineChatColourByName("lightGrey")}${(spawnLocked) ? "at it's current location" : "wherever a player leaves it."}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
Reference in New Issue
Block a user