Linking a vehicle to an interior in a doors system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Linking a vehicle to an interior in a doors system (
/showthread.php?tid=444605)
Linking a vehicle to an interior in a doors system -
Stanford - 17.06.2013
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
Re: Linking a vehicle to an interior in a doors system -
Stanford - 17.06.2013
Please delete this the problem solved successfully, thanks anyway!