Вторник, 24.10.2017, 03:13
Главная Регистрация RSS
Приветствую Вас, Гость
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
Страница 1 из 11
Форум сайта. » Pawno » Полезные функции PAWNO » GetWeaponidName(weaponid);
GetWeaponidName(weaponid);
ГостьДата: Четверг, 03.02.2011, 15:32 | Сообщение # 1
Группа: Гости





Узнаёт название у орижия

stock GetWeaponidName(weaponid)
{
new string[256];
if(weaponid == 0) { string = "Unarmed"; }
else if(weaponid == 1) { string = "Brass Knuckles"; }
else if(weaponid == 2) { string = "Golf Club"; }
else if(weaponid == 3) { string = "Nite Stick"; }
else if(weaponid == 4) { string = "Knife"; }
else if(weaponid == 5) { string = "Baseball Bat"; }
else if(weaponid == 6) { string = "Shovel"; }
else if(weaponid == 7) { string = "Pool Cue"; }
else if(weaponid == 8) { string = "Katana"; }
else if(weaponid == 9) { string = "Chainsaw"; }
else if(weaponid == 10) { string = "Purple Dildo"; }
else if(weaponid == 11) { string = "Small White Vibrator"; }
else if(weaponid == 12) { string = "Large White Vibrator"; }
else if(weaponid == 13) { string = "Silver Vibrator"; }
else if(weaponid == 14) { string = "Flowers"; }
else if(weaponid == 15) { string = "Cane"; }
else if(weaponid == 16) { string = "Grenade"; }
else if(weaponid == 17) { string = "Tear Gas"; }
else if(weaponid == 18) { string = "Molotov Cocktail"; }
else if(weaponid == 22) { string = "9mm"; }
else if(weaponid == 23) { string = "Silenced 9mm"; }
else if(weaponid == 24) { string = "Desert Eagle"; }
else if(weaponid == 25) { string = "Shotgun"; }
else if(weaponid == 26) { string = "Sawn-off Shotgun"; }
else if(weaponid == 27) { string = "Combat Shotgun"; }
else if(weaponid == 28) { string = "Micro SMG"; }
else if(weaponid == 29) { string = "MP5"; }
else if(weaponid == 30) { string = "AK-47"; }
else if(weaponid == 31) { string = "M4"; }
else if(weaponid == 32) { string = "Tec9"; }
else if(weaponid == 33) { string = "Country Rifle"; }
else if(weaponid == 34) { string = "Sniper Rifle"; }
else if(weaponid == 35) { string = "Rocket Launcher"; }
else if(weaponid == 36) { string = "HS Rocket Launcher"; }
else if(weaponid == 37) { string = "Flamethrower"; }
else if(weaponid == 38) { string = "Minigun"; }
else if(weaponid == 39) { string = "Satchel Charge"; }
else if(weaponid == 40) { string = "Detonator"; }
else if(weaponid == 41) { string = "Spraycan"; }
else if(weaponid == 42) { string = "Fire Extinguisher"; }
else if(weaponid == 43) { string = "Camera"; }
else if(weaponid == 44) { string = "Nightvision Goggles"; }
else if(weaponid == 45) { string = "Thermal Goggles"; }
else if(weaponid == 46) { string = "Parachute"; }
return string;
}

if(!strcmp("/myweap", cmdtext, true))
{
new string[256];
format(string, 256, "Моё оружие %s", GetWeaponidName(GetPlayerWeapon(playerid)) );
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}

Можно так

stock GetWeaponNameEx(weaponid)
{
new weanr[256];
switch (weaponid)
{
case 0: weanr = "Fist"; case 1: weanr = "Brass Knuckles"; case 2: weanr = "Golf Club"; case 3: weanr = "Nite Stick";
case 4: weanr = "Knife"; case 5: weanr = "Bat"; case 6: weanr = "Shovel"; case 7: weanr = "Pool Kue"; case 8: weanr = "Katana";
case 9: weanr = "Chainsaw"; case 10: weanr = "Purple Dildo"; case 11: weanr = "Small White Vibrator";
case 12: weanr = "Large White Vibrator"; case 13: weanr = "Silver Vibrator"; case 14: weanr = "Flowers"; case 15: weanr = "Cane";
case 16: weanr = "Grenade"; case 17: weanr = "Tear Gas"; case 18: weanr = "Molotov"; case 22: weanr = "9mm";
case 23: weanr = "Silenced 9mm"; case 24: weanr = "Desert"; case 25: weanr = "Shotgun"; case 26: weanr = "Saw'n'Off";
case 27: weanr = "S.P.A.Z. 12"; case 28: weanr = "UZI"; case 29: weanr = "MP5"; case 30: weanr = "AK47"; case 31: weanr = "M4";
case 32: weanr = "TEC9"; case 33: weanr = "Country Rifle"; case 34: weanr = "Sniper"; case 35: weanr = "Rocket Launcher";
case 36: weanr = "Heat Seeker"; case 37: weanr = "Flamethrower"; case 38: weanr = "Minigun"; case 39: weanr = "Satchel Charge";
case 40: weanr = "Detonator"; case 41: weanr = "Spray Can"; case 42: weanr = "Fire Extinguisher"; case 43: weanr = "Camera";
case 46: weanr = "Parachute"; default: weanr = "Undefined";
}
return weanr;
}

 
Форум сайта. » Pawno » Полезные функции PAWNO » GetWeaponidName(weaponid);
Страница 1 из 11
Поиск: