Attach object to vehicle :S
#1

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);
Reply
#2

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

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>
Reply
#4

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

ummmm it should show up
Reply
#6

it does not tho
Reply
#7

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>
Reply
#8

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
Reply
#9

should thatw ork in ongamemodeinit ?
Reply
#10

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
       
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)