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



Attach object to vehicle :S - [LHT]Bally - 08.01.2012

how would i attach a object to this vehicle say a siren ?

pawn Код:
LastVehicleID = Vehicle_AddStatic(VehiclePoliceLVPD, 2282.0, 2477.0, 11.0, 180, random(126), random(126), 600);



Re: Attach object to vehicle :S - V_LOPE - 08.01.2012

I think this is good
https://sampforum.blast.hk/showthread.php?tid=206939


Re: Attach object to vehicle :S - [LHT]Bally - 08.01.2012

i got this code for adding it somewhere but where do i add it all

pawn Код:
new light = CreateObject( 18646,0,0,0,0,0,0,80 ); // <iVO>
AttachObjectToVehicle( light, GetPlayerVehicleID(playerid), 0.300000, -0.100000, 0.699999, 0.000000, 0.000000, 0.000000 ); // <iVO>



Re: Attach object to vehicle :S - [LHT]Bally - 08.01.2012

added it to my gamemode but it dont show up in game?


Re: Attach object to vehicle :S - Hugo1984 - 08.01.2012

ummmm it should show up


Re: Attach object to vehicle :S - [LHT]Bally - 09.01.2012

it does not tho


Re: Attach object to vehicle :S - [LHT]Bally - 09.01.2012

i get this error when i put in Onfilterscriptinit
pawn Код:
C:\Documents and Settings\BaLLy\Desktop\The Original\filterscripts\VIP.pwn(192) : error 017: undefined symbol "playerid"
this is the error line
pawn Код:
AttachObjectToVehicle( light, GetPlayerVehicleID(playerid), 0.300000, -0.100000, 0.699999, 0.000000, 0.000000, 0.000000 ); // <iVO>



Re: Attach object to vehicle :S - Outcast - 09.01.2012

pawn Код:
new light = CreateObject( 18646,0,0,0,0,0,0,80 ); // <iVO>
AttachObjectToVehicle( light, LastVehicleID, 0.300000, -0.100000, 0.699999, 0.000000, 0.000000, 0.000000 ); // <iVO



Re: Attach object to vehicle :S - [LHT]Bally - 09.01.2012

should thatw ork in ongamemodeinit ?


Re: Attach object to vehicle :S - Outcast - 09.01.2012

pawn Код:
OnGameModeInit()
{
         new LastVehicleID1 = Vehicle_AddStatic(VehiclePoliceLVPD, 2282.0, 2477.0, 11.0, 180, random(126), random(126), 600);
         new light1 = CreateObject( 18646,0,0,0,0,0,0,80 ); // <iVO>
         AttachObjectToVehicle( light1, LastVehicleID1, 0.300000, -0.100000, 0.699999, 0.000000, 0.000000, 0.000000 ); // <iVO
       
}