Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDeath(playerid, killerid, reason)
- {
- pInfo[killerid][Kills] += 1;
- pInfo[playerid][Deaths] += 1;
- pMG_Minigame[playerid] = false;
- SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
- new msg[128], killerName[MAX_PLAYER_NAME], reasonMsg[32], playerName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, killerName, sizeof(killerName));
- GetPlayerName(playerid, playerName, sizeof(playerName));
- if (killerid != INVALID_PLAYER_ID)
- {
- switch (reason)
- {
- case 0: reasonMsg = "Unarmed";
- case 1: reasonMsg = "Brass Knuckles";
- case 2: reasonMsg = "Golf Club";
- case 3: reasonMsg = "Night Stick";
- case 4: reasonMsg = "Knife";
- case 5: reasonMsg = "Baseball Bat";
- case 6: reasonMsg = "Shovel";
- case 7: reasonMsg = "Pool Cue";
- case 8: reasonMsg = "Katana";
- case 9: reasonMsg = "Chainsaw";
- case 10: reasonMsg = "Dildo";
- case 11: reasonMsg = "Dildo";
- case 12: reasonMsg = "Vibrator";
- case 13: reasonMsg = "Vibrator";
- case 14: reasonMsg = "Flowers";
- case 15: reasonMsg = "Cane";
- case 22: reasonMsg = "Pistol";
- case 23: reasonMsg = "Silenced Pistol";
- case 24: reasonMsg = "Desert Eagle";
- case 25: reasonMsg = "Shotgun";
- case 26: reasonMsg = "Sawn-off Shotgun";
- case 27: reasonMsg = "Combat Shotgun";
- case 28: reasonMsg = "MAC-10";
- case 29: reasonMsg = "MP5";
- case 30: reasonMsg = "AK-47";
- case 31: reasonMsg = "M4";
- case 32: reasonMsg = "TEC-9";
- case 33: reasonMsg = "Country Rifle";
- case 34: reasonMsg = "Sniper Rifle";
- case 37: reasonMsg = "Fire";
- case 38: reasonMsg = "Minigun";
- case 41: reasonMsg = "Spray Can";
- case 42: reasonMsg = "Fire Extinguisher";
- case 49: reasonMsg = "Vehicle Collision";
- case 50: reasonMsg = "Vehicle Collision";
- case 51: reasonMsg = "Explosion";
- default: reasonMsg = "Unknown";
- }
- format(msg, sizeof(msg), "04*** %s killed %s. (%s)", killerName, playerName, reasonMsg);
- }
- else
- {
- switch (reason)
- {
- case 53: format(msg, sizeof(msg), "04*** %s died. (Drowned)", playerName);
- case 54: format(msg, sizeof(msg), "04*** %s died. (Collision)", playerName);
- default: format(msg, sizeof(msg), "04*** %s died.", playerName);
- }
- }
- IRC_GroupSay(groupID, IRC_CHANNEL, msg);
- SendClientMessageToAll(COLOR_RED, msg);
- if(gettime() - GetPVarInt(playerid,"PlayerLastDeath") < 1)
- {
- new string[256];
- GetPlayerIp(playerid, IP[playerid], 16);
- format(string, sizeof(string), "banip %s", IP[playerid]);
- SendRconCommand(string);
- format(string, sizeof(string), "ANTI-CHEAT:{FFFFFF} %s has been banned for fake killing.", GetName(playerid));
- SendClientMessageToAll(COLOR_RED, string);
- SendClientMessage(playerid, COLOR_RED, "BANNED:{FFFFFF} You have been banned for fake killing, in case this ban is wrong write an appeal on csw.advanced-gaming.org.");
- KickPlayer(playerid);
- }
- SetPVarInt(playerid,"PlayerLastDeath",gettime());
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement