15.03.2015, 17:01
Whenever i input this in OnPlayerDeath my compiler stops working I don't see anything wrong with it though may I be assisted please?
Код:
if (killerid != INVALID_PLAYER_ID) { switch (reason) { new string[300]; case 0: reason = "Unarmed"; case 1: reason = "Brass Knuckles"; case 2: reason = "Golf Club"; case 3: reason = "Night Stick"; case 4: reason = "Knife"; case 5: reason = "Baseball Bat"; case 6: reason = "Shovel"; case 7: reason = "Pool Cue"; case 8: reason = "Katana"; case 9: reason = "Chainsaw"; case 10: reason = "Dildo"; case 11: reason = "Dildo"; case 12: reason = "Vibrator"; case 13: reason = "Vibrator"; case 14: reason = "Flowers"; case 15: reason = "Cane"; case 22: reason = "Pistol"; case 23: reason = "Silenced Pistol"; case 24: reason = "Desert Eagle"; case 25: reason = "Shotgun"; case 26: reason = "Sawn-off Shotgun"; case 27: reason = "Combat Shotgun"; case 28: reason = "MAC-10"; case 29: reason = "MP5"; case 30: reason = "AK-47"; case 31: reason = "M4"; case 32: reason = "TEC-9"; case 33: reason = "Country Rifle"; case 34: reason = "Sniper Rifle"; case 37: reason = "Fire"; case 38: reason = "Minigun"; case 41: reason = "Spray Can"; case 42: reason = "Fire Extinguisher"; case 49: reason = "Vehicle Collision"; case 50: reason = "Vehicle Collision"; case 51: reason = "Explosion"; default: reason = "Unknown"; } format(string, sizeof(string), "Player %s[%i] has killed %s[%i]. (%s)", killerid, playerid, PlayerName, playerid, reason); } else { switch (reason) { case 53: format(string, sizeof(string), "Player %s[%i] died. (Drowned)", PlayerName,playerid); case 54: format(string, sizeof(string), "Player %s[%i] died. (Collision)", PlayerName,playerid); default: format(string, sizeof(string), "Player %s[%i] died.", PlayerName,playerid); } }