[FilterScript] Weapon spawner 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Weapon spawner command (
/showthread.php?tid=429786)
Weapon spawner command -
BlackHorse - 11.04.2013
INFORMATION
With this you can spawn weapons for free
HOW
With command "/w ID"
DOWNLOADS
SOLIDFILES
.pwn
http://www.solidfiles.com/d/fbf11cd5d3/
.amx
http://www.solidfiles.com/d/d411bd7cb9/
PASTEBIN
Only .pwn
http://pastebin.com/wKpkygpL
Re: Weapon spawner command -
MP2 - 11.04.2013
Or instead of a completely silly script, you could use sscanf or something, instead of having a command for every weapon.
I suggest you look at the fsdebug.pwn filterscript that comes with the SA-MP server package.
Re: Weapon spawner command -
TheSka - 11.04.2013
*sigh*
Use dialogs.. this looks pretty plain
Re: Weapon spawner command -
RajatPawar - 11.04.2013
Holy crap ! You checked 38 times, the command being used? SSCANF, MATE, SSCANF !
Re: Weapon spawner command -
BlackHorse - 11.04.2013
It's lazy to choose from dialog it's take time if you know the ID of weapon you can spawn more fastly
Re: Weapon spawner command -
CreativityLacker - 11.05.2013
Can I simplify dat for you?
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Weapon spawner BY BlackHorse");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
CMD:w(playerid, params[])
{
new weapid;
if(sscanf(params, "d", weapid)) return SendClientMessage(playerid, -1, "/w [id] ");
else GivePlayerWeapon(playerid, weapid, 355);
return 1;
}
Re: Weapon spawner command -
Rimmon - 12.05.2013
Quote:
pawn Код:
CMD:w(playerid, params[]) { new weapid; if(sscanf(params, "d", weapid)) return SendClientMessage(playerid, -1, "/w [id] "); else GivePlayerWeapon(playerid, weapid, 355); return 1; }
|
In your command the player can put every id ,
I guess this command is better
pawn Код:
CMD:w(playerid, params[])
{
new weapid;
if(sscanf(params, "d", weapid))
return SendClientMessage(playerid, -1, "Usage : /w [id] ");
else if ( weapid < 0 || weapid > 46 )
return SendClientMessage ( playerid , -1 , "Invalid weapon ID" ) ;
else
{
GivePlayerWeapon(playerid, weapid, 355);
}
return 1;
}