Linking a vehicle to an interior in a doors system
#1

Recently, I have made a doors system and I decided to do a vehicleable feature for doors, the problem that when I set it and everything while in a car it doesnt go to the interior of the door it just goes somewhere near the interior .here's the entering command (doors part)

pawn Код:
for(new idxB=0; idxB<MAX_DOORS; idxB++) // Dynamic Doors
            {
                if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[idxB][dOX], DoorInfo[idxB][dOY], DoorInfo[idxB][dOZ]))
                {
                    if(DoorInfo[idxB][ddVehicleAble] > 0 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                    {
                        SetVehiclePos(GetPlayerVehicleID(playerid), DoorInfo[idxB][dIX],DoorInfo[idxB][dIY],DoorInfo[idxB][dIZ]);
                        LinkVehicleToInterior(GetPlayerVehicleID(playerid), DoorInfo[idxB][dIInt]);
                        SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), DoorInfo[idxB][dIVW]);
                        SetVehicleZAngle(GetPlayerVehicleID(playerid), DoorInfo[idxB][dIA]);
                    }
                    else
                    {
                        SetPlayerInterior(playerid, DoorInfo[idxB][dIInt]);
                        SetPlayerVirtualWorld(playerid, DoorInfo[idxB][dIVW]);
                        SetPlayerFacingAngle(playerid, DoorInfo[idxB][dIA]);
                        SetCameraBehindPlayer(playerid);
                        Pause(playerid);
                        SetPlayerPos(playerid, DoorInfo[idxB][dIX], DoorInfo[idxB][dIY], DoorInfo[idxB][dIZ]);
                        return 1;
                    }
                }
            }
Thanks in advance, all the other parts work perfectly as I tested them
Reply
#2

Please delete this the problem solved successfully, thanks anyway!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)