04.10.2009, 09:41
i have this code:
i 0.2X Teleport with trailer works good. In 0.3 wont teleport with trailer :S
Код:
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); if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { AttachTrailerToVehicle(GetVehicleTrailer(GetPlayerVehicleID(playerid)),GetPlayerVehicleID(playerid)); } } else { SetPlayerPos(playerid, Float:Px, Float:Py, Float:Pz); SetPlayerFacingAngle(playerid, Float:Pa); SetCameraBehindPlayer(playerid); } return 1; }