Z limit thing xD - 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: Z limit thing xD (
/showthread.php?tid=125608)
Z limit thing xD -
~Dangun! - 04.02.2010
I want to make when someones hits the water he respawns. I already searched but can't find anything
Re: Z limit thing xD -
thiaZ_ - 04.02.2010
maybe you can work with GetPlayerPos and getting the Z position of a player, if the Z pos is < as 0 SpawnPlayer(playerid);
Re: Z limit thing xD -
~Dangun! - 05.02.2010
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
Re: Z limit thing xD -
Virtual1ty - 05.02.2010
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.
Re: Z limit thing xD -
~Dangun! - 05.02.2010
It is possible. i saw it on more servers
Re: Z limit thing xD -
Virtual1ty - 05.02.2010
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.
Re: Z limit thing xD -
~Dangun! - 05.02.2010
Just. if you fall/hit the water (coordinate thing) you will respawn. I seen it on more servers lol. Hope somebody can help me
Re: Z limit thing xD -
Streetplaya - 05.02.2010
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);
}
}
}
}
Re: Z limit thing xD -
~Dangun! - 05.02.2010
Thanks MaVe;