Help ! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help ! (
/showthread.php?tid=615423)
Help ! -
SoltutioN - 22.08.2016
I was makin a admin command /giveweapon [WeaponID] [Ammo]
But whenever I try to compile it 1 error appears
error
Код:
(765) : error 035: argument type mismatch (argument 1)
the 765 line:
Код:
if(sscanf(params,"uii", id, weapid, ammo))
help me pls
Re: Help ! -
DarkSkull - 22.08.2016
Could you show the whole command please?
Re: Help ! -
SoltutioN - 22.08.2016
Код:
COMMAND:giveweapon(playerid, params)
{
new id,weaponid, ammo, msg[128], name1[MAX_PLAYER_NAME];
if(sscanf(params,"uii", id, weaponid, ammo)) return SCM(PID, -1, "Usage: /giveweapon [ID] [WeaponId] [Ammo]");
if(PlayerInfo[playerid][pAdmin] < 4) return SCM(PID, COLOR_RED, "You must be level 4 admin!");
if(PlayerInfo[playerid][pAdmin] == 0) return SCM(PID, COLOR_RED,"You are not allowed to use this command!");
if(id == INVALID_PLAYER_ID) return SCM(PID, COLOR_RED, "That Player is not connected");
{
GivePlayerWeapon(id, weaponid, ammo);
GPN(PID, name1, sizeof(name1));
format(msg, sizeof(msg),"Admin %s gave you gun! ammo: %d", name1, ammo);
SCM(id, COLOR_YELLOW, msg);
}
return 1;
}
Re: Help ! -
SoltutioN - 22.08.2016
Oh I see error now, I fixed problem !
Re: Help ! -
DarkSkull - 22.08.2016
PHP код:
if(sscanf(params,"uii", id, weaponid, ammo)) return SCM(playerid, -1, "Usage: /giveweapon [ID] [WeaponId] [Ammo]");