Z limit thing xD
#1

I want to make when someones hits the water he respawns. I already searched but can't find anything
Reply
#2

maybe you can work with GetPlayerPos and getting the Z position of a player, if the Z pos is < as 0 SpawnPlayer(playerid);
Reply
#3

I attempted to make on. This is my result:
pawn Код:
forward respawn(playerid);
public respawn(playerid)
{
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    if(GetPlayerPos(playerid, X,Y,Z)
    OnPlayerSpawn(playerid);
    return 1;
}
But. i don't what the coordinates are for if someone falls in water he respawns. for Z
Reply
#4

Quote:
Originally Posted by ReteLikker
I want to make when someones hits the water he respawns. I already searched but can't find anything
I think that would be impossible to make, why.. because when you are at some fluid surface
(read about it somewhere) it always returns the position as '0', also because of the waves
on the water it would be IMPOSSIBLE to make this.
Reply
#5

It is possible. i saw it on more servers
Reply
#6

Quote:
Originally Posted by ReteLikker
It is possible. i saw it on more servers
Yes well.. probably with world-boundaries || zones, or stuff like that.
Reply
#7

Just. if you fall/hit the water (coordinate thing) you will respawn. I seen it on more servers lol. Hope somebody can help me
Reply
#8

pawn Код:
forward SomeCheckTimer();
public SomeCheckTimer()
{
  new Float:unused, Float:z;
  for (new i = 0; i < MAX_PLAYERS; i++)
  {
    if (GetPlayerPos(i, unused, unused, z))
    {
      if (z < 0.1)
      {
        SetPlayerHealth(i, 0);
      }
    }
  }
}
Reply
#9

Thanks MaVe;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)