30.12.2012, 12:46
I'd suggest you to use ZCMD and SSCANF, really faster. Look an example:
PS: I already had this command on my old script
Sscanf download: https://sampforum.blast.hk/showthread.php?tid=120356
ZCMD download: https://sampforum.blast.hk/showthread.php?tid=91354
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);
}
ZCMD download: https://sampforum.blast.hk/showthread.php?tid=91354