04.10.2009, 20:50
! How to do that? I tried the most different things :S
You maybe mean this?:
If you mean this, its the same problem.
You maybe mean this?:
pawn Code:
stock TeleportWithVehicleTrailer(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
return SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command.");
SetVehiclePos(GetPlayerVehicleID(playerid), Float:Vx, Float:Vy, Float:Vz);
SetVehicleZAngle(GetPlayerVehicleID(playerid),Float:Va);
SetCameraBehindPlayer(playerid);
SetVehiclePos(GetVehicleTrailer(GetPlayerVehicleID(playerid)), Float:Vx, Float:Vy, Float:Vz);
SetVehicleZAngle(GetVehicleTrailer(GetPlayerVehicleID(playerid)), Float:Va);
AttachTrailerToVehicle(GetVehicleTrailer(GetPlayerVehicleID(playerid)),GetPlayerVehicleID(playerid)); // this is on the last line
}
else
{
SetPlayerPos(playerid, Float:Px, Float:Py, Float:Pz);
SetPlayerFacingAngle(playerid, Float:Pa);
SetCameraBehindPlayer(playerid);
}
return 1;
}
If you mean this, its the same problem.