[FilterScript] Anti DB(Drive-By) Kill [SIMPLE] - My first FS! [+REP1]
#1

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
Reply
#2

It's cool nice.
Reply
#3

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

Awesome,
+2 Repulations!
Reply
#5

Thanks Theo
Reply
#6

If have bug, please tell me
Sorry for 2 post
Reply
#7

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.
Reply
#8

OnplayerUpdate, will make the server lag!

BTW .. Updates!
Reply
#9

how would the server lag if u use onplayerupdate??
Reply
#10

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

BTW .. Updates!
Complete non-sense.
Reply
#11

Nice work, good job!
Reply
#12

Thanks CroM256
Reply
#13

bump
Reply
#14

nice one bro...
Reply
#15

simple but nice +Rep
Reply
#16

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

nice
Reply
#18

Thanks All

Sorry i am noob :P
Reply
#19

Nice btw , simple but good job
Reply
#20

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)