My questions here. (please have a look here, this will be updated frequently)
#4

As suggested there are many ways.
I wouldn't however recommend onplayerupdate, it is called A LOT, as in 20+ times per second per player (unless you want it to kill them the exact ms they reach -70, thats a strain on your server for something so small)

If you just want to kill anyone who goes below it, then use a timer, its much easier on your server, same code as llamas.

pawn Code:
public OnGameModeInit()
{
  SetTimer("TimerDepthCheck", 1000, 1); //depending how worried you are on how suddenly it kills them you can change it 1000 = 1s
}

forward TimerDepthCheck();
public TimerDepthCheck()
{
  for(new playerid=0; playerid<GetMaxPlayers(); playerid++)
  {
    if(!IsPlayerConnected(playerid)) continue;
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
 
    if(z < 70)
    {
      SetPlayerHealth(playerid, 0);
    }
    return 1;
  }
}
Reply


Messages In This Thread
My questions here. (please have a look here, this will be updated frequently) - by [dN]Eagle - 23.01.2010, 08:47
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 08:51
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 08:53
Re: Kill players when they are lower then "Z.Z" - by mansonh - 23.01.2010, 09:00
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 09:11
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 09:13
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 09:15
Re: Kill players when they are lower then "Z.Z" - by mansonh - 23.01.2010, 09:18
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 09:53
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 09:55
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 10:00
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 10:03
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 10:07
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 10:12
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 10:17
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 10:49
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 11:24
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 11:36
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 11:42
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 12:23
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 12:29
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 12:56
Re: Kill players when they are lower then "Z.Z" - by [dN]Eagle - 23.01.2010, 13:38
Re: Kill players when they are lower then "Z.Z" - by llama - 23.01.2010, 16:14
Re: I'll post my questions here (former topic : the kill players.... then "Z.Z") - by [dN]Eagle - 23.01.2010, 16:15

Forum Jump:


Users browsing this thread: 1 Guest(s)