SA-MP Forums Archive
[FilterScript] Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] (/showthread.php?tid=497553)

Pages: 1 2


Anti DB(Drive-By) Kill [SIMPLE] - My first FS! Updates v.1.2 - VenomMancer - 27.02.2014

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 Код:
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 Код:
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



Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Ha$H_Sexyboy - 27.02.2014

It's cool nice.


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 27.02.2014

Quote:
Originally Posted by Ha$H_Sexyboy
Посмотреть сообщение
It's cool nice.
Thanks


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - theomanking - 27.02.2014

Awesome,
+2 Repulations!


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 27.02.2014

Thanks Theo


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 27.02.2014

If have bug, please tell me
Sorry for 2 post


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Pottus - 27.02.2014

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.


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 27.02.2014

OnplayerUpdate, will make the server lag!

BTW .. Updates!


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Sagna - 27.02.2014

how would the server lag if u use onplayerupdate??


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Pottus - 27.02.2014

Quote:
Originally Posted by VenomMancer
Посмотреть сообщение
OnplayerUpdate, will make the server lag!

BTW .. Updates!
Complete non-sense.


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - CroM256 - 27.02.2014

Nice work, good job!


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 28.02.2014

Thanks CroM256


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 02.03.2014

bump


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - mahardika - 04.03.2014

nice one bro...


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Raza2013 - 04.03.2014

simple but nice +Rep


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Uberanwar - 04.03.2014

Great FS , but I'm sure there is a way to completely disable Driveby


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - Team_PRO - 04.03.2014

nice


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 04.03.2014

Thanks All

Sorry i am noob :P



Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - HolyScripter - 06.03.2014

Nice btw , simple but good job


Re: Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1] - VenomMancer - 06.03.2014

Quote:
Originally Posted by HolyScripter
View Post
Nice btw , simple but good job
Thanks

In Indonesia > Makasih mas Leonard (Salam Angga Lombongkaehe A.K.A BulletProof)