What am I doing wrong? (CMD:givearmour)
#8

Try this:

pawn Код:
CMD:givearmour(playerid, params[])
{
    new id, Float:amount;
    if(sscanf(params, "uf", id, amount)){ return SendClientMessage(playerid, -1, "[SYTAX] /givearmour [Player ID] [Amount]"); }
   
    SetPlayerArmour(id, amount);
    Player[id][armour] = amount;
    return 1;
}
Your mistakes were:

You put CMD inside of a callback (That's wrong!).
(playerid, parims[]) ? It's params[].
Forgot "{" after CMD line.
new id Float: amount; - Forgot "," after "id".
It's sscanf, not sccanf.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)