[FS|0.2] Player Protections (DB, TK, Heli, Spawnkill, Ping, Spam)
#1

Simple script to kick players who "excessively" driveby, teamkill, helikill, spawnkill, ping, and spam.
Used on Novocaine server (not currently). The number of infractions and time frame for each protection are configurable via defines as well as enabling and disabling each protection individually.

It works fine on linux. I heard a rumor about GetTickCount() not working correctly on Windows...

Brief explanation of settings:
Code:
#define DRIVEBY_PROTECTION 1 // Driveby protection is enabled. 1 = on, 0 = off
#define DRIVEBY_MAX_KILLS 5 // The number of driveby kills a user must accumulate within the time limit (DRIVEBY_TIMELIMIT)
#define DRIVEBY_TIMELIMIT 600 // The number of seconds during which the MAX_KILLS quota must be reached for a kick to be triggered
UPDATE (7/9/07): Added ping kicker.
UPDATE (7/7/07): Setting the *_MAX_KILLS and *_TIMELIMIT to 1 will kick the player on the first infraction.

Download (Pastebin): http://pastebin.ca/611136
Download (pwn): http://gta.hamm3r.net/scripts/playerprotections.pwn
Download (amx): http://gta.hamm3r.net/scripts/playerprotections.amx

HAMM3R

Edit: You may want to fix the bug that causes car kills to appear as helikills. Just check if the killer's vehicle is not a heli and change the reason to 49.
Reply
#2

Nice work, HAMM3R
Reply
#3

Humm ... seems nice...

He makes the diference of DB in: car vs car(permit) or car vs player (not permit) ?


regards
Reply
#4

Quote:
Originally Posted by Duelos SA
Humm ... seems nice...

He makes the diference of DB in: car vs car(permit) or car vs player (not permit) ?


regards
Drivebying someone who's in a car would kill them by explosion or just a null death. As far as I know it's impossible to kill someone who's in a vehicle from your own vehicle using a weapon.
Reply
#5

Quote:

As far as I know it's impossible to kill someone who's in a vehicle from your own vehicle using a weapon.

Negative. If they're on a bike, you can shoot them off it. Shooting someone in a car while you drive by is probably impossible.
Reply
#6

Quote:
Originally Posted by [NoV
dzvera ]
Quote:

As far as I know it's impossible to kill someone who's in a vehicle from your own vehicle using a weapon.

Negative. If they're on a bike, you can shoot them off it. Shooting someone in a car while you drive by is probably impossible.
Great. Then the !IsPlayerInAnyVehicle(playerid) does serve a legitimate purpose
Reply
#7

its works but when i modhyed it wasnt work( I changed time and max kills)
i souted my team 100 times but there wasnt no kick
Reply
#8

Quote:
Originally Posted by Warriors_Tornado
its works but when i modhyed it wasnt work( I changed time and max kills)
i souted my team 100 times but there wasnt no kick
Show me the lines you modified. Keep in mind that the *_TIMELIMIT is expressed in seconds, not minutes.
Also, I believe you need to be using AddPlayerClassEx() and specifying the team ID in order for GetPlayerTeam() to work properly.
Reply
#9

Well nice work hamm3r i'm not sure maybe i'll try dat in my server
Reply
#10

first time it realy works but second and third not

i modifyed 21,22,23,25,26,27 lines

I just wanted to set max kills to 1 and time to 1 sec beceause i like when player kils team he momentaly get kick without waiting
Reply
#11

Updated.
In my tired sleep deprived fumblings last night I forgot to copy over the OnPlayerConnect() callback to reset all the variables.

All fixed now. Enjoy!
Reply
#12

Quote:
Originally Posted by Warriors_Tornado
first time it realy works but second and third not

i modifyed 21,22,23,25,26,27 lines

I just wanted to set max kills to 1 and time to 1 sec beceause i like when player kils team he momentaly get kick without waiting
At this point it won't allow that because of an "else if" statement. I'll tweak it tomorrow to fix this, although the script is not made to be an instant kick. Now I need sleep... zzZZzzzzZZzzZzz
Reply
#13

can i change that after one team killing player are get kicked
Reply
#14

Don't double post. Just edit your last post.
Reply
#15

Updated. It now supports kicking the player on the first infraction by setting the *_MAX_KILLS and *_TIMELIMIT to 1.
Reply
#16

E X C E L E N T

This srcipt its very good, i have in my server.


Regards




ps:can you make a srcipt to ping-Kick ?
Reply
#17

thanx it works very well
Reply
#18

Quote:
Originally Posted by Duelos SA
ps:can you make a srcipt to ping-Kick ?
Good idea, i'll add that in soon.
Reply
#19

Updated. Added ping kicker.
Reply
#20

i have ping kicker in admin script
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)