Help with AttachTrailerToVehicle..
#1

PHP код:
        new Float:xFloat:yFloat:z;
        
SendClientMessage(playerid,COLOR_CARROT,"[HQ] Alright, you have the load, now drop it off at Idlewood Gas.");
        
GetPlayerPos(playerid,x,y,z);
        
trailer CreateVehicle(584,x,y-10,z,91.2363,-1,-1,1);
        
AttachTrailerToVehicle(trailer,GetPlayerVehicleID(playerid));
        
truckcp[playerid] = 2;
        
SetPlayerCheckpoint(playerid,1921.7677,-1793.5906,13.0875,5.0); 
trailer is a global variable which is new trailer; at the top of my script, problem is the trailer doesnt get attached to the truck, rep++ for help.
Reply
#2

It might be an issue with syncronization, what you should do is link the vehicle in OnVehicleStreamIn (assuming that created vehicles call this callback)
Reply
#3

Alright, but how would I do this? Haven't used OnvehicleStreamIn Ever x.x
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)