Another way to identify a Hydra Dmer? - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Another way to identify a Hydra Dmer? (
/showthread.php?tid=125646)
Another way to identify a Hydra Dmer? -
aNdReSkKkK - 05.02.2010
Hello there,
Right now my script can tell if an army player is dming when on player death, the killer is in hydra and the dead player wasnt wanted. But is there another way to identify this? Problem is that if the Murderer jumps out of the hydra before the other player dies, he will take the death but server wont take it as hydra abuse
related picture:
Hydra
Re: Another way to identify a Hydra Dmer? -
mansonh - 05.02.2010
There are many creative ways you could do this.
If the hydra driver does manage to avoid the auto killer detection.
Here is one possibility, it may not be the most efficient, its just an example
https://sampwiki.blast.hk/wiki/Useful_Functions for GetClosestPlayer
pawn Код:
new PlayerLastVehicle[MAX_PLAYERS];
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetVehicleModel(vehicleid) == 520)
{
new Float:vhealth;
GetVehicleHealth(vehicleid, vhealth);
if(vhealth > 250)
{
PlayerLastVehicle[playerid] = vehicleid;
SetTimerEx("ClearPlayerVehicle", 2000, 0, "d", playerid);
}
}
}
forward ClearPlayerVehicle(playerid);
public ClearPlayerVehicle(playerid)
{
PlayerLastVehicle[playerid]=0;
}
public OnPlayerDeath(playerid, killerid, reason)
{
//check if no killer registered and the closest player just exited a hydra
if(killerid == INVALID_PLAYER_ID )
{
new closestP = GetClosestPlayer(playerid);
if(PlayerLastVehicle[closestP]==520)
{
killerid = closestP;
reason = 0;/*I dont know what hydra normally comes up as */
}
}
}