Add JSDoc + use locale strings for admin announce
This commit is contained in:
@@ -136,6 +136,15 @@ function loadBusinessGameScriptsFromDatabase(businessId) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function createBusinessCommand(command, params, client) {
|
function createBusinessCommand(command, params, client) {
|
||||||
let tempBusinessData = createBusiness(params, getPlayerPosition(client), toVector3(0.0, 0.0, 0.0), getGameConfig().pickupModels[getServerGame()].Business, getGameConfig().blipSprites[getServerGame()].Business, getPlayerInterior(client), getPlayerDimension(client), getPlayerData(client).interiorCutscene);
|
let tempBusinessData = createBusiness(params, getPlayerPosition(client), toVector3(0.0, 0.0, 0.0), getGameConfig().pickupModels[getServerGame()].Business, getGameConfig().blipSprites[getServerGame()].Business, getPlayerInterior(client), getPlayerDimension(client), getPlayerData(client).interiorCutscene);
|
||||||
tempBusinessData.needsSaved = true;
|
tempBusinessData.needsSaved = true;
|
||||||
@@ -154,6 +163,15 @@ function createBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function createBusinessLocationCommand(command, params, client) {
|
function createBusinessLocationCommand(command, params, client) {
|
||||||
if(!isPlayerSpawned(client)) {
|
if(!isPlayerSpawned(client)) {
|
||||||
messagePlayerError(client, "You must be spawned to use this command!");
|
messagePlayerError(client, "You must be spawned to use this command!");
|
||||||
@@ -204,6 +222,15 @@ function createBusiness(name, entrancePosition, exitPosition, entrancePickupMode
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function deleteBusinessCommand(command, params, client) {
|
function deleteBusinessCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -222,6 +249,15 @@ function deleteBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function deleteBusinessLocationCommand(command, params, client) {
|
function deleteBusinessLocationCommand(command, params, client) {
|
||||||
//let businessId = toInteger(getParam(params, " ", 2));
|
//let businessId = toInteger(getParam(params, " ", 2));
|
||||||
//deleteBusinessLocation(businessId);
|
//deleteBusinessLocation(businessId);
|
||||||
@@ -230,6 +266,15 @@ function deleteBusinessLocationCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessNameCommand(command, params, client) {
|
function setBusinessNameCommand(command, params, client) {
|
||||||
let newBusinessName = toString(params);
|
let newBusinessName = toString(params);
|
||||||
|
|
||||||
@@ -241,7 +286,7 @@ function setBusinessNameCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change the name of this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,6 +299,15 @@ function setBusinessNameCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessOwnerCommand(command, params, client) {
|
function setBusinessOwnerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -274,7 +328,7 @@ function setBusinessOwnerCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change the owner of this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,6 +341,15 @@ function setBusinessOwnerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessJobCommand(command, params, client) {
|
function setBusinessJobCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -307,7 +370,7 @@ function setBusinessJobCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change the owner of this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,6 +383,15 @@ function setBusinessJobCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessClanCommand(command, params, client) {
|
function setBusinessClanCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -336,7 +408,7 @@ function setBusinessClanCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't give this business to a clan!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,6 +421,15 @@ function setBusinessClanCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessRankCommand(command, params, client) {
|
function setBusinessRankCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -360,7 +441,7 @@ function setBusinessRankCommand(command, params, client) {
|
|||||||
let rankId = params;
|
let rankId = params;
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change this business rank level!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,7 +501,7 @@ function setBusinessRankCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change this business rank!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,6 +518,15 @@ function setBusinessRankCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessJobCommand(command, params, client) {
|
function setBusinessJobCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -470,6 +560,15 @@ function setBusinessJobCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessPublicCommand(command, params, client) {
|
function setBusinessPublicCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -491,6 +590,15 @@ function setBusinessPublicCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function removeBusinessOwnerCommand(command, params, client) {
|
function removeBusinessOwnerCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -512,6 +620,15 @@ function removeBusinessOwnerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function lockUnlockBusinessCommand(command, params, client) {
|
function lockUnlockBusinessCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -525,7 +642,7 @@ function lockUnlockBusinessCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change this business rank!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,6 +686,15 @@ function lockUnlockBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessEntranceFeeCommand(command, params, client) {
|
function setBusinessEntranceFeeCommand(command, params, client) {
|
||||||
let entranceFee = toInteger(getParam(params, " ", 1)) || 0;
|
let entranceFee = toInteger(getParam(params, " ", 1)) || 0;
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
@@ -579,7 +705,7 @@ function setBusinessEntranceFeeCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change the entrance fee for this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,6 +716,15 @@ function setBusinessEntranceFeeCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getBusinessInfoCommand(command, params, client) {
|
function getBusinessInfoCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -631,6 +766,15 @@ function getBusinessInfoCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getBusinessFloorItemsCommand(command, params, client) {
|
function getBusinessFloorItemsCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -648,6 +792,15 @@ function getBusinessFloorItemsCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getBusinessStorageItemsCommand(command, params, client) {
|
function getBusinessStorageItemsCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -665,6 +818,15 @@ function getBusinessStorageItemsCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessPickupCommand(command, params, client) {
|
function setBusinessPickupCommand(command, params, client) {
|
||||||
let typeParam = getParam(params, " ", 1) || "business";
|
let typeParam = getParam(params, " ", 1) || "business";
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
@@ -701,6 +863,15 @@ function setBusinessPickupCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessInteriorTypeCommand(command, params, client) {
|
function setBusinessInteriorTypeCommand(command, params, client) {
|
||||||
let typeParam = getParam(params, " ", 1) || "business";
|
let typeParam = getParam(params, " ", 1) || "business";
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
@@ -758,6 +929,15 @@ function setBusinessInteriorTypeCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessBlipCommand(command, params, client) {
|
function setBusinessBlipCommand(command, params, client) {
|
||||||
let typeParam = getParam(params, " ", 1) || "business";
|
let typeParam = getParam(params, " ", 1) || "business";
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
@@ -794,6 +974,15 @@ function setBusinessBlipCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function giveDefaultItemsToBusinessCommand(command, params, client) {
|
function giveDefaultItemsToBusinessCommand(command, params, client) {
|
||||||
let typeParam = getParam(params, " ", 1) || "business";
|
let typeParam = getParam(params, " ", 1) || "business";
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
@@ -836,6 +1025,15 @@ function giveDefaultItemsToBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessEntranceLabelToDealershipCommand(command, params, client) {
|
function setBusinessEntranceLabelToDealershipCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -851,6 +1049,15 @@ function setBusinessEntranceLabelToDealershipCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function deleteBusinessFloorItemsCommand(command, params, client) {
|
function deleteBusinessFloorItemsCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -871,6 +1078,15 @@ function deleteBusinessFloorItemsCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function deleteBusinessStorageItemsCommand(command, params, client) {
|
function deleteBusinessStorageItemsCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -891,6 +1107,15 @@ function deleteBusinessStorageItemsCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function withdrawFromBusinessCommand(command, params, client) {
|
function withdrawFromBusinessCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -906,7 +1131,7 @@ function withdrawFromBusinessCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't withdraw cash from this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -925,6 +1150,15 @@ function withdrawFromBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessBuyPriceCommand(command, params, client) {
|
function setBusinessBuyPriceCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -940,7 +1174,7 @@ function setBusinessBuyPriceCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't change the purchase price for this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -958,6 +1192,15 @@ function setBusinessBuyPriceCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function depositIntoBusinessCommand(command, params, client) {
|
function depositIntoBusinessCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -993,6 +1236,15 @@ function depositIntoBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function orderItemForBusinessCommand(command, params, client) {
|
function orderItemForBusinessCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1026,7 +1278,7 @@ function orderItemForBusinessCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't order items for this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1045,6 +1297,15 @@ function orderItemForBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function orderItemForBusiness(businessId, itemType, amount) {
|
function orderItemForBusiness(businessId, itemType, amount) {
|
||||||
if(getBusinessData(businessId).till < orderTotalCost) {
|
if(getBusinessData(businessId).till < orderTotalCost) {
|
||||||
let neededAmount = orderTotalCost-getBusinessData(businessId).till;
|
let neededAmount = orderTotalCost-getBusinessData(businessId).till;
|
||||||
@@ -1059,6 +1320,15 @@ function orderItemForBusiness(businessId, itemType, amount) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function viewBusinessTillAmountCommand(command, params, client) {
|
function viewBusinessTillAmountCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -1072,7 +1342,7 @@ function viewBusinessTillAmountCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!canPlayerManageBusiness(client, businessId)) {
|
if(!canPlayerManageBusiness(client, businessId)) {
|
||||||
messagePlayerError(client, "You can't see the till amount for this business!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1081,6 +1351,15 @@ function viewBusinessTillAmountCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function buyBusinessCommand(command, params, client) {
|
function buyBusinessCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -1111,6 +1390,15 @@ function buyBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function moveBusinessEntranceCommand(command, params, client) {
|
function moveBusinessEntranceCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -1142,6 +1430,15 @@ function moveBusinessEntranceCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function moveBusinessExitCommand(command, params, client) {
|
function moveBusinessExitCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -1615,6 +1912,15 @@ function deleteBusinessExitBlip(businessId) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function reloadAllBusinessesCommand(command, params, client) {
|
function reloadAllBusinessesCommand(command, params, client) {
|
||||||
let clients = getClients();
|
let clients = getClients();
|
||||||
for(let i in clients) {
|
for(let i in clients) {
|
||||||
@@ -1638,7 +1944,7 @@ function reloadAllBusinessesCommand(command, params, client) {
|
|||||||
setAllBusinessIndexes();
|
setAllBusinessIndexes();
|
||||||
cacheAllBusinessItems();
|
cacheAllBusinessItems();
|
||||||
|
|
||||||
messageAdminAction(`All businesses have been reloaded by an admin!`);
|
announceAdminAction(`All businesses have been reloaded by an admin!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1679,6 +1985,15 @@ function addToBusinessInventory(businessId, itemType, amount, buyPrice) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function buyFromBusinessCommand(command, params, client) {
|
function buyFromBusinessCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -1780,6 +2095,15 @@ function buyFromBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setBusinessItemSellPriceCommand(command, params, client) {
|
function setBusinessItemSellPriceCommand(command, params, client) {
|
||||||
let businessId = getBusinessFromParams(getParam(params, " ", 3)) || getPlayerBusiness(client);
|
let businessId = getBusinessFromParams(getParam(params, " ", 3)) || getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -1814,6 +2138,15 @@ function setBusinessItemSellPriceCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function storeItemInBusinessStorageCommand(command, params, client) {
|
function storeItemInBusinessStorageCommand(command, params, client) {
|
||||||
let businessId = getBusinessFromParams(getParam(params, " ", 3)) || getPlayerBusiness(client);
|
let businessId = getBusinessFromParams(getParam(params, " ", 3)) || getPlayerBusiness(client);
|
||||||
|
|
||||||
@@ -1849,6 +2182,15 @@ function storeItemInBusinessStorageCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function stockItemOnBusinessFloorCommand(command, params, client) {
|
function stockItemOnBusinessFloorCommand(command, params, client) {
|
||||||
let businessId = getPlayerBusiness(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
|
|
||||||
|
|||||||
@@ -1068,13 +1068,6 @@ function sendPlayerPedPartsAndProps(client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function forcePlayerWantedLevel(client, wantedLevel) {
|
|
||||||
sendNetworkEventToPlayer("vrr.wantedLevel", client, wantedLevel);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
function onPlayerNearPickup(client, pickupId) {
|
function onPlayerNearPickup(client, pickupId) {
|
||||||
getPlayerData(client).currentPickup = getElementFromId(pickupId);
|
getPlayerData(client).currentPickup = getElementFromId(pickupId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -432,25 +432,25 @@ function loadCommands() {
|
|||||||
commandData("dn", teleportDownCommand, "[distance in meters]", getStaffFlagValue("BasicModeration"), true, true, "Teleports you downward a certain distance in meters."),
|
commandData("dn", teleportDownCommand, "[distance in meters]", getStaffFlagValue("BasicModeration"), true, true, "Teleports you downward a certain distance in meters."),
|
||||||
commandData("int", playerInteriorCommand, "<player name/id> [interior id]", getStaffFlagValue("BasicModeration"), true, true, "Gets or sets a player's game interior."),
|
commandData("int", playerInteriorCommand, "<player name/id> [interior id]", getStaffFlagValue("BasicModeration"), true, true, "Gets or sets a player's game interior."),
|
||||||
commandData("vw", playerVirtualWorldCommand, "<player name/id> [virtual world id]", getStaffFlagValue("BasicModeration"), true, true, "Gets or sets a player's virtual world/dimension."),
|
commandData("vw", playerVirtualWorldCommand, "<player name/id> [virtual world id]", getStaffFlagValue("BasicModeration"), true, true, "Gets or sets a player's virtual world/dimension."),
|
||||||
commandData("addstaffflag", addStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("ManageAdmins"), true, true, "Gives a player a staff flag by name (this server only)."),
|
commandData("addstaffflag", addPlayerStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("ManageAdmins"), true, true, "Gives a player a staff flag by name (this server only)."),
|
||||||
commandData("delstaffflag", takeStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("ManageAdmins"), true, true, "Takes a player's staff flag by name (this server only)."),
|
commandData("delstaffflag", removePlayerStaffFlagCommand, "<player name/id> <flag name>", getStaffFlagValue("ManageAdmins"), true, true, "Takes a player's staff flag by name (this server only)."),
|
||||||
commandData("getstaffflags", getStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all staff flags a player has (this server only)."),
|
commandData("getstaffflags", getPlayerStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all staff flags a player has (this server only)."),
|
||||||
commandData("clearstaffflags", clearStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Removes all staff flags for a player (this server only)."),
|
commandData("clearstaffflags", removePlayerStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Removes all staff flags for a player (this server only)."),
|
||||||
commandData("staffflags", allStaffFlagsCommand, "", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all valid staff flag names."),
|
commandData("staffflags", getStaffFlagsCommand, "", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all valid staff flag names."),
|
||||||
commandData("givemoney", givePlayerMoneyCommand, "<player name/id> <amount>", getStaffFlagValue("serverManager"), true, true),
|
commandData("givemoney", givePlayerMoneyCommand, "<player name/id> <amount>", getStaffFlagValue("serverManager"), true, true),
|
||||||
commandData("nonrpname", forceCharacterNameChangeCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Forces a player to change their current character's name."),
|
commandData("nonrpname", forceCharacterNameChangeCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Forces a player to change their current character's name."),
|
||||||
commandData("setname", forceCharacterNameCommand, "<player name/id> <first name> <last name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's name directly."),
|
commandData("setname", setCharacterNameCommand, "<player name/id> <first name> <last name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's name directly."),
|
||||||
commandData("setskin", forcePlayerSkinCommand, "<player name/id> <skin id/name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's skin."),
|
commandData("setskin", setPlayerSkinCommand, "<player name/id> <skin id/name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's skin."),
|
||||||
commandData("setaccent", forcePlayerAccentCommand, "<player name/id> <accent name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's accent."),
|
commandData("setaccent", setPlayerAccentCommand, "<player name/id> <accent name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's accent."),
|
||||||
commandData("setfightstyle", forceFightStyleCommand, "<player name/id> <fight style name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's fight style."),
|
//commandData("setfightstyle", setPlayerFightStyleCommand, "<player name/id> <fight style name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's fight style."),
|
||||||
commandData("setstars", forcePlayerWantedLevelCommand, "<player name/id> <wanted level>", getStaffFlagValue("BasicModeration"), true, true, "Forces a player to have a wanted level"),
|
commandData("setstars", setPlayerWantedLevelCommand, "<player name/id> <wanted level>", getStaffFlagValue("BasicModeration"), true, true, "Forces a player to have a wanted level"),
|
||||||
commandData("plrinfo", getPlayerInfoCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows basic info about the specified player"),
|
commandData("plrinfo", getPlayerInfoCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows basic info about the specified player"),
|
||||||
commandData("getplrhouse", getAllHousesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all houses owned by the player"),
|
commandData("getplrhouse", getHousesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all houses owned by the player"),
|
||||||
commandData("getplrbiz", getAllBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
|
commandData("getplrbiz", getBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
|
||||||
commandData("getplrveh", getAllVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
|
commandData("getplrveh", getVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
|
||||||
commandData("geoip", getPlayerGeoIPInformationCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Retrieves GeoIP information on a player (country & city)"),
|
commandData("geoip", getPlayerGeoIPInformationCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Retrieves GeoIP information on a player (country & city)"),
|
||||||
commandData("ip", getPlayerIPInformationCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Retrieves IP information on a player"),
|
commandData("ip", getPlayerIPInformationCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Retrieves IP information on a player"),
|
||||||
commandData("plrsync", toggleSyncForElementsSpawnedByPlayer, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Sets whether elements spawned by a player are synced (traffic, peds, etc)"),
|
commandData("plrsync", toggleSyncForElementsSpawnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Sets whether elements spawned by a player are synced (traffic, peds, etc)"),
|
||||||
commandData("health", setPlayerHealthCommand, "<player name/id> <health", getStaffFlagValue("BasicModeration"), true, true, "Sets a player's health"),
|
commandData("health", setPlayerHealthCommand, "<player name/id> <health", getStaffFlagValue("BasicModeration"), true, true, "Sets a player's health"),
|
||||||
commandData("armour", setPlayerArmourCommand, "<player name/id> <armour>", getStaffFlagValue("BasicModeration"), true, true, "Sets a player's armour"),
|
commandData("armour", setPlayerArmourCommand, "<player name/id> <armour>", getStaffFlagValue("BasicModeration"), true, true, "Sets a player's armour"),
|
||||||
commandData("infiniterun", setPlayerInfiniteRunCommand, "<player name/id> <state>", getStaffFlagValue("BasicModeration"), true, true, "Toggles a player's infinite sprint"),
|
commandData("infiniterun", setPlayerInfiniteRunCommand, "<player name/id> <state>", getStaffFlagValue("BasicModeration"), true, true, "Toggles a player's infinite sprint"),
|
||||||
@@ -512,10 +512,20 @@ function loadCommands() {
|
|||||||
commandData("vehrespawn", respawnVehicleCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns your current vehicle"),
|
commandData("vehrespawn", respawnVehicleCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns your current vehicle"),
|
||||||
commandData("vehreloadall", reloadAllVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Deletes and reloads all vehicles from database"),
|
commandData("vehreloadall", reloadAllVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Deletes and reloads all vehicles from database"),
|
||||||
|
|
||||||
|
commandData("carrespawnall", respawnAllVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns all vehicles (also respawns all traffic vehicles)"),
|
||||||
|
commandData("carrespawnempty", respawnEmptyVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns all empty/unoccupied vehicles"),
|
||||||
|
commandData("carrespawnjob", respawnJobVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns all job vehicles"),
|
||||||
|
commandData("carrespawnplr", respawnPlayerVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns all player-owned vehicles"),
|
||||||
|
commandData("carrespawnclan", respawnClanVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns all clan-owned vehicles"),
|
||||||
|
commandData("carrespawnpublic", respawnPublicVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns all public vehicles"),
|
||||||
|
commandData("carrespawnbiz", respawnBusinessVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns all business-owned vehicles"),
|
||||||
|
commandData("carrespawn", respawnVehicleCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Respawns your current vehicle"),
|
||||||
|
commandData("carreloadall", reloadAllVehiclesCommand, "", getStaffFlagValue("ManageVehicles"), true, true, "Deletes and reloads all vehicles from database"),
|
||||||
|
|
||||||
commandData("vehrent", rentVehicleCommand, "", getStaffFlagValue("None"), true, true, "Starts renting your current vehicle (if rentable)"),
|
commandData("vehrent", rentVehicleCommand, "", getStaffFlagValue("None"), true, true, "Starts renting your current vehicle (if rentable)"),
|
||||||
commandData("vehrentprice", setVehicleRentPriceCommand, "", getStaffFlagValue("None"), true, true, "Sets your vehicle's rent price"),
|
commandData("vehrentprice", setVehicleRentPriceCommand, "", getStaffFlagValue("None"), true, true, "Sets your vehicle's rent price"),
|
||||||
commandData("vehbuyprice", setVehicleBuyPriceCommand, "", getStaffFlagValue("None"), true, true, "Sets your vehicle's rent price"),
|
commandData("vehbuyprice", setVehicleBuyPriceCommand, "", getStaffFlagValue("None"), true, true, "Sets your vehicle's rent price"),
|
||||||
commandData("stoprent", stopRentingVehicleCommand, "", getStaffFlagValue("None"), true, true, "Stops renting your vehicle"),
|
commandData("vehstoprent", stopRentingVehicleCommand, "", getStaffFlagValue("None"), true, true, "Stops renting your vehicle"),
|
||||||
commandData("vehbuy", buyVehicleCommand, "", getStaffFlagValue("None"), true, true, "Purchases your vehicle"),
|
commandData("vehbuy", buyVehicleCommand, "", getStaffFlagValue("None"), true, true, "Purchases your vehicle"),
|
||||||
commandData("vehcolour", vehicleAdminColourCommand, "<colour1> <colour2>", getStaffFlagValue("None"), true, true, "Sets a vehicle's colour"),
|
commandData("vehcolour", vehicleAdminColourCommand, "<colour1> <colour2>", getStaffFlagValue("None"), true, true, "Sets a vehicle's colour"),
|
||||||
commandData("vehlivery", vehicleAdminLiveryCommand, "<livery id>", getStaffFlagValue("None"), true, true, "Sets your vehicle's livery/paintjob"),
|
commandData("vehlivery", vehicleAdminLiveryCommand, "<livery id>", getStaffFlagValue("None"), true, true, "Sets your vehicle's livery/paintjob"),
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ function setTimeCommand(command, params, client) {
|
|||||||
|
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} set the time to ${makeReadableTime(hour, minute)}`);
|
announceAdminAction("ServerTimeSet", getPlayerName(client), makeReadableTime(hour, minute));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,7 +328,7 @@ function setMinuteDurationCommand(command, params, client) {
|
|||||||
|
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} set the minute duration to ${minuteDuration}ms`);
|
announceAdminAction("ServerMinuteDurationSet", getPlayerName(client), makeReadableTime(hour, minute));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@ function setWeatherCommand(command, params, client) {
|
|||||||
|
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} set the weather to {ALTCOLOUR}${getGameConfig().weatherNames[getServerGame()][toInteger(weatherId)]}`);
|
announceAdminAction("ServerTimeSet", getPlayerName(client), getGameConfig().weatherNames[getServerGame()][toInteger(weatherId)]);
|
||||||
updateServerRules();
|
updateServerRules();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -394,7 +394,7 @@ function setSnowingCommand(command, params, client) {
|
|||||||
|
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned falling snow ${getBoolRedGreenInlineColour(falling)}${getOnOffFromBool(falling)} {MAINCOLOUR}and ground snow ${getBoolRedGreenInlineColour(ground)}${getOnOffFromBool(ground)}`);
|
announceAdminAction("ServerSnowSet", getPlayerName(client), `${getBoolRedGreenInlineColour(falling)}${getOnOffFromBool(falling)}`, `${getBoolRedGreenInlineColour(ground)}${getOnOffFromBool(ground)}`);
|
||||||
updateServerRules();
|
updateServerRules();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -430,7 +430,7 @@ function setServerGUIColoursCommand(command, params, client) {
|
|||||||
|
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
//messageAdminAction(`${getPlayerName(client)} ${getInlineChatColourByName("orange")}set the server ${getBoolRedGreenInlineColour(fallingSnow)}${getOnOffFromBool(fallingSnow)} ${getInlineChatColourByName("orange")}and ground snow ${getBoolRedGreenInlineColour(groundSnow)}${getOnOffFromBool(groundSnow)}`);
|
//announceAdminAction(`${getPlayerName(client)} ${getInlineChatColourByName("orange")}set the server ${getBoolRedGreenInlineColour(fallingSnow)}${getOnOffFromBool(fallingSnow)} ${getInlineChatColourByName("orange")}and ground snow ${getBoolRedGreenInlineColour(groundSnow)}${getOnOffFromBool(groundSnow)}`);
|
||||||
//updateServerRules();
|
//updateServerRules();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -452,7 +452,7 @@ function toggleServerLogoCommand(command, params, client) {
|
|||||||
|
|
||||||
updatePlayerShowLogoState(null, getServerConfig().useLogo);
|
updatePlayerShowLogoState(null, getServerConfig().useLogo);
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned the server logo image ${getBoolRedGreenInlineColour(doesServerHaveServerLogoEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned the server logo image ${getBoolRedGreenInlineColour(doesServerHaveServerLogoEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`);
|
||||||
updateServerRules();
|
updateServerRules();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -472,7 +472,7 @@ function toggleServerLogoCommand(command, params, client) {
|
|||||||
getServerConfig().createJobBlips = !getServerConfig().createJobBlips;
|
getServerConfig().createJobBlips = !getServerConfig().createJobBlips;
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveJobBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createJobBlips))} {MAINCOLOUR}all job blips`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveJobBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createJobBlips))} {MAINCOLOUR}all job blips`);
|
||||||
resetAllJobBlips();
|
resetAllJobBlips();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -492,7 +492,7 @@ function toggleServerLogoCommand(command, params, client) {
|
|||||||
getServerConfig().createJobPickups = !getServerConfig().createJobPickups;
|
getServerConfig().createJobPickups = !getServerConfig().createJobPickups;
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveJobPickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createJobPickups))} {MAINCOLOUR}all job pickups`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveJobPickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createJobPickups))} {MAINCOLOUR}all job pickups`);
|
||||||
resetAllJobPickups();
|
resetAllJobPickups();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -512,7 +512,7 @@ function toggleServerLogoCommand(command, params, client) {
|
|||||||
getServerConfig().createBusinessBlips = !getServerConfig().createBusinessBlips;
|
getServerConfig().createBusinessBlips = !getServerConfig().createBusinessBlips;
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveBusinessBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessBlips))} {MAINCOLOUR}all business blips`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveBusinessBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessBlips))} {MAINCOLOUR}all business blips`);
|
||||||
resetAllBusinessBlips();
|
resetAllBusinessBlips();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -532,7 +532,7 @@ function toggleServerLogoCommand(command, params, client) {
|
|||||||
getServerConfig().createBusinessPickups = !getServerConfig().createBusinessPickups;
|
getServerConfig().createBusinessPickups = !getServerConfig().createBusinessPickups;
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveBusinessPickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessPickups))} {MAINCOLOUR}all business pickups`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveBusinessPickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessPickups))} {MAINCOLOUR}all business pickups`);
|
||||||
resetAllBusinessPickups();
|
resetAllBusinessPickups();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -552,7 +552,7 @@ function toggleServerLogoCommand(command, params, client) {
|
|||||||
getServerConfig().createHouseBlips = !getServerConfig().createHouseBlips;
|
getServerConfig().createHouseBlips = !getServerConfig().createHouseBlips;
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveHouseBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createHouseBlips))} {MAINCOLOUR}all house blips`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveHouseBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createHouseBlips))} {MAINCOLOUR}all house blips`);
|
||||||
resetAllHouseBlips();
|
resetAllHouseBlips();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -572,7 +572,7 @@ function toggleServerLogoCommand(command, params, client) {
|
|||||||
getServerConfig().createHousePickups = !getServerConfig().createHousePickups;
|
getServerConfig().createHousePickups = !getServerConfig().createHousePickups;
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveHousePickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createHousePickups))} {MAINCOLOUR}all house pickups`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveHousePickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createHousePickups))} {MAINCOLOUR}all house pickups`);
|
||||||
resetAllHousePickups();
|
resetAllHousePickups();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -593,7 +593,7 @@ function toggleServerGUICommand(command, params, client) {
|
|||||||
|
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned GUI ${toLowerCase(getOnOffFromBool(doesServerHaveGUIEnabled()))} for this server`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned GUI ${toLowerCase(getOnOffFromBool(doesServerHaveGUIEnabled()))} for this server`);
|
||||||
updateServerRules();
|
updateServerRules();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,7 @@ function toggleServerUseRealWorldTimeCommand(command, params, client) {
|
|||||||
|
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned real-world time ${getServerConfig().useRealTime} for this server (GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)})`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned real-world time ${getServerConfig().useRealTime} for this server (GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)})`);
|
||||||
updateServerGameTime();
|
updateServerGameTime();
|
||||||
updateServerRules();
|
updateServerRules();
|
||||||
return true;
|
return true;
|
||||||
@@ -640,7 +640,7 @@ function setServerRealWorldTimeZoneCommand(command, params, client) {
|
|||||||
getServerConfig().realTimeZone = toInteger(params);
|
getServerConfig().realTimeZone = toInteger(params);
|
||||||
getServerConfig().needsSaved = true;
|
getServerConfig().needsSaved = true;
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}set the time zone for in-game's real-world time to GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)}`);
|
announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}set the time zone for in-game's real-world time to GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)}`);
|
||||||
updateServerGameTime();
|
updateServerGameTime();
|
||||||
updateServerRules();
|
updateServerRules();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ function addLogLevelCommand(command, params, client) {
|
|||||||
|
|
||||||
sendPlayerLogLevel(null, logLevel);
|
sendPlayerLogLevel(null, logLevel);
|
||||||
|
|
||||||
messageAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}enabled log level {ALTCOLOUR}${toLowerCase(params)}`);
|
announceAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}enabled log level {ALTCOLOUR}${toLowerCase(params)}`);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -222,7 +222,7 @@ function removeLogLevelCommand(command, params, client) {
|
|||||||
|
|
||||||
sendPlayerLogLevel(null, logLevel);
|
sendPlayerLogLevel(null, logLevel);
|
||||||
|
|
||||||
messageAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}disabled log level {ALTCOLOUR}${toLowerCase(params)}`);
|
announceAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}disabled log level {ALTCOLOUR}${toLowerCase(params)}`);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -380,7 +380,7 @@ function setPlayerTesterStatusCommand(command, params, client) {
|
|||||||
|
|
||||||
let enabled = hasBitFlag(getPlayerData(targetClient).accountData.flags.moderation, getModerationFlagValue("IsTester"));
|
let enabled = hasBitFlag(getPlayerData(targetClient).accountData.flags.moderation, getModerationFlagValue("IsTester"));
|
||||||
|
|
||||||
messageAdminAction(`{ALTCOLOUR}${client.name} ${getBoolRedGreenInlineColour(enabled)}${toUpperCase(getEnabledDisabledFromBool(enabled))} {ALTCOLOUR}${targetClient.name}'s {MAINCOLOUR}tester status`)
|
announceAdminAction(`{ALTCOLOUR}${client.name} ${getBoolRedGreenInlineColour(enabled)}${toUpperCase(getEnabledDisabledFromBool(enabled))} {ALTCOLOUR}${targetClient.name}'s {MAINCOLOUR}tester status`)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ function setPayDayBonusMultiplier(command, params, client) {
|
|||||||
|
|
||||||
getGlobalConfig().economy.grossIncomeMultiplier = newMultiplier;
|
getGlobalConfig().economy.grossIncomeMultiplier = newMultiplier;
|
||||||
|
|
||||||
messageAdminAction(`${client.name} set payday bonus to ${newMultiplier*100}%`);
|
announceAdminAction(`${client.name} set payday bonus to ${newMultiplier*100}%`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ function setHouseOwnerCommand(command, params, client) {
|
|||||||
|
|
||||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
|
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
|
||||||
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
||||||
messagePlayerError(client, "You don't own this house!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@ function setHouseClanCommand(command, params, client) {
|
|||||||
|
|
||||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
|
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
|
||||||
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
||||||
messagePlayerError(client, "You don't own this house!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -305,7 +305,7 @@ function setHouseClanCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageHouses"))) {
|
if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageHouses"))) {
|
||||||
messagePlayerError(client, "You can't set clan house ranks!");
|
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ function moveHouseEntranceCommand(command, params, client) {
|
|||||||
let houseId = getPlayerHouse(client);
|
let houseId = getPlayerHouse(client);
|
||||||
|
|
||||||
if(!getHouseData(houseId)) {
|
if(!getHouseData(houseId)) {
|
||||||
messagePlayer(client, "You need to be near or inside a house!");
|
messagePlayer(client, getLocaleString(client, "InvalidHouse"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -532,7 +532,7 @@ function moveHouseExitCommand(command, params, client) {
|
|||||||
let houseId = getPlayerHouse(client);
|
let houseId = getPlayerHouse(client);
|
||||||
|
|
||||||
if(!getHouseData(houseId)) {
|
if(!getHouseData(houseId)) {
|
||||||
messagePlayer(client, "You need to be near or inside a house!");
|
messagePlayer(client, getLocaleString(client, "InvalidHouse"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -994,6 +994,15 @@ function getHouseOwnerTypeText(ownerType) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getHouseInfoCommand(command, params, client) {
|
function getHouseInfoCommand(command, params, client) {
|
||||||
let houseId = getPlayerHouse(client);
|
let houseId = getPlayerHouse(client);
|
||||||
|
|
||||||
@@ -1035,6 +1044,15 @@ function getHouseInfoCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setHouseBuyPriceCommand(command, params, client) {
|
function setHouseBuyPriceCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1063,6 +1081,15 @@ function setHouseBuyPriceCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setHouseRentPriceCommand(command, params, client) {
|
function setHouseRentPriceCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1091,6 +1118,15 @@ function setHouseRentPriceCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function buyHouseCommand(command, params, client) {
|
function buyHouseCommand(command, params, client) {
|
||||||
let houseId = getPlayerHouse(client);
|
let houseId = getPlayerHouse(client);
|
||||||
|
|
||||||
@@ -1200,6 +1236,15 @@ function deleteHouseExitBlip(houseId) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function reloadAllHousesCommand(command, params, client) {
|
function reloadAllHousesCommand(command, params, client) {
|
||||||
let clients = getClients();
|
let clients = getClients();
|
||||||
for(let i in clients) {
|
for(let i in clients) {
|
||||||
@@ -1220,7 +1265,7 @@ function reloadAllHousesCommand(command, params, client) {
|
|||||||
createAllHousePickups();
|
createAllHousePickups();
|
||||||
createAllHouseBlips();
|
createAllHouseBlips();
|
||||||
|
|
||||||
messageAdminAction(`All houses have been reloaded by an admin!`);
|
announceAdminAction(`All houses have been reloaded by an admin!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -132,6 +132,15 @@ function deleteGroundItemObject(itemId) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function createGroundItemCommand(command, params, client) {
|
function createGroundItemCommand(command, params, client) {
|
||||||
let splitParams = params.split(" ");
|
let splitParams = params.split(" ");
|
||||||
let itemType = getItemTypeFromParams(splitParams.slice(0, -1).join(" "));
|
let itemType = getItemTypeFromParams(splitParams.slice(0, -1).join(" "));
|
||||||
@@ -154,6 +163,15 @@ function createGroundItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function createItemCommand(command, params, client) {
|
function createItemCommand(command, params, client) {
|
||||||
let splitParams = params.split(" ");
|
let splitParams = params.split(" ");
|
||||||
let itemType = getItemTypeFromParams(splitParams.slice(0, -1).join(" "));
|
let itemType = getItemTypeFromParams(splitParams.slice(0, -1).join(" "));
|
||||||
@@ -176,6 +194,15 @@ function createItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function useItemCommand(command, params, client) {
|
function useItemCommand(command, params, client) {
|
||||||
clearPlayerItemActionState(client);
|
clearPlayerItemActionState(client);
|
||||||
|
|
||||||
@@ -230,6 +257,15 @@ function useItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function deleteGroundItemCommand(command, params, client) {
|
function deleteGroundItemCommand(command, params, client) {
|
||||||
let itemId = getClosestItemOnGround(getPlayerPosition(client));
|
let itemId = getClosestItemOnGround(getPlayerPosition(client));
|
||||||
|
|
||||||
@@ -252,6 +288,15 @@ function deleteGroundItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function pickupItemCommand(command, params, client) {
|
function pickupItemCommand(command, params, client) {
|
||||||
clearPlayerItemActionState(client);
|
clearPlayerItemActionState(client);
|
||||||
|
|
||||||
@@ -303,6 +348,15 @@ function pickupItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function dropItemCommand(command, params, client) {
|
function dropItemCommand(command, params, client) {
|
||||||
clearPlayerItemActionState(client);
|
clearPlayerItemActionState(client);
|
||||||
|
|
||||||
@@ -364,6 +418,15 @@ function dropItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function putItemCommand(command, params, client) {
|
function putItemCommand(command, params, client) {
|
||||||
clearPlayerItemActionState(client);
|
clearPlayerItemActionState(client);
|
||||||
|
|
||||||
@@ -411,6 +474,15 @@ function putItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function takeItemCommand(command, params, client) {
|
function takeItemCommand(command, params, client) {
|
||||||
clearPlayerItemActionState(client);
|
clearPlayerItemActionState(client);
|
||||||
|
|
||||||
@@ -458,6 +530,15 @@ function takeItemCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function createItemTypeCommand(command, params, client) {
|
function createItemTypeCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -470,6 +551,15 @@ function createItemTypeCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setItemTypeDropModelCommand(command, params, client) {
|
function setItemTypeDropModelCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -490,6 +580,15 @@ function setItemTypeDropModelCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setItemTypeOrderPriceCommand(command, params, client) {
|
function setItemTypeOrderPriceCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -510,6 +609,15 @@ function setItemTypeOrderPriceCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setItemTypeRiskMultiplierCommand(command, params, client) {
|
function setItemTypeRiskMultiplierCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -530,6 +638,15 @@ function setItemTypeRiskMultiplierCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function toggleItemTypeEnabledCommand(command, params, client) {
|
function toggleItemTypeEnabledCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -549,6 +666,15 @@ function toggleItemTypeEnabledCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setItemTypeUseTypeCommand(command, params, client) {
|
function setItemTypeUseTypeCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -569,6 +695,15 @@ function setItemTypeUseTypeCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setItemTypeUseValueCommand(command, params, client) {
|
function setItemTypeUseValueCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1105,6 +1240,15 @@ function playerSwitchItem(client, newHotBarSlot) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function playerSwitchHotBarSlotCommand(command, params, client) {
|
function playerSwitchHotBarSlotCommand(command, params, client) {
|
||||||
clearPlayerItemActionState(client);
|
clearPlayerItemActionState(client);
|
||||||
|
|
||||||
@@ -1394,12 +1538,30 @@ function getBestItemToTake(client, slot) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function listPlayerInventoryCommand(command, params, client) {
|
function listPlayerInventoryCommand(command, params, client) {
|
||||||
showPlayerInventoryToPlayer(client, client);
|
showPlayerInventoryToPlayer(client, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function listBusinessStorageInventoryCommand(command, params, client) {
|
function listBusinessStorageInventoryCommand(command, params, client) {
|
||||||
let businessId = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
let businessId = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
||||||
|
|
||||||
@@ -1418,6 +1580,15 @@ function listBusinessStorageInventoryCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function listBusinessFloorInventoryCommand(command, params, client) {
|
function listBusinessFloorInventoryCommand(command, params, client) {
|
||||||
let businessId = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
let businessId = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
||||||
|
|
||||||
@@ -1436,6 +1607,15 @@ function listBusinessFloorInventoryCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function listHouseInventoryCommand(command, params, client) {
|
function listHouseInventoryCommand(command, params, client) {
|
||||||
let houseId = (isPlayerInAnyHouse(client)) ? getPlayerHouse(client) : getClosestHouseEntrance(getPlayerPosition(client));
|
let houseId = (isPlayerInAnyHouse(client)) ? getPlayerHouse(client) : getClosestHouseEntrance(getPlayerPosition(client));
|
||||||
|
|
||||||
@@ -1454,6 +1634,15 @@ function listHouseInventoryCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function listItemInventoryCommand(command, params, client) {
|
function listItemInventoryCommand(command, params, client) {
|
||||||
let itemId = getClosestItemOnGround(getPlayerPosition(client));
|
let itemId = getClosestItemOnGround(getPlayerPosition(client));
|
||||||
|
|
||||||
@@ -1797,6 +1986,15 @@ function getPlayerFirstItemSlotByUseType(client, useType) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function toggleItemEnabledCommand(command, params, client) {
|
function toggleItemEnabledCommand(command, params, client) {
|
||||||
if(!getPlayerActiveItem(client)) {
|
if(!getPlayerActiveItem(client)) {
|
||||||
messagePlayerError(client, `You aren't holding anything!`);
|
messagePlayerError(client, `You aren't holding anything!`);
|
||||||
@@ -1814,6 +2012,15 @@ function toggleItemEnabledCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function deleteItemInPlayerInventoryCommand(command, params, client) {
|
function deleteItemInPlayerInventoryCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1855,6 +2062,15 @@ function deleteItemInPlayerInventoryCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function deleteAllItemsInPlayerInventoryCommand(command, params, client) {
|
function deleteAllItemsInPlayerInventoryCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
|
|||||||
@@ -942,7 +942,7 @@ function reloadAllJobsCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`All server jobs have been reloaded by an admin!`);
|
announceAdminAction(`All server jobs have been reloaded by an admin!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function initMessagingScript() {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function messageAdminAction(messageText) {
|
function announceAdminAction(messageText) {
|
||||||
messagePlayerNormal(null, `⚠️ ${messageText}`, getColourByName("orange"));
|
messagePlayerNormal(null, `⚠️ ${messageText}`, getColourByName("orange"));
|
||||||
if(getServerConfig().discordEnabled) {
|
if(getServerConfig().discordEnabled) {
|
||||||
messageDiscord(`:warning: ${messageText}`);
|
messageDiscord(`:warning: ${messageText}`);
|
||||||
|
|||||||
@@ -1032,3 +1032,10 @@ function givePlayerWeapon(client, weaponId, ammo, active = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
function setPlayerWantedLevel(client, wantedLevel) {
|
||||||
|
sendNetworkEventToPlayer("vrr.wantedLevel", client, wantedLevel);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
@@ -41,6 +41,15 @@ function loadRadioStationsFromDatabase() {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function playStreamingRadioCommand(command, params, client) {
|
function playStreamingRadioCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -145,6 +154,15 @@ function playStreamingRadioCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setStreamingRadioVolumeCommand(command, params, client) {
|
function setStreamingRadioVolumeCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -185,6 +203,15 @@ function getPlayerStreamingRadioVolume(client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function showRadioStationListCommand(command, params, client) {
|
function showRadioStationListCommand(command, params, client) {
|
||||||
let stationList = getServerData().radioStations.map(function(x) { return `{ALTCOLOUR}${toInteger(x.index)+1}: {MAINCOLOUR}${x.name}`; });
|
let stationList = getServerData().radioStations.map(function(x) { return `{ALTCOLOUR}${toInteger(x.index)+1}: {MAINCOLOUR}${x.name}`; });
|
||||||
|
|
||||||
@@ -213,13 +240,22 @@ function getRadioStationData(radioStationId) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function reloadAllRadioStationsCommand(command, params, client) {
|
function reloadAllRadioStationsCommand(command, params, client) {
|
||||||
stopRadioStreamForPlayer(null);
|
stopRadioStreamForPlayer(null);
|
||||||
clearArray(getServerData().radioStations);
|
clearArray(getServerData().radioStations);
|
||||||
getServerData().radioStations = loadRadioStationsFromDatabase();
|
getServerData().radioStations = loadRadioStationsFromDatabase();
|
||||||
setRadioStationIndexes();
|
setRadioStationIndexes();
|
||||||
|
|
||||||
messageAdminAction(`All radio stations have been reloaded by an admin!`);
|
announceAdminAction(`All radio stations have been reloaded by an admin!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -14,6 +14,15 @@ function initStaffScript() {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function kickClientCommand(command, params, client) {
|
function kickClientCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -34,12 +43,21 @@ function kickClientCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`${getPlayerName(targetClient)} has been kicked from the server.`);
|
announceAdminAction(`${getPlayerName(targetClient)} has been kicked from the server.`);
|
||||||
targetClient.disconnect();
|
targetClient.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setStaffTitleCommand(command, params, client) {
|
function setStaffTitleCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -71,6 +89,15 @@ function setStaffTitleCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function muteClientCommand(command, params, client) {
|
function muteClientCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -97,8 +124,16 @@ function muteClientCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function unMuteClientCommand(command, params, client) {
|
function unMuteClientCommand(command, params, client) {
|
||||||
|
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -124,6 +159,15 @@ function unMuteClientCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function freezeClientCommand(command, params, client) {
|
function freezeClientCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -151,6 +195,15 @@ function freezeClientCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function unFreezeClientCommand(command, params, client) {
|
function unFreezeClientCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -178,6 +231,15 @@ function unFreezeClientCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoPlayerCommand(command, params, client) {
|
function gotoPlayerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -210,6 +272,15 @@ function gotoPlayerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getPlayerGeoIPInformationCommand(command, params, client) {
|
function getPlayerGeoIPInformationCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -231,6 +302,15 @@ function getPlayerGeoIPInformationCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getPlayerIPInformationCommand(command, params, client) {
|
function getPlayerIPInformationCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -248,6 +328,15 @@ function getPlayerIPInformationCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoVehicleCommand(command, params, client) {
|
function gotoVehicleCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -278,6 +367,15 @@ function gotoVehicleCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getVehicleCommand(command, params, client) {
|
function getVehicleCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -299,6 +397,15 @@ function getVehicleCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function warpIntoVehicleCommand(command, params, client) {
|
function warpIntoVehicleCommand(command, params, client) {
|
||||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||||
|
|
||||||
@@ -329,6 +436,15 @@ function warpIntoVehicleCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoBusinessCommand(command, params, client) {
|
function gotoBusinessCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -360,6 +476,15 @@ function gotoBusinessCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoGameLocationCommand(command, params, client) {
|
function gotoGameLocationCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -391,6 +516,15 @@ function gotoGameLocationCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoHouseCommand(command, params, client) {
|
function gotoHouseCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -422,6 +556,15 @@ function gotoHouseCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoJobLocationCommand(command, params, client) {
|
function gotoJobLocationCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -453,6 +596,15 @@ function gotoJobLocationCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoNewPlayerSpawnCommand(command, params, client) {
|
function gotoNewPlayerSpawnCommand(command, params, client) {
|
||||||
client.player.velocity = toVector3(0.0, 0.0, 0.0);
|
client.player.velocity = toVector3(0.0, 0.0, 0.0);
|
||||||
setPlayerPosition(client, getServerConfig().newCharacter.spawnPosition);
|
setPlayerPosition(client, getServerConfig().newCharacter.spawnPosition);
|
||||||
@@ -465,6 +617,15 @@ function gotoNewPlayerSpawnCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function gotoPositionCommand(command, params, client) {
|
function gotoPositionCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -489,6 +650,15 @@ function gotoPositionCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function teleportForwardCommand(command, params, client) {
|
function teleportForwardCommand(command, params, client) {
|
||||||
let distance = 1.0;
|
let distance = 1.0;
|
||||||
if(!areParamsEmpty(params)) {
|
if(!areParamsEmpty(params)) {
|
||||||
@@ -504,6 +674,15 @@ function teleportForwardCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function teleportBackwardCommand(command, params, client) {
|
function teleportBackwardCommand(command, params, client) {
|
||||||
let distance = 1.0;
|
let distance = 1.0;
|
||||||
if(!areParamsEmpty(params)) {
|
if(!areParamsEmpty(params)) {
|
||||||
@@ -519,6 +698,15 @@ function teleportBackwardCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function teleportLeftCommand(command, params, client) {
|
function teleportLeftCommand(command, params, client) {
|
||||||
let distance = 1.0;
|
let distance = 1.0;
|
||||||
if(!areParamsEmpty(params)) {
|
if(!areParamsEmpty(params)) {
|
||||||
@@ -534,6 +722,15 @@ function teleportLeftCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function teleportUpCommand(command, params, client) {
|
function teleportUpCommand(command, params, client) {
|
||||||
let distance = 1.0;
|
let distance = 1.0;
|
||||||
if(!areParamsEmpty(params)) {
|
if(!areParamsEmpty(params)) {
|
||||||
@@ -549,6 +746,15 @@ function teleportUpCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function teleportDownCommand(command, params, client) {
|
function teleportDownCommand(command, params, client) {
|
||||||
let distance = 1.0;
|
let distance = 1.0;
|
||||||
if(!areParamsEmpty(params)) {
|
if(!areParamsEmpty(params)) {
|
||||||
@@ -579,6 +785,15 @@ function teleportRightCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function playerInteriorCommand(command, params, client) {
|
function playerInteriorCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -603,6 +818,15 @@ function playerInteriorCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function playerVirtualWorldCommand(command, params, client) {
|
function playerVirtualWorldCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -627,6 +851,15 @@ function playerVirtualWorldCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function getPlayerCommand(command, params, client) {
|
function getPlayerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -667,6 +900,15 @@ function getPlayerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function returnPlayerCommand(command, params, client) {
|
function returnPlayerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -705,7 +947,16 @@ function returnPlayerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function addStaffFlagCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function addPlayerStaffFlagCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -738,7 +989,16 @@ function addStaffFlagCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function takeStaffFlagCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function removePlayerStaffFlagCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -771,7 +1031,16 @@ function takeStaffFlagCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function clearStaffFlagsCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function removePlayerStaffFlagsCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -798,7 +1067,16 @@ function clearStaffFlagsCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function getStaffFlagsCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getPlayerStaffFlagsCommand(command, params, client) {
|
||||||
if(getCommand(command).requireLogin) {
|
if(getCommand(command).requireLogin) {
|
||||||
if(!isPlayerLoggedIn(client)) {
|
if(!isPlayerLoggedIn(client)) {
|
||||||
messagePlayerError(client, "You must be logged in to use this command!");
|
messagePlayerError(client, "You must be logged in to use this command!");
|
||||||
@@ -852,7 +1130,16 @@ function getStaffFlagsCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function allStaffFlagsCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getStaffFlagsCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -876,6 +1163,15 @@ function allStaffFlagsCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function givePlayerMoneyCommand(command, params, client) {
|
function givePlayerMoneyCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -899,7 +1195,16 @@ function givePlayerMoneyCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function forcePlayerAccentCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function setPlayerAccentCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -932,6 +1237,15 @@ function forcePlayerAccentCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function forceCharacterNameChangeCommand(command, params, client) {
|
function forceCharacterNameChangeCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -953,7 +1267,16 @@ function forceCharacterNameChangeCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function forceCharacterNameCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function setCharacterNameCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -988,7 +1311,16 @@ function forceCharacterNameCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function forcePlayerSkinCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function setPlayerSkinCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -1021,6 +1353,15 @@ function forcePlayerSkinCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setPlayerHealthCommand(command, params, client) {
|
function setPlayerHealthCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1048,6 +1389,15 @@ function setPlayerHealthCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setPlayerArmourCommand(command, params, client) {
|
function setPlayerArmourCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1069,6 +1419,15 @@ function setPlayerArmourCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function setPlayerInfiniteRunCommand(command, params, client) {
|
function setPlayerInfiniteRunCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1096,7 +1455,16 @@ function setPlayerInfiniteRunCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function forcePlayerWantedLevelCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function setPlayerWantedLevelCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -1110,14 +1478,23 @@ function forcePlayerWantedLevelCommand(command, params, client) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
forcePlayerWantedLevel(targetClient, wantedLevel);
|
setPlayerWantedLevel(targetClient, wantedLevel);
|
||||||
|
|
||||||
//messageAdmins(`${getPlayerName(client)} {MAINCOLOUR}set ${getPlayerName(targetClient)}'s {MAINCOLOUR}skin to {ALTCOLOUR}${getGameConfig().skins[getGame()][skinIndex][1]}`);
|
//messageAdmins(`${getPlayerName(client)} {MAINCOLOUR}set ${getPlayerName(targetClient)}'s {MAINCOLOUR}skin to {ALTCOLOUR}${getGameConfig().skins[getGame()][skinIndex][1]}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function getAllVehiclesOwnedByPlayerCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getVehiclesOwnedByPlayerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -1140,7 +1517,16 @@ function getAllVehiclesOwnedByPlayerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function getAllBusinessesOwnedByPlayerCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getBusinessesOwnedByPlayerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -1163,7 +1549,16 @@ function getAllBusinessesOwnedByPlayerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function getAllHousesOwnedByPlayerCommand(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getHousesOwnedByPlayerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -1186,6 +1581,15 @@ function getAllHousesOwnedByPlayerCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
function forceAccountPasswordResetCommand(command, params, client) {
|
function forceAccountPasswordResetCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
@@ -1202,7 +1606,16 @@ function forceAccountPasswordResetCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function toggleSyncForElementsSpawnedByPlayer(command, params, client) {
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function toggleSyncForElementsSpawnedByPlayerCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
return false;
|
||||||
@@ -1264,3 +1677,51 @@ function isPlayerPoliceBanned(client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a command handler function.
|
||||||
|
*
|
||||||
|
* @param {string} command - The command name used by the player
|
||||||
|
* @param {string} params - The parameters/args string used with the command by the player
|
||||||
|
* @param {Client} client - The client/player that used the command
|
||||||
|
* @return {bool} Whether or not the command was successful
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function forceFightStyleCommand(command, params, client) {
|
||||||
|
if(areParamsEmpty(params)) {
|
||||||
|
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let targetClient = getPlayerFromParams(getParam(params, " ", 1));
|
||||||
|
let fightStyleId = getFightStyleFromParams(getParam(params, " ", 2));
|
||||||
|
|
||||||
|
//if(!targetClient) {
|
||||||
|
// messagePlayerError(client, `Player not found!`);
|
||||||
|
// return false;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if(!getPlayerData(targetClient)) {
|
||||||
|
// messagePlayerError(client, `Player not found!`);
|
||||||
|
// return false;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if(!isPlayerSpawned(targetClient)) {
|
||||||
|
// messagePlayerError(client, `That player isn't spawned`);
|
||||||
|
// return false;
|
||||||
|
//}
|
||||||
|
|
||||||
|
if(!fightStyleId) {
|
||||||
|
messagePlayerError(client, `That fight style doesn't exist!`);
|
||||||
|
messagePlayerError(client, `Fight styles: ${getGameConfig().fightStyles[getServerGame()].map(fs => fs[0]).join(", ")}`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPlayerCurrentSubAccount(client).fightStyle = fightStyleId;
|
||||||
|
setPlayerFightStyle(client, fightStyleId);
|
||||||
|
messagePlayerSuccess(client, `You set ${getCharacterFullName(targetClient)}'s fight style to ${getGameConfig().fightStyles[getServerGame()][fightStyleId][0]}`)
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
@@ -548,45 +548,6 @@ function setFightStyleCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function forceFightStyleCommand(command, params, client) {
|
|
||||||
if(areParamsEmpty(params)) {
|
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
let targetClient = getPlayerFromParams(getParam(params, " ", 1));
|
|
||||||
let fightStyleId = getFightStyleFromParams(getParam(params, " ", 2));
|
|
||||||
|
|
||||||
//if(!targetClient) {
|
|
||||||
// messagePlayerError(client, `Player not found!`);
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if(!getPlayerData(targetClient)) {
|
|
||||||
// messagePlayerError(client, `Player not found!`);
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if(!isPlayerSpawned(targetClient)) {
|
|
||||||
// messagePlayerError(client, `That player isn't spawned`);
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if(!fightStyleId) {
|
|
||||||
messagePlayerError(client, `That fight style doesn't exist!`);
|
|
||||||
messagePlayerError(client, `Fight styles: ${getGameConfig().fightStyles[getServerGame()].map(fs => fs[0]).join(", ")}`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
getPlayerCurrentSubAccount(client).fightStyle = fightStyleId;
|
|
||||||
setPlayerFightStyle(client, fightStyleId);
|
|
||||||
messagePlayerSuccess(client, `You set ${getCharacterFullName(targetClient)}'s fight style to ${getGameConfig().fightStyles[getServerGame()][fightStyleId][0]}`)
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
function createDefaultSubAccountServerData(databaseId, thisServerSkin) {
|
function createDefaultSubAccountServerData(databaseId, thisServerSkin) {
|
||||||
for(let i = 1 ; i <= 5 ; i++) {
|
for(let i = 1 ; i <= 5 ; i++) {
|
||||||
if(i == getServerId()) {
|
if(i == getServerId()) {
|
||||||
|
|||||||
@@ -1073,7 +1073,7 @@ function reloadAllVehiclesCommand(command, params, client) {
|
|||||||
getServerData().vehicles = loadVehiclesFromDatabase();
|
getServerData().vehicles = loadVehiclesFromDatabase();
|
||||||
spawnAllVehicles();
|
spawnAllVehicles();
|
||||||
|
|
||||||
messageAdminAction(`All server vehicles have been reloaded by an admin!`);
|
announceAdminAction(`AllVehiclesReloaded`);
|
||||||
|
|
||||||
getVehicleData(vehicle).needsSaved = true;
|
getVehicleData(vehicle).needsSaved = true;
|
||||||
}
|
}
|
||||||
@@ -1088,7 +1088,7 @@ function respawnVehicleCommand(command, params, client) {
|
|||||||
|
|
||||||
setAllVehicleIndexes();
|
setAllVehicleIndexes();
|
||||||
|
|
||||||
messagePlayerSuccess(client, `Your vehicle has been respawned`);
|
messagePlayerSuccess(client, getLocaleString(client, `YourVehicleRespawned`));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1106,7 +1106,7 @@ function respawnAllVehiclesCommand(command, params, client) {
|
|||||||
|
|
||||||
setAllVehicleIndexes();
|
setAllVehicleIndexes();
|
||||||
|
|
||||||
messageAdminAction(`All vehicles have been respawned by an admin!`);
|
announceAdminAction(`AllVehiclesRespawned`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1125,7 +1125,7 @@ function respawnEmptyVehiclesCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`All empty vehicles have been respawned by an admin!`);
|
announceAdminAction(`EmptyVehiclesRespawned`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1137,7 +1137,7 @@ function respawnJobVehiclesCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`All job vehicles have been respawned by an admin!`);
|
announceAdminAction(`JobVehiclesRespawned`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1149,7 +1149,7 @@ function respawnClanVehiclesCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`All clan vehicles have been respawned by an admin!`);
|
announceAdminAction(`ClanVehiclesRespawned`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1161,7 +1161,7 @@ function respawnPlayerVehiclesCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`All player-owned vehicles have been respawned by an admin!`);
|
announceAdminAction(`PlayerVehiclesRespawned`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1173,7 +1173,7 @@ function respawnPublicVehiclesCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`All public vehicles have been respawned by an admin!`);
|
announceAdminAction(`PublicVehiclesRespawned`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1185,7 +1185,7 @@ function respawnBusinessVehiclesCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageAdminAction(`All business-owned vehicles have been respawned by an admin!`);
|
announceAdminAction(`BusinessVehiclesRespawned`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user