12.05.2012, 17:55
pawn Код:
CMD:rob(playerid, params[])
{
new string[128], pID;
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, -1, "Correct usage for command is: /rob playerid");
new cash = GetPlayerMoney(pID);
new Float:steal = cash * 0.10;
format(string, sizeof(string), "You have stolen %d from ID %i", floatround(steal), pID);
SendClientMessage(playerid, -1, string);
GivePlayerMoney(playerid, floatround(steal));
return 1;
}
You need ZCMD and SSCANF btw.