Weapon name help
#2

You can easily do that using "%W" placeholder in format syntax.
Example :
Код:
new msg[128];
format(msg, sizeof(msg), "Your weapon : %W", GetPlayerWeapon(playerid));
SendcClientMessage(playerid, -1, msg);
BTW, there's all weapon names :
Код:
new WeaponNames[55][] = //by Sascha
{
	"Fist", "Brass Knuckles", "Golf Club", "Nightstick", "Knife", "Baseball Bat",
	"Shovel", "Pool Cue", "Katana", "Chainsaw", "Double-ended Dilde", "Dildo",
	"Vibrator", "Silver Vibrator", "Flowers", "Cane", "Grenade", "Tear Gas",
	"Molotov Cocktail", "Unknow", "Unknown", "Unknown", "9mm", "Silenced 9mm",
	"Desert Eagle", "Shotgun", "Sawnoff Shotgun", "Combat Shotgun", "Micro SMG",
	"MP5", "AK-47", "M4", "Tec-9", "Country Rifle", "Sniper Rifle", "RPG", "HS Rocket",
	"Flamethrower", "Minigun", "Satchel Charge", "Detonator", "Spraycan", "Fire Extinguisher",
	"Camera", "Night Vis Goggles", "Thermal Goggles", "Parachute", "Fake Pistol", "Unknown",
	"Vehicle", "Helicopter Blades", "Explosion", "Unkown", "Drowned", "Spat"
};
Here's the code to use this :
Код:
new msg[128];
format(msg, sizeof(msg), "Your weapon : %W", WeaponNames[GetPlayerWeapon(playerid)]);
SendcClientMessage(playerid, -1, msg);
Reply


Messages In This Thread
Weapon name help - by GeorgeMcReary - 12.07.2015, 11:26
Re: Weapon name help - by X337 - 12.07.2015, 11:33
Re: Weapon name help - by GeorgeMcReary - 12.07.2015, 11:35
Re: Weapon name help - by GTLS - 12.07.2015, 11:47
Re : Weapon name help - by KillerDVX - 12.07.2015, 11:55
Re: Weapon name help - by GeorgeMcReary - 12.07.2015, 12:04

Forum Jump:


Users browsing this thread: 1 Guest(s)