PDA

View Full Version : /giveweapon w/ names.


Seven_of_Nine
28/12/2011, 10:53 AM
Hello,

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

Thx

thimo
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.

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

Seven_of_Nine
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

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

Seven_of_Nine
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"},
{"Knife","4"},
{"Baseball Bat","5"},
{"Shovel","6"},
{"Pool Cue,"7"},
{"Katana","8"}
{"Chainsaw","9"},
{"Dildo","10"},
{"Flowers","14"},
{"Cane","15"},
{"Grenade","16"},
{"Tear Gas","17"},
{"Molotov Coctail","18"},
{"9mm","22"},
{"Silenced 9mm","23"},
{"Desert Eagle Deagle","24"},
{"Shotgun","25"}
{"Sawn-off Shotgun","26"}
{"Combat Shotgun","27"}
{"Micro-SMG","28"},
{"MP5","29"},
{"AK-47","30"},
{"M4","31"},
{"Tec-9","32"},
{"Country Rifle","33"},
{"Sniper Rifle","34"},
{"Rocket Launcher","35"},
{"Heat Seeker Rocket Launcher HS","36"},
{"Flamethrower","37"},
{"Minigun","38"},
{"Satchel","39"},
{"Detonator","40"},
{"Fire Extinguisher","41"},
{"Camera","42"},
{"Night Vision ******s","43"},
{"Thermal Vision ******s","44"},
{"Parachute","46"}
};

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