SA-MP Forums Archive
Building Floats - 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: Building Floats (/showthread.php?tid=653587)



Building Floats - NoteND - 07.05.2018

Hey!

Just wondering, is there any way like an include or something that would get all the buildings or most of them, floats in front of building, so I could make a pickup there which would later be used to enter a house / building.. or would you actually have to go one by one and save coordinates of buildings..


Re: Building Floats - Pottus - 08.05.2018

You could go through all the models you want and save offsets based on the model then use the allobject array to translate your offsets for every instance of an object in game.

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

https://pastebin.com/2E1zvxn7
Specifically the function at line 509
Код:
AttachObjectToObjectEx(attachoid, Float:off_x, Float:off_y, Float:off_z, Float:rot_x, Float:rot_y, Float:rot_z, &Float:X, &Float:Y, &Float:Z, &Float:RX, &Float:RY, &Float:RZ, pobject = -1) // By Stylock - http://forum.sa-mp.com/member.php?u=114165