24.01.2011, 13:46
Since you use zcmd, I assume you also have sscanf2 included.
pawn Код:
CMD:a(playerid, params[])
{
new
var[16];
sscanf(params, "s[16] ", var);
if(!strcmp(var, "weapon", true))
{
new
id, weaponid, ammo;
if(sscanf(params[strlen(var)], "udd", id, weaponid, ammo)) return SendClientMessage(playerid, WHITE, "Use: /a weapon [id] [weaponid] [ammo]");
//if that doesn't work, try params[strlen(var) + 1]
}
else if(!strcmp(var, "ban", true))
{
}
else SendClientMessage(playerid, WHITE, "Use: /a [weapon/ban]");
return 1;
}