Add JSDoc + use locale strings for admin announce

This commit is contained in:
Vortrex
2022-03-25 02:21:50 -05:00
parent 4f605a8745
commit f877235bf8
15 changed files with 1198 additions and 127 deletions

View File

@@ -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) {
for(let i = 1 ; i <= 5 ; i++) {
if(i == getServerId()) {