Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. if(killerid != INVALID_PLAYER_ID)
  4. {
  5. PlayerDrunk[playerid] = 0;
  6. UsingDrugs2[playerid] = 0;
  7. new var100[256],playername[30],killername[30];
  8. GetPlayerName(playerid,playername,sizeof(playername));
  9. GetPlayerName(killerid,killername,sizeof(killername));
  10. mysql_format(SQL, var100, sizeof(var100), "INSERT INTO kill_logs (`playerid`,`killerid`,`reason`,`playername`,`killername`) VALUES ('%d','%d','%d','%s','%s')", PlayerInfo[playerid][pSQLID],PlayerInfo[killerid][pSQLID],reason,playername,killername);
  11. mysql_tquery(SQL,var100,"","");
  12. if(playerid == 0)
  13. {
  14. if(reason == 0)
  15. {
  16. if(!ProxDetectorS(2.0,playerid, killerid))
  17. {
  18. new string[300];
  19. new playerip[16];
  20. GetPlayerIp(killerid, playerip, sizeof(playerip));
  21. new str[300];
  22. format(string,sizeof(string),"Ban: %s has been permanent banned by AdmBot, reason: Cheats(Aimbot).",killername);
  23. SendClientMessageToAll(COLOR_LIGHTRED, string);
  24. mysql_format(SQL,str,sizeof(str),"INSERT INTO bans (PlayerName, AdminName, Reason, IP, Days, IPBan, Permanent, Active, Time) VALUES('%s', 'AdmBot', 'Cheats(Aimbot)', '%s', 0, 1, 1, 1, 0)",
  25. PlayerInfo[killerid][pNormalName],playerip);
  26. mysql_tquery(SQL,str,"","");
  27. KickEx(killerid);
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement