CreateVehicle to AttachTrailerToVehicle sync is slow?
#1

Hey, I'm having alot of problems regarding AttachTrailerToVehicle, it cannot be used right after CreateVehicle.

I have even tried timers of 500 ms - 1.5 seconds to attach, yet it doesn't attach the created vehicle to the towtruck.

pawn Код:
PlayerInfo[playerid][pSpecial_Missile_Vehicle] = CreateVehicle(420, x, y, z + 10, angle, 0, 0, -1);
                                //LinkVehicleToInterior(PlayerInfo[playerid][pSpecial_Missile_Vehicle], INVISIBILITY_INDEX);
                                SetVehicleHealth(PlayerInfo[playerid][pSpecial_Missile_Vehicle], 2500.0);
                                AttachTrailerToVehicle(PlayerInfo[playerid][pSpecial_Missile_Vehicle], Current_Vehicle[playerid]);
Doesn't even attach, I think it spawns late also.

The vehicle that it is being attached to is a towtruck.

Any suggestions?
Reply
#2

Works fine for me (Tested 0.3e), but because some players have higher pings, I use a timer to save any problems.

Are you in the vehicle while attaching the trailer? Maybe try GetPlayerVehicleID().

Is the timer calling a public (forwarded) function? Try print(), printf().
Reply
#3

I'm using 0.3d R2

can I see the code you used?

Yes I'm in the vehicle, the new vehicle is being created just + z of my current vehicle.

Theres no timer currently.
Reply
#4

Yes, AttachTrailerToVehicle sync is slow. Confirmed
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)