24.06.2010, 16:30
Код:
new money[MAX_PLAYERS]; stock GiveMoney(playerid, cast) { if(GetPlayerMoney(playerid)<money[playerid] && GetPlayerMoney(playerid)!=0) { money[playerid]=GetPlayerMoney(playerid); } else if(cast!=0) { money[playerid]+=cast; ResetPlayerMoney(playerid); GivePlayerMoney(playerid, money[playerid]); } else if(GetPlayerMoney(playerid)>money[playerid]) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid, money[playerid]); } return 1; } stock GetMoney(playerid){return money[playerid];} stock ResetMoney(playerid){money[playerid]=0;return 1;}