Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Anti fake kill for samp 0.3e by Neonman.
- #include <a_samp>
- #include <foreach>
- 7885
- new LastDeath[MAX_PLAYERS],
- DeathSpam[MAX_PLAYERS],
- bool:Spawned[MAX_PLAYERS];
- public OnPlayerConnect(playerid)
- {
- LastDeath[playerid] = 0,
- DeathSpam[playerid] = 0,
- Spawned[playerid] = false;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- Spawned[playerid] = true;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new time = gettime();
- switch(time - LastDeath[playerid])
- {
- case 0..3:
- {
- DeathSpam[playerid]++;
- if(DeathSpam[playerid] == 3) // The maximum spam of deaths after the cheater will get banned.
- {
- SendClientMessage(playerid, 0xCC0000AA, "You have been banned from the server for fake kill. If you want to get unbanned, visit our website. ");
- Ban(playerid);
- }
- return 1;
- }
- default: DeathSpam[playerid] = 0;
- }
- LastDeath[playerid] = time;
- Spawned[playerid] = false;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement