How can I make a Tractor attaching a Farm Trailer, with a command. Maybe an example would be great
pawn Код:
CMD:attachtrailer(playerid, params[])
{
new trailerid, tractorid;
new Float:pos[4];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
tractorid = CreateVehicle(531, pos[0], pos[1], pos[2], pos[3], 0, 0, -1);
trailerid = CreateVehicle(610, pos[0], pos[1]+5, pos[2]+5, pos[3], 0, 0, -1);
AttatchTrailerToVehicle(trailerid, tractorid);
PutPlayerInVehicle(playerid, tractorid, 0);
return 1;
}