SA-MP Forums Archive
problem buildings - 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)
+--- Thread: problem buildings (/showthread.php?tid=485562)



problem buildings - JacobWilkerson - 04.01.2014

When I teleported inside a building based on GTA instead of being on the floor I am completely bugged, how to solve it?

Here's a picture:

http://www.upimg.fr/ih/f3q1.png


Re : problem buildings - [HRD]Mar1 - 04.01.2014

Freeze player before the objects will be loaded.


Re: problem buildings - JacobWilkerson - 04.01.2014

not work.


Re: problem buildings - Mic_H - 04.01.2014

Can you explain more sir?..
Did you try to go to an interior or to Main World?


Re: problem buildings - JacobWilkerson - 05.01.2014

I pulled a building with map editor and I have took the center position (/ save), and I gave thereafter the buidling teleporting to coordinate saved before without the building and when I go it makes me worry about the screenshot when I should have feet on the ground and be surrounded by the building? ...


Re : problem buildings - [HRD]Mar1 - 05.01.2014

https://sampforum.blast.hk/showthread.php?tid=190556


Re: problem buildings - Mic_H - 05.01.2014

As [HRD]Mar1 said, new objects require time to load. It will take atleast 2-4 seconds for the new object to load. If you TP to the building before its loaded, you will spawn at the real SA object below it... Try this order.
under command -

SetPlayerPos(playerid, x,y,z+7.0);
TogglePlayerControllable(playerid, 0);
SetTimerEx("UnFreeze", 3000, false, "i", playerid);

public UnFreeze(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}


Or if this is much time consuming, try to TP player to SetPlayerPos(playerid, X, Y,Z+10.0)