Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

AttachTrailerToVehicle

$
0
0
The trailer is not attaching,it spawns right to the car,but not attaching

PHP Code:

else if(IsPlayerInRangeOfPoint(playerid50, -75.0189,-1121.8265,0.8185) && PlayerData[playerid][Job] == 5//&& //StaticVeh[vehicleid][vJob] == 5)
    
{//Trucker
        
new randn random(sizeof(TruckerCP));
        
SetPlayerCheckpoint(playeridTruckerCP[randn][0], TruckerCP[randn][1], TruckerCP[randn][2], 4.0);
        
SetDestination(playeridTruckerCP[randn][0], TruckerCP[randn][1], TruckerCP[randn][2]);
        
PTruckerCP[playerid] = randn;
        
VJob[playerid] = CreateVehicle(515, -75.0189,-1121.8265,0.8185+10,171.193211, -1);
        new 
Float:Pos[3], Float:rotationtrailer;
        
GetVehiclePos(VJob[playerid], Pos[0], Pos[1], Pos[2]);
        
GetVehicleZAngle(Vjob[playerid] ,rotationtrailer);
        
TrailerID[playerid] = CreateVehicle(435Pos[0]+6Pos[1]+6Pos[2]+6rotationtrailer11, -1);
        
AttachTrailerToVehicle(TrailerID[playerid], VJob[playerid]);
        
SendClientMessage(playeridCOLOR_YELLOW"Take a trailer and deliver to the checkpoint!");
        new 
enginelightsalarmdoorsbonnetbootobjective;
        
GetVehicleParamsEx(VJob[playerid], enginelightsalarmdoorsbonnetbootobjective);
        
SetVehicleParamsEx(VJob[playerid], enginelightsalarm1bonnetbootobjective);
        
PutPlayerInVehicle(playeridVJob[playerid], 0);
    } 


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>