27.02.2014, 13:54
(
Последний раз редактировалось VenomMancer; 28.02.2014 в 10:50.
)
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;
}
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;
}
Give me +REP1 for my 1st realesed FS!
Thanks