Posts: 435
Threads: 82
Joined: Jan 2008
Reputation:
0
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
Posts: 2,593
Threads: 38
Joined: Aug 2007
Reputation:
0
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.
Posts: 435
Threads: 82
Joined: Jan 2008
Reputation:
0
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?
Posts: 2,593
Threads: 38
Joined: Aug 2007
Reputation:
0
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.
Posts: 435
Threads: 82
Joined: Jan 2008
Reputation:
0
well i find it ugly to see that you spawn there first en then on the location, so setspawninfo could fix that?