04.07.2017, 20:56
Try this.
Код:
new weapName[][] = { "Fists", "Brass Knuckles", "Golf Club", "Nightstick", "Knife", "Baseball Bat", "Shovel", "Pool Cue", "Katana", "Chainsaw", "Double-ended Dildo", "Dildo", "Vibrator", "Silver Vibrator", "Flowers", "Cane", "Grenade", "Tear Gas", "Molotov Cocktail", "", "", "", "9mm", "Silenced 9mm", "Desert Eagle", "Shotgun", "Sawn-off Shotgun", "Combat Shotgun", "Micro Uzi", "MP5", "AK-47", "M4", "Tec9", "Country Rifle", "Sniper Rifle", "RPG", "HS Rocket", "Flame Thrower", "Minigun", "Satchel Charge", "Detonator", "Spraycan", "Fire Extinguisher", "Camera", "Night Vis. ******s", "Thermal Goggles", "Parachute" }; public OnPlayerDeath(playerid, killerid, reason) { pInfo[playerid][Spawned] = 0; SendClientMessage(playerid, red, "You died!"); if (killerid != INVALID_PLAYER_ID) { new PlayerName[24]; GetPlayerName(killerid, PlayerName, sizeof(PlayerName)); format(gString, sizeof(gString), "You have been killed by %s(%d) with %s!", PlayerName, killerid, weapName[reason]); SendClientMessage(playerid, red, gString); TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, killerid); SetTimerEx("OnPlayerStopSpectate", 10000, false, "i", playerid); pInfo[playerid][Deaths]++; pInfo[killerid][Kills]++; SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); F_GivePlayerMoney(killerid, 500); SendDeathMessage(killerid, playerid, reason); } else { SendDeathMessage(INVALID_PLAYER_ID, playerid, reason); } return 1; }