01.11.2010, 10:29
Use sscanf + zcmd
pawn Код:
new playerid2, penalty;
CMD:penalty(playerid, params[])
{
if(sscanf(params, "ui", playerid2, penalty)) SendClientMessage(playerid, Orange, "USAGE : .....");
else if(playerid2 == INVALID_PLAYER_ID) SendClientMessage(playerid, Orange, "ERROR : That user is not online.....");
else if(playerid2 == playerid) SendClientMessage(playerid, Color, "ERROR : You cant give yourself a pentaly....");
else
{
GivePenalty(playerid2);
.....
// Some codes here
}
return 1;
}