[FilterScript] Weapon spawner command
#1

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
Reply
#2

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.
Reply
#3

*sigh*

Use dialogs.. this looks pretty plain
Reply
#4

Holy crap ! You checked 38 times, the command being used? SSCANF, MATE, SSCANF !
Reply
#5

It's lazy to choose from dialog it's take time if you know the ID of weapon you can spawn more fastly
Reply
#6

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;
}
Reply
#7

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)