SA-MP Forums Archive
spawn goes very wrong - 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: spawn goes very wrong (/showthread.php?tid=88155)



spawn goes very wrong - hipy - 24.07.2009

Hi, when i want to spawn a person at a certain z level( he may not go under that z level ) they are first spawned in that lv hotel with escalator and then at the place i want, this happens in fraction of seccond but its enough to get under the z level and things happen i dont want , how you fix that


Re: spawn goes very wrong - hipy - 24.07.2009

anybody?


Re: spawn goes very wrong - Joe Staff - 24.07.2009

So you have a script that does something when a player is under a certain altitude (z level)? Just use a Boolean variable to disable it until the player is positioned in the correct place.


Re: spawn goes very wrong - hipy - 24.07.2009

ye but i dont see what happens with my script at other servers, i mean do you see everytime you spawn first that lv hotel with escalators for a short 10th of a a second?


Re: spawn goes very wrong - Joe Staff - 24.07.2009

I don't play sa-mp anymore, so no, but I do know what you're talking about. Spawning there is set with 'SetSpawnInfo', then the script has the position changed under 'OnPlayerStateChange' with the conditional of "newstate == PLAYER_STATE_SPAWN." It's wiser for you to just make a Boolean variable.


Re: spawn goes very wrong - hipy - 24.07.2009

well i find it ugly to see that you spawn there first en then on the location, so setspawninfo could fix that?