Originally Posted by MenaceX^
Quote:
Originally Posted by OmeRinG
pawn Код:
//This goes in the bottom of the script stock GetWeaponNameFromReason(reason) { new weapons[][] = { "Unarmed", "Brass Knuckles", "Golf Club","Nite Stick", "Knife", "Baseball Bat", "Shovel", "Pool Cue", "Katana", "Chainsaw", "Purple Dildo", "Small White Vibrator", "Large White Vibrator", "Silver Vibrator", "Flowers", "Cane", "Grenade", "Tear Gas", "Molotov Cocktail", "Vehicle Missile", "Hydra Flare", "Jetpack", "9mm", "Silenced 9mm", "Desert Eagle", "Shotgun", "Sawnoff Shotgun", "Combat Shotgun", "Micro SMG (Uzi)", "SMG (MP5)", "AK47", "M4", "Tec9", "Country Rifle", "Sniper Rifle", "Rocket Launcher", "Heatseeker rocket launcher", "Flamethrower", "Minigun", "Satchel Charge", "Detonator", "Spraycan", "Fire Extinguisher", "Camera", "Nightvision Goggles", "Infrared Vision", "Parachute", "Fake Pistol", "Vehicle", "Helicopter Blades", "Explosion", "Drowned", "Collision" }; new wn[50]; format(wn,sizeof(wn),"%s",weapons[reason]); return wn; } //This goes in OnPlayerDeath: public OnPlayerDeath(playerid, killerid, reason) { new string[100]; new name[MAX_PLAYER_NAME]; GetPlayerName(killerid,name,sizeof(name)); format(string,sizeof(string),"%s (ID: %d) has killed you with a %s.", name, killerid, GetWeaponNameFromReason(reason)); SendClientMessage(playerid,0xff000000,string); return 1; }
OK it's tested and it works great... say a big thanks for that because it wasn't premade I made it for you...
|
So wasted..
pawn Код:
//In OnPlayerDeath callback. new string[32]; GetWeaponName(reason,string,sizeof(string)); format(string,sizeof(string),"%d was killed by %d (weapon: %s)",playerid,killerid,string); //Then send it to who ever you want.. SendClientMessageToAll(color,string); //for example.
|