Help with /pay command
#2

I'd suggest you to use ZCMD and SSCANF, really faster. Look an example:

PS: I already had this command on my old script

pawn Код:
CMD:setcash(playerid,params[])
{
   new id,value;
   new string[128];
   if(sscanf(params,"ui",id,value)) return Msg(playerid,color,""#red"USAGE: "#green"/setcash <id> <value>");
   if(!IsPlayerConnected(id)) return Msg(playerid,color,NOT_CONNECTED);
   ResetPlayerMoney(playerid);
   GivePlayerMoney(playerid,value);
   format(string,sizeof(string),""#red"[ADMIN]: %s (id: %d) "#ice"has set your cash for "#blue"%i$",GetMyName(playerid),playerid,value);
   return Msg(id,color,string);
}
Sscanf download: https://sampforum.blast.hk/showthread.php?tid=120356

ZCMD download: https://sampforum.blast.hk/showthread.php?tid=91354
Reply


Messages In This Thread
Help with /pay command - by magent - 30.12.2012, 12:37
Re: Help with /pay command - by Feastahashi - 30.12.2012, 12:46
Re: Help with /pay command - by magent - 30.12.2012, 12:52
Re: Help with /pay command - by magent - 30.12.2012, 12:56
Re: Help with /pay command - by Vinninho - 30.12.2012, 13:24
Re: Help with /pay command - by magent - 30.12.2012, 13:28
Re: Help with /pay command - by Vinninho - 30.12.2012, 13:29
Re: Help with /pay command - by magent - 30.12.2012, 13:31
Re: Help with /pay command - by magent - 30.12.2012, 13:36
Re: Help with /pay command - by Feastahashi - 30.12.2012, 13:37

Forum Jump:


Users browsing this thread: 1 Guest(s)