From 4e13c58f4ed8abdbb5066a7e077b493ee20c781e Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Tue, 4 Jan 2022 15:14:26 -0600 Subject: [PATCH] Fix give cash cmd accidentally giving to admin using it --- scripts/server/moderation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/server/moderation.js b/scripts/server/moderation.js index 4ee3b3f8..e6599692 100644 --- a/scripts/server/moderation.js +++ b/scripts/server/moderation.js @@ -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}`); } // ===========================================================================