SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 07/07/2007, 05:43 AM   #1
[NoV]HAMM3R
Little Clucker
 
Join Date: May 2006
Posts: 12
Reputation: 0
Default [FS|0.2] Player Protections (DB, TK, Heli, Spawnkill, Ping, Spam)

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.
[NoV]HAMM3R is offline   Reply With Quote
Old 07/07/2007, 06:18 AM   #2
Maikel
Huge Clucker
 
Join Date: Nov 2006
Posts: 392
Reputation: 39
Default Re: [FS|0.2] Basic Protections (DB, TK, Heli, Spawnkill, Spam)

Nice work, HAMM3R
Maikel is offline   Reply With Quote
Old 07/07/2007, 06:20 AM   #3
Duelos SA
Big Clucker
 
Join Date: Jun 2007
Posts: 79
Reputation: 0
Default Re: [FS|0.2] Basic Protections (DB, TK, Heli, Spawnkill, Spam)

Humm ... seems nice...

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


regards
Duelos SA is offline   Reply With Quote
Old 07/07/2007, 06:27 AM   #4
[NoV]HAMM3R
Little Clucker
 
Join Date: May 2006
Posts: 12
Reputation: 0
Default Re: [FS|0.2] Basic Protections (DB, TK, Heli, Spawnkill, Spam)

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.
[NoV]HAMM3R is offline   Reply With Quote
Old 07/07/2007, 06:36 AM   #5
[NoV]dzvera
Little Clucker
 
Join Date: Jan 2007
Posts: 1
Reputation: 0
Default Re: [FS|0.2] Basic Protections (DB, TK, Heli, Spawnkill, Spam)

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.
[NoV]dzvera is offline   Reply With Quote
Old 07/07/2007, 06:39 AM   #6
[NoV]HAMM3R
Little Clucker
 
Join Date: May 2006
Posts: 12
Reputation: 0
Default Re: [FS|0.2] Basic Protections (DB, TK, Heli, Spawnkill, Spam)

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
[NoV]HAMM3R is offline   Reply With Quote
Old 07/07/2007, 08:45 AM   #7
Warriors_Tornado
Big Clucker
 
Join Date: Jun 2007
Posts: 55
Reputation: 0
Default Re: [FS|0.2] Basic Protections (DB, TK, Heli, Spawnkill, Spam)

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
Warriors_Tornado is offline   Reply With Quote
Old 07/07/2007, 08:51 AM   #8
[NoV]HAMM3R
Little Clucker
 
Join Date: May 2006
Posts: 12
Reputation: 0
Default Re: [FS|0.2] Basic Protections (DB, TK, Heli, Spawnkill, Spam)

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.
[NoV]HAMM3R is offline   Reply With Quote
Old 07/07/2007, 09:11 AM   #9
[SMB]Bip
Big Clucker
 
Join Date: Nov 2006
Posts: 68
Reputation: 0
Default Re: [FS|0.2] Player Protections (DB, TK, Heli, Spawnkill, Spam)

Well nice work hamm3r i'm not sure maybe i'll try dat in my server
[SMB]Bip is offline   Reply With Quote
Old 07/07/2007, 09:29 AM   #10
Warriors_Tornado
Big Clucker
 
Join Date: Jun 2007
Posts: 55
Reputation: 0
Default Re: [FS|0.2] Player Protections (DB, TK, Heli, Spawnkill, Spam)

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
Warriors_Tornado is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP]Server Crash at 200 ping,ID interfusion if more than 6 player erik019 Help Archive 7 13/06/2010 01:13 AM
[FilterScript] [FS]LiL - (LuX In Log) (+Save information in Log) +Anti(SpawnKill,DriveBy,Spam) LuxurioN™ Filterscripts 15 11/01/2010 02:32 PM
RC HELI Sfinx_17 Help Archive 11 14/09/2009 06:32 PM
RC Heli telecommand help Sfinx_17 Help Archive 7 23/08/2009 12:52 AM


All times are GMT. The time now is 12:46 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.