SA-MP Forums Archive
invalid weapon id - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: invalid weapon id (/showthread.php?tid=651323)



invalid weapon id - wallen - 18.03.2018

How do you make a "invalid weapon id" if you won't correctly write one of these weapons?

PHP код:
new WeaponInfo[][sWeaponInfo] =
{
    {
"Fist",1,0},
    {
"Brass Knuckles",1,0},
    {
"Golf Club",1,1},
    {
"Nightstick",1,1},
    {
"Knife",1,1},
    {
"Baseball Bat",1,1},
    {
"Shovel",1,1},
    {
"Pool cue",1,1},
    {
"Katana",1,1},
    {
"Chainsaw",1,1},
    {
"Double-ended Dildo",1,10},
    {
"Dildo",1,10},
    {
"Vibrator",1,10},
    {
"Silver Vibrator",1,10},
    {
"Flowers",1,10},
    {
"Cane",1,10},
    {
"Grenade",1,8},
    {
"Tear Gas",1,8},
    {
"Molotov Cocktail",1,8},
    {
"",0},
    {
"",0},
    {
"",0},
    {
"9mm Pistol",1,2},
    {
"Silenced 9mm",1,2},
    {
"Deagle",1,2},
    {
"Shotgun",1,3},
    {
"Sawnoff Shotgun",1,3},
    {
"Combat Shotgun",1,3},
    {
"Micro SMG",1,4},
    {
"MP5",1,4},
    {
"AK-47",1,5},
    {
"M4",1,5},
    {
"Tec-9",1,4},
    {
"Country Rifle",1,6},
    {
"Sniper Rifle",1,6},
    {
"RPG",1,7},
    {
"HS Rocket",1,7},
    {
"Flamethrower",1,7},
    {
"Minigun",1,7},
    {
"Sachel Charge",1,8},
    {
"Detonator",1,12},
    {
"Spray Can",1,9},
    {
"Fire Extinguisher",1,9},
    {
"Camera",1,9},
    {
"Night Vision Goggles",0,11},
    {
"Thermal Goggles",0,11},
    {
"Parachute",1,11}
}; 



Re: invalid weapon id - MadeMan - 18.03.2018

Show enum sWeaponInfo


Re: invalid weapon id - wallen - 18.03.2018

PHP код:
enum sWeaponInfo
{
    
Name[60],
        
Valid,
        
Slot