Bunch of fixes/changes
* Set client log level to info * Added element prop sync util * Added check to make sure veh upgrade was valid * Fixed incorrect acct settings being saved * Added help tip when using invalid anim * Fixed create biz cmd * Allow biz owners to set biz name * Allow biz owners to give biz to player or clan * Added biz clan rank cmd * Allow those with permission to lock/unlock biz & houses * Fix set biz interior * Allow players with permission to withdraw from biz till * Added utils to check if player has biz permissions for till/lock/lights * Added check if players are in same int/vw on talk/shout/whisper * Follow server civilians cvar when toggling ambience * Renamed some clan cmds to prefix with "clan" * Added vehlivery cmd * Set server log level to debug * Show veh owner info on enter * Sync body parts & props on IV * Add clan help in help cmd * Don't show values for melee weapons * Add IV support for some utils * Sync player ped fight style in SA * Added fightstyle cmd * Fix wrong job owner on vehinfo cmd * Return false on world label support util for IV
This commit is contained in:
@@ -375,10 +375,11 @@ function selectCharacter(client, characterId = -1) {
|
||||
if(!isGTAIV()) {
|
||||
spawnPlayer(client, spawnPosition, spawnHeading, skin, spawnInterior, spawnDimension);
|
||||
} else {
|
||||
setPlayerPosition(client, spawnPosition);
|
||||
setPlayerHeading(client, spawnHeading);
|
||||
setPlayerSkin(client, skin);
|
||||
restorePlayerCamera(client);
|
||||
//setPlayerPosition(client, spawnPosition);
|
||||
//setPlayerHeading(client, spawnHeading);
|
||||
//setPlayerSkin(client, skin);
|
||||
//restorePlayerCamera(client);
|
||||
spawnPlayer(client, spawnPosition, spawnHeading, skin, spawnInterior, spawnDimension);
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.SubAccount] Spawned ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`);
|
||||
@@ -544,6 +545,13 @@ function setFightStyleCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerAtGym(client)) {
|
||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("basicModeration"))) {
|
||||
messagePlayerError(client, `You need to be at a gym!`);
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
setPlayerFightStyle(client, fightStyleId);
|
||||
messagePlayerSuccess(client, `Your fight style has been set to ${getGameData().fightStyles[getServerGame()][fightStyleId][0]}`)
|
||||
|
||||
@@ -552,6 +560,53 @@ function setFightStyleCommand(command, params, client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function forceFightStyleCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let splitParams = params.split();
|
||||
let targetClient = getPlayerFromParams(splitParams[0]);
|
||||
let fightStyleId = getFightStyleFromParams(splitParams[1]);
|
||||
|
||||
//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: ${getGameData().fightStyles[getServerGame()].map(fs => fs[0]).join(", ")}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerAtGym(client)) {
|
||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("basicModeration"))) {
|
||||
messagePlayerError(client, `You need to be at a gym!`);
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
getPlayerCurrentSubAccount(client).fightStyle = fightStyleId;
|
||||
setPlayerFightStyle(client, fightStyleId);
|
||||
messagePlayerSuccess(client, `You set ${getCharacterFullName(targetClient)}'s fight style to ${getGameData().fightStyles[getServerGame()][fightStyleId][0]}`)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createDefaultSubAccountServerData(databaseId, thisServerSkin) {
|
||||
for(let i = 1 ; i <= 4 ; i++) {
|
||||
if(i == getServerId()) {
|
||||
|
||||
Reference in New Issue
Block a user