Fix non-rp name and force name cmds
This commit is contained in:
@@ -753,8 +753,8 @@ function forceCharacterNameChangeCommand(command, params, client) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
messagePlayerSuccess(client, `You forced ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)} (${getCharacterFullName(targetClient)}) ${getInlineChatColourByName("white")}to change their character's name.`);
|
messagePlayerSuccess(client, `You forced ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(targetClient)} (${getCharacterFullName(targetClient)}) ${getInlineChatColourByName("white")}to change their character's name.`);
|
||||||
showPlayerNewCharacterFailedGUI(client, "Non-RP name! Choose a new one:");
|
showPlayerNewCharacterFailedGUI(targetClient, "Non-RP name! Choose a new one:");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -765,10 +765,10 @@ function forceCharacterNameCommand(command, params, client) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(areThereEnoughParams(params, 3, " ")) {
|
//if(areThereEnoughParams(params, 3, " ")) {
|
||||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
// messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||||
return false;
|
// return false;
|
||||||
}
|
//}
|
||||||
|
|
||||||
let splitParams = params.split(" ");
|
let splitParams = params.split(" ");
|
||||||
let targetClient = getPlayerFromParams(splitParams[0]);
|
let targetClient = getPlayerFromParams(splitParams[0]);
|
||||||
@@ -785,10 +785,10 @@ function forceCharacterNameCommand(command, params, client) {
|
|||||||
let newName = `${firstName} ${lastName}`;
|
let newName = `${firstName} ${lastName}`;
|
||||||
let oldName = getCharacterFullName(targetClient);
|
let oldName = getCharacterFullName(targetClient);
|
||||||
|
|
||||||
getPlayerCurrentSubAccount(client).firstName = firstName;
|
getPlayerCurrentSubAccount(targetClient).firstName = firstName;
|
||||||
getPlayerCurrentSubAccount(client).lastName = lastName;
|
getPlayerCurrentSubAccount(targetClient).lastName = lastName;
|
||||||
|
|
||||||
messagePlayerSuccess(client, `You forced ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(client)}'s ${getInlineChatColourByName("white")}current character name from ${getInlineChatColourByName("lightGrey")}${oldName} ${getInlineChatColourByName("white")}to ${getInlineChatColourByName("lightGrey")}${newName}`);
|
messagePlayerSuccess(client, `You forced ${getInlineChatColourByName("lightGrey")}${targetgetPlayerName(targetClient)}'s ${getInlineChatColourByName("white")}current character name from ${getInlineChatColourByName("lightGrey")}${oldName} ${getInlineChatColourByName("white")}to ${getInlineChatColourByName("lightGrey")}${newName}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user