Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(killerid != INVALID_PLAYER_ID)
- {
- PlayerDrunk[playerid] = 0;
- UsingDrugs2[playerid] = 0;
- new var100[256],playername[30],killername[30];
- GetPlayerName(playerid,playername,sizeof(playername));
- GetPlayerName(killerid,killername,sizeof(killername));
- 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);
- mysql_tquery(SQL,var100,"","");
- if(playerid == 0)
- {
- if(reason == 0)
- {
- if(!ProxDetectorS(2.0,playerid, killerid))
- {
- new string[300];
- new playerip[16];
- GetPlayerIp(killerid, playerip, sizeof(playerip));
- new str[300];
- format(string,sizeof(string),"Ban: %s has been permanent banned by AdmBot, reason: Cheats(Aimbot).",killername);
- SendClientMessageToAll(COLOR_LIGHTRED, string);
- 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)",
- PlayerInfo[killerid][pNormalName],playerip);
- mysql_tquery(SQL,str,"","");
- KickEx(killerid);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement