Another way to identify a Hydra Dmer?
#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


Messages In This Thread
Another way to identify a Hydra Dmer? - by aNdReSkKkK - 05.02.2010, 00:09
Re: Another way to identify a Hydra Dmer? - by mansonh - 05.02.2010, 04:14

Forum Jump:


Users browsing this thread: 1 Guest(s)