03.06.2012, 05:08
Hello i have one problem with my command "givemoney" .When i use this command money become 0.
Example : i have 2000 $ but i wanna have 15000$ and use /givemoney ID 15000 .. and my money become 0 .. This is bug. This is Command script
Example : i have 2000 $ but i wanna have 15000$ and use /givemoney ID 15000 .. and my money become 0 .. This is bug. This is Command script
Код:
CMD:givemoney(playerid, params[]) { new id, cash, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128]; if(PlayerInfo[playerid][pAdmin] < 1337) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command"); if(sscanf(params,"ui", id, cash)) return SCM(playerid, COLOR_GREY,"USAGE: /givemoney [playerid/partofname] [ammount]"); if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID"); else { GivePlayerCash(id, cash); GetPlayerName(playerid,sendername,sizeof(sendername)); GetPlayerName(id,name,sizeof(name)); format(string,sizeof(string),"%s has given %s money to %d", sendername, name, cash); ABroadCast(COLOR_YELLOW,string,1); format(string,sizeof(string),"You have recieved %d money from admin %s", cash, sendername); SendClientMessage(id, COLOR_YELLOW, string); } return 1; }