09.03.2015, 08:56
I am actually creating it with name parameter
this are my codes
this are my codes
Код:
new WeaponNames[47][] = { {"Unarmed"},{"Brass Knuckles"},{"Golf Club"},{"Nite Stick"},{"Knife"},{"Baseball Bat"},{"Shovel"},{"Pool Cue"},{"Katana"},{"Chainsaw"},{"Purple Dildo"}, {"Smal White Vibrator"},{"Large White Vibrator"},{"Silver Vibrator"},{"Flowers"},{"Cane"},{"Grenade"},{"Tear Gas"},{"Molotov Cocktail"}, {""},{""},{""}, // Empty spots for ID 19-20-21 (invalid weapon id's) {"9mm"},{"Silenced 9mm"},{"Desert Eagle"},{"Shotgun"},{"Sawn-off Shotgun"},{"Combat Shotgun"},{"Micro SMG"},{"MP5"},{"AK-47"},{"M4"},{"Tec9"}, {"Country Rifle"},{"Sniper Rifle"},{"Rocket Launcher"},{"HS Rocket Launcher"},{"Flamethrower"},{"Minigun"},{"Satchel Charge"},{"Detonator"}, {"Spraycan"},{"Fire Extinguisher"},{"Camera"},{"Nightvision Goggles"},{"Thermal Goggles"},{"Parachute"} };
Код:
stock GetWeaponModelIDFromName(wname[]) { for(new i = 0; i < 48; i++) { if (i == 19 || i == 20 || i == 21) continue; if (strfind(WeaponNames[i], wname, true) != -1) { return i; } } return -0; }