SA-MP Forums Archive
attached object to vehicle - 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: attached object to vehicle (/showthread.php?tid=423257)



attached object to vehicle - Crossfire1989 - 17.03.2013

yes im wondering on how to make a lightbar appear as this server did on theres, when the car moved the lightbar moves with it, i have seen this done on multiple servers but do not know how to do it, can someone please tell me how to make this happen?


here is a screenshot




when i get in this car the lightbar attached follows it, so again my ? is how to make this happen in a server i am making?


the picture used is from another server used as an example


will give reps as to who can help me


Re: attached object to vehicle - mastermax7777 - 17.03.2013

https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

and CreateObject id 19419 or 19420 not sure


Re: attached object to vehicle - Crossfire1989 - 17.03.2013

would that move with the vehicle as i drive?


Re: attached object to vehicle - mastermax7777 - 17.03.2013

yes . it does . thats the point of the whole function


Re: attached object to vehicle - Crossfire1989 - 17.03.2013

now if i add that to one model does it add it to all the models with the same id? , because i want to add a Yosemite to the police department, but still be able to have civilian Yosemite\'s also , is that possible for the attach object to vehicle function?


Re: attached object to vehicle - mastermax7777 - 17.03.2013

Yes.. if u read the wiki.. it says


vehicleid - The ID of the vehicle to attach the object to. (unique to each vehicle)


Also its called AttachObjectToVehicle not VehicleModel xd