Giveall Command - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Giveall Command (
/showthread.php?tid=267435)
Giveall Command -
HydraX - 08.07.2011
pawn Код:
new weapon,ammo,string[128];
if(sscanf(params,"ui",weapon,ammo)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /giveallweapon [weaponid] [ammo]");
foreach(Player,i) GivePlayerWeapon(i,weapon,ammo);
This code looks okay, but when using it, Everyone gets a weapon called "65535" or something like that.
Re: Giveall Command -
Wesley221 - 08.07.2011
pawn Код:
if(sscanf(params,"ii",weapon,ammo))
'u' is for playerids, not for weapon ids
Re: Giveall Command -
HydraX - 08.07.2011
Thanks!!! I never knew one letter could affect the whole thing.