[Tutorial] Introduction to some awesome-yet-unknown-to-many functions/callbacks
#2

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);
Same for OnPlayerClickMap, the Z coordinate is only accurate, if the X/Y coordinates are in a specific range of the player.
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
Reply


Messages In This Thread
Introduction to some awesome-yet-unknown-to-many functions/callbacks - by CreativityLacker - 24.02.2013, 13:47
AW: Introduction to some awesome-yet-unknown-to-many functions/callbacks - by NaS - 24.02.2013, 20:36
Re: AW: Introduction to some awesome-yet-unknown-to-many functions/callbacks - by CreativityLacker - 25.02.2013, 07:48

Forum Jump:


Users browsing this thread: 1 Guest(s)