08.02.2018, 16:52
The trailer is not attaching,it spawns right to the car,but not attaching
PHP код:
else if(IsPlayerInRangeOfPoint(playerid, 50, -75.0189,-1121.8265,0.8185) && PlayerData[playerid][Job] == 5) //&& //StaticVeh[vehicleid][vJob] == 5)
{//Trucker
new randn = random(sizeof(TruckerCP));
SetPlayerCheckpoint(playerid, TruckerCP[randn][0], TruckerCP[randn][1], TruckerCP[randn][2], 4.0);
SetDestination(playerid, TruckerCP[randn][0], TruckerCP[randn][1], TruckerCP[randn][2]);
PTruckerCP[playerid] = randn;
VJob[playerid] = CreateVehicle(515, -75.0189,-1121.8265,0.8185+10,171.1932, 1, 1, -1);
new Float:Pos[3], Float:rotationtrailer;
GetVehiclePos(VJob[playerid], Pos[0], Pos[1], Pos[2]);
GetVehicleZAngle(Vjob[playerid] ,rotationtrailer);
TrailerID[playerid] = CreateVehicle(435, Pos[0]+6, Pos[1]+6, Pos[2]+6, rotationtrailer, 1, 1, -1);
AttachTrailerToVehicle(TrailerID[playerid], VJob[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, "Take a trailer and deliver to the checkpoint!");
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(VJob[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(VJob[playerid], engine, lights, alarm, 1, bonnet, boot, objective);
PutPlayerInVehicle(playerid, VJob[playerid], 0);
}