Advertisement
Guest User

xx

a guest
Dec 19th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.92 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3.     pInfo[killerid][Kills] += 1;
  4.     pInfo[playerid][Deaths] += 1;
  5.     pMG_Minigame[playerid] = false;
  6.     SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  7.     new msg[128], killerName[MAX_PLAYER_NAME], reasonMsg[32], playerName[MAX_PLAYER_NAME];
  8.     GetPlayerName(killerid, killerName, sizeof(killerName));
  9.     GetPlayerName(playerid, playerName, sizeof(playerName));
  10.     if (killerid != INVALID_PLAYER_ID)
  11.     {
  12.         switch (reason)
  13.         {
  14.             case 0: reasonMsg = "Unarmed";
  15.             case 1: reasonMsg = "Brass Knuckles";
  16.             case 2: reasonMsg = "Golf Club";
  17.             case 3: reasonMsg = "Night Stick";
  18.             case 4: reasonMsg = "Knife";
  19.             case 5: reasonMsg = "Baseball Bat";
  20.             case 6: reasonMsg = "Shovel";
  21.             case 7: reasonMsg = "Pool Cue";
  22.             case 8: reasonMsg = "Katana";
  23.             case 9: reasonMsg = "Chainsaw";
  24.             case 10: reasonMsg = "Dildo";
  25.             case 11: reasonMsg = "Dildo";
  26.             case 12: reasonMsg = "Vibrator";
  27.             case 13: reasonMsg = "Vibrator";
  28.             case 14: reasonMsg = "Flowers";
  29.             case 15: reasonMsg = "Cane";
  30.             case 22: reasonMsg = "Pistol";
  31.             case 23: reasonMsg = "Silenced Pistol";
  32.             case 24: reasonMsg = "Desert Eagle";
  33.             case 25: reasonMsg = "Shotgun";
  34.             case 26: reasonMsg = "Sawn-off Shotgun";
  35.             case 27: reasonMsg = "Combat Shotgun";
  36.             case 28: reasonMsg = "MAC-10";
  37.             case 29: reasonMsg = "MP5";
  38.             case 30: reasonMsg = "AK-47";
  39.             case 31: reasonMsg = "M4";
  40.             case 32: reasonMsg = "TEC-9";
  41.             case 33: reasonMsg = "Country Rifle";
  42.             case 34: reasonMsg = "Sniper Rifle";
  43.             case 37: reasonMsg = "Fire";
  44.             case 38: reasonMsg = "Minigun";
  45.             case 41: reasonMsg = "Spray Can";
  46.             case 42: reasonMsg = "Fire Extinguisher";
  47.             case 49: reasonMsg = "Vehicle Collision";
  48.             case 50: reasonMsg = "Vehicle Collision";
  49.             case 51: reasonMsg = "Explosion";
  50.             default: reasonMsg = "Unknown";
  51.         }
  52.         format(msg, sizeof(msg), "04*** %s killed %s. (%s)", killerName, playerName, reasonMsg);
  53.     }
  54.     else
  55.     {
  56.         switch (reason)
  57.         {
  58.             case 53: format(msg, sizeof(msg), "04*** %s died. (Drowned)", playerName);
  59.             case 54: format(msg, sizeof(msg), "04*** %s died. (Collision)", playerName);
  60.             default: format(msg, sizeof(msg), "04*** %s died.", playerName);
  61.         }
  62.     }
  63.     IRC_GroupSay(groupID, IRC_CHANNEL, msg);
  64.     SendClientMessageToAll(COLOR_RED, msg);
  65.     if(gettime() - GetPVarInt(playerid,"PlayerLastDeath") < 1)
  66.     {
  67.         new string[256];
  68.         GetPlayerIp(playerid, IP[playerid], 16);
  69.         format(string, sizeof(string), "banip %s", IP[playerid]);
  70.         SendRconCommand(string);
  71.         format(string, sizeof(string), "ANTI-CHEAT:{FFFFFF} %s has been banned for fake killing.", GetName(playerid));
  72.         SendClientMessageToAll(COLOR_RED, string);
  73.         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.");
  74.         KickPlayer(playerid);
  75.     }
  76.     SetPVarInt(playerid,"PlayerLastDeath",gettime());
  77.     return 1;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement