30.08.2009, 12:53
I try make command givecash with dcmd, the command and all the script in give error, but ingame no see the money, when i write /givecash say "Money send" But when i write /givecash (id) (ammont) say me "Usage: /givecas [playerid/name] [ammount]
can someone help me?
can someone help me?
Код:
dcmd_givecash(playerid, params[]) { new giveplayerid, amount; if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /givecash [playerid/partname] [amount]"); else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000AA, "Insufficient Funds"); else { GivePlayerMoney(giveplayerid, amount); GivePlayerMoney(playerid, 0 - amount); SendClientMessage(playerid, 0x00FF00AA, "Money sent"); SendClientMessage(giveplayerid, 0x00FF00AA, "Money recieved"); } return 1; }