Bunch of changes (see description)
* New script files to organize GUI * Added clientside pickup detection to reduce server load for enter/exit * Added notips command for players to toggle random tips * Select account last IP as part of wildcard (was separate due to old INT) * Save account registration with datetime instead of unix timestamp * Don't force mouse camera on moving anims in SA+ * Add IP ban to server runtime memory in subnet ban command * Add non-roleplay character name account moderation flag * Fix bizowner and bizclan commands * Fix bug that allowed buying items without having the needed cash * Fix set biz blip command * Add dealership help label type command * Added command to show all clan flag types * Added discord config and load from database * Fix angle for directional teleport and anim move directions * Use new colour structure in preparation for locale translations * Add on-foot only item usetype array to prevent using when in veh * Fix wrong const value for exit pickup type * Start using datetime in MySQL tables instead of unix timestamps * Start adding webhooks for discord (unfinished) * Added new discord URL to discord help category * Added house reset pickups/blips utils * Prevent using items when in skin selector * Fix get player command * Fix give player money command * Add coffee shop and vehicle repair shop default biz item templates * Remove old game fixes util (resource now in server config) * Fix bug where characters in clans wouldn't be shown in char select * Slimmed down the amount of timers * Made some potentially large numbers more readable (commas) * Remove colours in message for console output
This commit is contained in:
@@ -379,7 +379,8 @@ function gotoPositionCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let splitParams = params.replace(",", "").split(" ");
|
||||
params = params.replace(",", "");
|
||||
splitParams = params.split(" ");
|
||||
let x = splitParams[0] || getPlayerPosition(client).x;
|
||||
let y = splitParams[1] || getPlayerPosition(client).y;
|
||||
let z = splitParams[2] || getPlayerPosition(client).z;
|
||||
@@ -407,9 +408,10 @@ function teleportForwardCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setPlayerPosition(client, getPosInFrontOfPos(getPlayerPosition(client), getPlayerHeading(client), params));
|
||||
let distance = toFloat(params) || 1;
|
||||
setPlayerPosition(client, getPosInFrontOfPos(getPlayerPosition(client), getPlayerHeading(client), distance));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported forward ${params} meters`);
|
||||
messagePlayerSuccess(client, `You teleported forward ${distance} meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -420,9 +422,10 @@ function teleportBackwardCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setPlayerPosition(client, getPosBehindPos(getPlayerPosition(client), getPlayerHeading(client), params));
|
||||
let distance = toFloat(params) || 1;
|
||||
setPlayerPosition(client, getPosBehindPos(getPlayerPosition(client), getPlayerHeading(client), distance));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported backward ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
messagePlayerSuccess(client, `You teleported backward ${getInlineChatColourByName("lightGrey")}${distance} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -433,9 +436,10 @@ function teleportLeftCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setPlayerPosition(client, getPosToLeftOfPos(getPlayerPosition(client), getPlayerHeading(client), params));
|
||||
let distance = toFloat(params) || 1;
|
||||
setPlayerPosition(client, getPosToLeftOfPos(getPlayerPosition(client), fixAngle(getPlayerHeading(client)), distance));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported left ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
messagePlayerSuccess(client, `You teleported left ${getInlineChatColourByName("lightGrey")}${distance} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -446,9 +450,10 @@ function teleportUpCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setPlayerPosition(client, getPosAbovePos(getPlayerPosition(client), params));
|
||||
let distance = toFloat(params) || 1;
|
||||
setPlayerPosition(client, getPosAbovePos(getPlayerPosition(client), distance));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported up ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
messagePlayerSuccess(client, `You teleported up ${getInlineChatColourByName("lightGrey")}${distance} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -459,9 +464,10 @@ function teleportDownCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setPlayerPosition(client, getPosBelowPos(getPlayerPosition(client), params));
|
||||
let distance = toFloat(params) || 1;
|
||||
setPlayerPosition(client, getPosBelowPos(getPlayerPosition(client), distance));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported down ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
messagePlayerSuccess(client, `You teleported down ${getInlineChatColourByName("lightGrey")}${distance} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -472,9 +478,10 @@ function teleportRightCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setPlayerPosition(client, getPosToRightOfPos(getPlayerPosition(client), getPlayerHeading(client), params));
|
||||
let distance = toFloat(params) || 1;
|
||||
setPlayerPosition(client, getPosToRightOfPos(getPlayerPosition(client), fixAngle(getPlayerHeading(client)), distance));
|
||||
|
||||
messagePlayerSuccess(client, `You teleported right ${getInlineChatColourByName("lightGrey")}${params} ${getInlineChatColourByName("white")}meters`);
|
||||
messagePlayerSuccess(client, `You teleported right ${getInlineChatColourByName("lightGrey")}${distance} ${getInlineChatColourByName("white")}meters`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -549,11 +556,11 @@ function getPlayerCommand(command, params, client) {
|
||||
//getPlayerData(targetClient).returnToInterior = getPlayerInterior(targetClient);
|
||||
|
||||
if(isPlayerInAnyHouse(targetClient)) {
|
||||
getPlayerData(targetClient).returnToHouse = getEntityData(client, "vrr.inHouse");
|
||||
getPlayerData(targetClient).returnToHouse = getPlayerHouse(targetClient);
|
||||
}
|
||||
|
||||
if(isPlayerInAnyBusiness(targetClient)) {
|
||||
getPlayerData(targetClient).returnToBusiness = getEntityData(client, "vrr.inBusiness");
|
||||
getPlayerData(targetClient).returnToBusiness = getPlayerBusiness(targetClient);
|
||||
}
|
||||
|
||||
setPlayerPosition(targetClient, getPosBehindPos(getPlayerPosition(client), getPlayerHeading(client), 2));
|
||||
@@ -561,14 +568,6 @@ function getPlayerCommand(command, params, client) {
|
||||
setPlayerInterior(targetClient, getPlayerInterior(client));
|
||||
setPlayerDimension(targetClient, getPlayerDimension(client));
|
||||
|
||||
if(isPlayerInAnyBusiness(client)) {
|
||||
setEntityData(client, "vrr.inBusiness", getPlayerBusiness(client), true);
|
||||
}
|
||||
|
||||
if(isPlayerInAnyBusiness(client)) {
|
||||
setEntityData(client, "vrr.inHouse", getPlayerBusiness(client), true);
|
||||
}
|
||||
|
||||
messagePlayerSuccess(client, `You teleported ${getInlineChatColourByName("lightGrey")}${getPlayerName(targetClient)} ${getInlineChatColourByName("white")}to you.`);
|
||||
messagePlayerAlert(targetClient, `An admin has teleported you to their location`);
|
||||
}
|
||||
@@ -599,14 +598,6 @@ function returnPlayerCommand(command, params, client) {
|
||||
setPlayerInterior(targetClient, getPlayerData(targetClient).returnToInterior);
|
||||
setPlayerDimension(targetClient, getPlayerData(targetClient).returnToDimension);
|
||||
|
||||
if(getPlayerData(targetClient).returnToHouse != null) {
|
||||
setEntityData(client, "vrr.inHouse", getPlayerData(targetClient).returnToHouse, true);
|
||||
}
|
||||
|
||||
if(getPlayerData(targetClient).returnToBusiness != null) {
|
||||
setEntityData(client, "vrr.inBusiness", getPlayerData(targetClient).returnToBusiness, true);
|
||||
}
|
||||
|
||||
getPlayerData(targetClient).returnToPosition = null;
|
||||
getPlayerData(targetClient).returnToHeading = null;
|
||||
getPlayerData(targetClient).returnToDimension = null;
|
||||
@@ -798,7 +789,7 @@ function givePlayerMoneyCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
givePlayerMoney(client, toInteger(amount));
|
||||
givePlayerCash(client, toInteger(amount));
|
||||
updatePlayerCash(targetClient);
|
||||
messagePlayerSuccess(client, `You gave ${getInlineChatColourByName("lightGrey")}$${amount} ${getInlineChatColourByName("white")}to ${getInlineChatColourByName("lightGrey")}${getCharacterFullName(targetClient)}`);
|
||||
messagePlayerAlert(client, `An admin gave you ${getInlineChatColourByName("lightGrey")}$${amount}`);
|
||||
|
||||
Reference in New Issue
Block a user