02.04.2014, 09:46
Hey guys, let me provide a bit more information.
I have a command that I want to give a given playerid money, but not by using the GivePlayerMoney(playerid, amount) code. I need the command to add money to the given player's enum I made.
In the end I need something like this.
Thanx in advance.
I have a command that I want to give a given playerid money, but not by using the GivePlayerMoney(playerid, amount) code. I need the command to add money to the given player's enum I made.
In the end I need something like this.
Код:
CMD:givemoney(playerid, params[]) { New PlayerMessage[128], TargetMessage[128], Amount; If(sscanf(params, "ui", PlayerID, Amount)) { SendClientMessage(playerid, COLOR_PURERED, "Usage:/givemoney [playerid\part of name][amount]"); } Else { Load_Info(playerid); If(PlayerInfo[playerid][Wallet] >= Amount)) { \\Needed code goes here but needs to look like the following. PlayerInfo[playerid][Money] -= Amount; PlayerInfo[PlayerID][Money] += Amount; \\etc, etc. Please note that PlayerID is connected to a stock and has the vallue of [MAX_PLAYERS]. I also have messages that send apon transaction but I need the money to be server side. } } }