Attach object to vehicle problem
#1

I tried attaching object to a vehicle but without success.
Here's the code.
Код:
SignalObj = AttachObjectToVehicle(SignalObj, 1, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
What I am trying to do is that I am trying to attach to vehicle that player is inside. Like if I am inside of some vehicle I can use this. I have whole command made and everything but just this AttachObjectToVehicle ain't working normally
Reply
#2

Read the what the wiki says, you have to create the object first!
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
Reply
#3

check the parameters of this function again

pawn Код:
AttachObjectToVehicle(objectid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:RotZ)
Reply
#4

@Virtual1ty can't you read? I wrote that I made all just I need that fixed. I need that it stacks for EVERY vehicle. I mean if I am in vehicle ID:5 it will add to it. I dont want to add each ID to the script.

I need vehicleid defined somehow... That's what's my main problem
Reply
#5

Quote:
Originally Posted by Twinki1993
Посмотреть сообщение
@Virtual1ty can't you read? I wrote that I made all just I need that fixed. I need that it stacks for EVERY vehicle. I mean if I am in vehicle ID:5 it will add to it. I dont want to add each ID to the script.

I need vehicleid defined somehow... That's what's my main problem
So what vehicles shall got this object attached?
I dont get u fully atm, sorry
Reply
#6

You sir, obviously can't read. I just pointed you in the right way, the wiki page explains it all. Also, you can use variables to point to vehicle id's.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)