Fix give cash cmd accidentally giving to admin using it

This commit is contained in:
Vortrex
2022-01-04 15:14:26 -06:00
parent c7a6d26daf
commit 4e13c58f4e

View File

@@ -855,11 +855,11 @@ function givePlayerMoneyCommand(command, params, client) {
return false;
}
givePlayerCash(client, toInteger(amount));
givePlayerCash(targetClient, toInteger(amount));
updatePlayerCash(targetClient);
//messagePlayerSuccess(client, `You gave {ALTCOLOUR}$${amount} {MAINCOLOUR}to {ALTCOLOUR}${getCharacterFullName(targetClient)}`);
messageAdmins(`${client.name} {MAINCOLOUR}gave {ALTCOLOUR}$${amount} {MAINCOLOUR}to {ALTCOLOUR}${getCharacterFullName(targetClient)}`)
messagePlayerAlert(client, `An admin gave you {ALTCOLOUR}$${amount}`);
messagePlayerAlert(targetClient, `An admin gave you {ALTCOLOUR}$${amount}`);
}
// ===========================================================================