View Full Version : /giveweapon w/ names.

28/12/2011, 10:53 AM

As you can read in my signature, I've just returned to scripting, so I forgot alot o' things. :\

So can ya guys help me with /giveweapon [id] [weap name] [ammo]?
Well, only with the [weap name] part because that's the main prob.. :D


28/12/2011, 11:19 AM
You could use the standard script fsdebug for it there is a /w2 command for weapon :)
This forum requires that you wait 120 seconds between posts. Please try again in 10 seconds.

28/12/2011, 11:56 AM
This is only for admins or the person who types gets it??

28/12/2011, 04:27 PM
I'd only need a part for getting the weapon ID from its name.. Also - bump.

The God
28/12/2011, 04:49 PM
Weapon IDs and names: http://wiki.sa-mp.com/wiki/Weapons

28/12/2011, 04:53 PM
Ok, but when I first made this command, I had an array for this. But nevermind. -.-""

28/12/2011, 05:19 PM
I just made this up [srx for doublepost]:

new WeapArray[40][2][50] = {
{"Brass Knuckles","1"},
{"Golf Club","2"},
{"Nite Stick","3"},
{"Baseball Bat","5"},
{"Pool Cue,"7"},
{"Tear Gas","17"},
{"Molotov Coctail","18"},
{"Silenced 9mm","23"},
{"Desert Eagle Deagle","24"},
{"Sawn-off Shotgun","26"}
{"Combat Shotgun","27"}
{"Country Rifle","33"},
{"Sniper Rifle","34"},
{"Rocket Launcher","35"},
{"Heat Seeker Rocket Launcher HS","36"},
{"Fire Extinguisher","41"},
{"Night Vision ******s","43"},
{"Thermal Vision ******s","44"},

Errors I get:

C:\Users\***\tf2.pwn(82) : error 001: expected token: ";", but found "-integer value-"
C:\Users\***\tf2.pwn(115) : error 010: invalid function or declaration
C:\Users\***\tf2.pwn(1119) : warning 203: symbol is never used: "WeapArray"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

2 Errors.

EDIT: Aaah just a bunch of commas.. xd