17.01.2012, 20:19
When I relog, I cannot /exit an interior if I logged inside of one.
Here is the /exit command
Please help.
Here is the /exit command
pawn Код:
CMD:exit(playerid, params[])
{
for(new index = 0; index < sizeof(DoorInfo); index++)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,DoorInfo[index][ddInteriorX],DoorInfo[index][ddInteriorY],DoorInfo[index][ddInteriorZ]) && GetPlayerVirtualWorld(playerid) == DoorInfo[index][ddIntVW] && GetPlayerInterior(playerid) == DoorInfo[index][ddInt])
{
SetPlayerInterior(playerid,DoorInfo[index][ddExtInt]);
SetPlayerVirtualWorld(playerid,DoorInfo[index][ddExtVw]);
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && DoorInfo[index][ddVehicleAble] > 0)
{
new vid = GetPlayerVehicleID(playerid);
SetVehiclePos(vid,DoorInfo[index][ddExteriorX],DoorInfo[index][ddExteriorY],DoorInfo[index][ddExteriorZ]);
SetVehicleZAngle(vid,DoorInfo[index][ddExteriorA]);
SetVehicleVirtualWorld(vid,DoorInfo[index][ddExtVw]);
LinkVehicleToInterior(vid,DoorInfo[index][ddExtInt]);
return 1;
}else{
SetPlayerPos(playerid,DoorInfo[index][ddExteriorX],DoorInfo[index][ddExteriorY],DoorInfo[index][ddExteriorZ]);
SetPlayerFacingAngle(playerid,DoorInfo[index][ddExteriorA]);
}
}
}
return 1;
}