Another way to identify a Hydra Dmer?
#1

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

Reply
#2

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 */
    }
  }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)