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

Quote:
Originally Posted by SiDiCeR
Посмотреть сообщение
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.
Still get this error with that mate:

Код:
C:\Users\Lee\Desktop\BTRGW\gamemodes\testing.pwn(252) : warning 203: symbol is never used: "givearmour"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)