18.05.2009, 20:28
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;
}

