/giveweapon w/ names.
#1

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

Thx
Reply
#2

You could use the standard script fsdebug for it there is a /w2 command for weapon
Quote:
Originally Posted by samp forum
This forum requires that you wait 120 seconds between posts. Please try again in 10 seconds.
Reply
#3

This is only for admins or the person who types gets it??
Reply
#4

I'd only need a part for getting the weapon ID from its name.. Also - bump.
Reply
#5

Weapon IDs and names: https://sampwiki.blast.hk/wiki/Weapons
Reply
#6

Ok, but when I first made this command, I had an array for this. But nevermind. -.-""
Reply
#7

I just made this up [srx for doublepost]:
pawn Код:
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 © 1997-2006, ITB CompuPhase


2 Errors.
EDIT: Aaah just a bunch of commas.. xd
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)