[HELP] AttachTrailerToVehicle don't work
#1

Hi!
I need ur help. I'm working on a race system. I want to make a "Roadtrain Race", where U get in a Roadtrain and there is a trailer, which attached to the truck. I'm using AttachTrailerToVehicle command.
Code:
pawn Код:
Vehicles[RaceID][e] = CreateVehicle(VPos[RaceID][e][mID],VPos[RaceID][e][PosX],VPos[RaceID][e][PosY],VPos[RaceID][e][PosZ],VPos[RaceID][e][Angle],-1,-1, 3000);
    Trailers[RaceID][e] = CreateVehicle(TrailerPos[RaceID][e][mID],0,0,0,0,-1,-1, 3000);
    AttachTrailerToVehicle(Trailers[RaceID][e], Vehicles[RaceID][e]);
    TogglePlayerControllable(Racers[e][pID], false);
It sets the trailer's position behind the truck but it doesn't attach it. If the count down went down I allow players to move(TogglePlayerControllable(Racers[e][pID], true)) and if I wait 4-5 secs the trailer will be attached, and it moves with the truck.

Thanx for ur help!
Reply
#2

Anyone?
Reply
#3

i think ive seen you on Cbs CnR...
Reply
#4

Quote:
Originally Posted by <__Ǝthan__>
i think ive seen you on Cbs CnR...
And that is to do with this why?

I dont think trailers are synced, I may be wrong but if they arnt then thats why it dont work
Reply
#5

So what to do now?
I want to make them attached with the trucks. And they're behind the trucks, so AttachTrailerToVehicle do half work, because it isn't attaching it.

Sorry, for my bad english.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)