SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 27/02/2014, 02:54 PM   #1
VenomMancer
Gangsta
 
VenomMancer's Avatar
 
Join Date: May 2013
Location: Indonesia (Manado)
Posts: 637
Reputation: 28
Red face Anti DB(Drive-By) Kill [SIMPLE] - My first FS! Updates v.1.2

Anti DB(Drive-By) Kill v1.2

Hello guys, i have idea for make this one
I dont know, if this has been released!


Here :
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(GetPlayerState(issuerid) == PLAYER_STATE_DRIVER || GetPlayerState(issuerid) == PLAYER_STATE_PASSENGER )
    {
        new Float:Health;
        GetPlayerHealth(playerid, Health);
        GetPlayerHealth(issuerid, Health);
        SetPlayerHealth(issuerid, Health - 20); // Make when player DB Kill, issuerid health will -20 /1 shoot
        SetPlayerHealth(playerid, Health + 100); // playerid health will +100 /1 shoot
        GameTextForPlayer(issuerid,"~r~~h~~h~Stop Drive by kill ~n~ or you will die!",4000,3);
    }
    return 1;
}

Or this :
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(GetPlayerState(issuerid) == PLAYER_STATE_DRIVER || GetPlayerState(issuerid) == PLAYER_STATE_PASSENGER )
    {
        GameTextForPlayer(issuerid,"~r~~h~~h~Stop Shoot ~n~ or you will kicked!",4000,3);
        PlayerPlaySound(issuerid,1085,0.0,0.0,0.0);
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    new angga[256];
    new kname[MAX_PLAYER_NAME];
    GetPlayerName(killerid, kname, sizeof(kname));
    if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER || GetPlayerState(killerid) == PLAYER_STATE_PASSENGER )
    {
        format(angga, sizeof(angga), ":: SERVER :: %s has been kicked from server! (Reason : Drive-by kill)!",kname);
        SendClientMessageToAll(-1,angga);
        SetTimerEx("playerkick", 2000, 0, "i", killerid);
    }
    return 1;
}

forward playerkick(playerid);
public playerkick(playerid)
{
    Kick(playerid);
    return 1;
}

Simple!
Give me +REP1 for my 1st realesed FS!

Thanks

Last edited by VenomMancer; 28/02/2014 at 11:50 AM.
VenomMancer is offline   Reply With Quote
Old 27/02/2014, 02:57 PM   #2
Ha$H_Sexyboy
Huge Clucker
 
Ha$H_Sexyboy's Avatar
 
Join Date: Nov 2011
Location: Currently in SA
Posts: 364
Reputation: 37
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

It's cool nice.
__________________
Ha$H_Sexyboy is offline   Reply With Quote
Old 27/02/2014, 03:01 PM   #3
VenomMancer
Gangsta
 
VenomMancer's Avatar
 
Join Date: May 2013
Location: Indonesia (Manado)
Posts: 637
Reputation: 28
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

Quote:
Originally Posted by Ha$H_Sexyboy View Post
It's cool nice.
Thanks
VenomMancer is offline   Reply With Quote
Old 27/02/2014, 03:33 PM   #4
theomanking
Big Clucker
 
Join Date: Nov 2012
Location: Pakistan
Posts: 109
Reputation: 29
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

Awesome,
+2 Repulations!
__________________
theomanking is offline   Reply With Quote
Old 27/02/2014, 03:42 PM   #5
VenomMancer
Gangsta
 
VenomMancer's Avatar
 
Join Date: May 2013
Location: Indonesia (Manado)
Posts: 637
Reputation: 28
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

Thanks Theo
VenomMancer is offline   Reply With Quote
Old 27/02/2014, 04:29 PM   #6
VenomMancer
Gangsta
 
VenomMancer's Avatar
 
Join Date: May 2013
Location: Indonesia (Manado)
Posts: 637
Reputation: 28
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

If have bug, please tell me
Sorry for 2 post
VenomMancer is offline   Reply With Quote
Old 27/02/2014, 04:33 PM   #7
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,847
Reputation: 1312
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

Why not use OnPlayerUpdate() to check their armed weapon? If you want to disable drive by why bother checking after the fact when you can prevent it before it even happens. Now I can understand doing this as an additional measure of prevention but if it happens in OnPlayerTakeDamage() a kick would be in order.
Pottus is offline   Reply With Quote
Old 27/02/2014, 05:06 PM   #8
VenomMancer
Gangsta
 
VenomMancer's Avatar
 
Join Date: May 2013
Location: Indonesia (Manado)
Posts: 637
Reputation: 28
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

OnplayerUpdate, will make the server lag!

BTW .. Updates!
VenomMancer is offline   Reply With Quote
Old 27/02/2014, 05:15 PM   #9
Sagna
Banned
 
Join Date: Feb 2014
Posts: 27
Reputation: 1
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

how would the server lag if u use onplayerupdate??
Sagna is offline   Reply With Quote
Old 27/02/2014, 05:39 PM   #10
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,847
Reputation: 1312
Default Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]

Quote:
Originally Posted by VenomMancer View Post
OnplayerUpdate, will make the server lag!

BTW .. Updates!
Complete non-sense.
Pottus 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
Anti Fake Kill Solutions ? +Rep1 VenomMancer Scripting Help 9 18/02/2014 04:28 AM
[HELP] Anti fake kill +REP1 VenomMancer Scripting Help 5 29/01/2014 05:39 PM
[Include] a_driveby - a simple, yet effective anti drive-by system Weponz Includes 4 26/09/2013 11:21 AM
[Tutorial] Anti driver drive-by ( simple + very explaind ) Chrisis Tutorials 8 08/08/2013 09:06 AM
[FilterScript] Simple anti drive by for SA-MP 0.3b BuLLeT[LTU] Filterscripts 25 20/09/2010 08:50 PM


All times are GMT. The time now is 04:47 PM.


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