25.02.2013, 07:48
Quote:
SetPlayerPosFindZ is not working serverwise, it is working clientside, thats why it is not possible to get any information out of it.
It is not working with NPCs, because NPCs are no real clients. Furthermore, it is not working very accurate. If the position you are setting a player to is NOT rendered by the client, the player will not get set exactly on the ground (he will spawn too high or underneath the map). You should use the function like this to make it work correctly in every area: Код:
SetPlayerPos(playerid, x, y, z); Set a timer about 100-200ms (or even shorter) to let the client render the zone and THEN use FindZ afterwards: SetPlayerPosFindZ(playerid, x, y, z); You could use the above "script" to make an easy (admin) teleporter for a debug script. Btw, nice tutorial, I think it will remember some people of these functions and callbacks and other players will get to know them. I wrote this so you could maybe write the above things into your post, otherwise some players may think the function may be not working like it should, although it is a VERY useful thing as you said. Greets |
Added your reply to the main post