21.01.2013, 18:11
On "OnPlayerSpawn":
Quote:
GivePlayerMoney(playerid,5000); |
Код:
COMMAND:pay(playerid,params[]) { new id, betrag; if(sscanf(params,"dd",id,betrag)) return NoSuccess(playerid,"Usage /pay id amount"); if(!IsPlayerConnected(id)) return NoSuccess(playerid,"player is not connected!"); if(betrag < 0) return NoSuccess(playerid,"Amount cannot be under 0!"); if(GetPlayerMoney(playerid) < betrag) return NoSuccess(playerid,"dont have so much money!"); GivePlayerMoney(playerid,-betrag); GivePlayerMoney(id,betrag); return 1; }