interior problem
#1

So, I've created interior system with stock but I have a problem with /enter and /exit.
When I /enter in one interior and I do /exit, it'll teleport me infront of another interior..

This is enter:
pawn Код:
CMD:enter(playerid,params[])
{
    for(new x=0; x < MAX_INTS; x++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, InterInfo[x][EnterPos][0], InterInfo[x][EnterPos][1], InterInfo[x][EnterPos][2]))
        {
            SendClientMessage(playerid, BLUE, "You have entered the interior successfully. /exit to leave it.");
            SetPlayerInterior(playerid, InterInfo[x][Interiorid]);
            SetPlayerPos(playerid, InterInfo[x][IntPos][0], InterInfo[x][IntPos][1], InterInfo[x][IntPos][2]);
        }
    }
    return 1;
}
And this is exit:
pawn Код:
CMD:exit(playerid,params[])
{
    for(new x=0; x < MAX_INTS; x++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, InterInfo[x][IntPos][0], InterInfo[x][IntPos][1], InterInfo[x][IntPos][2]))
        {
            SendClientMessage(playerid, BLUE, "You have left the interior successfully. /enter to enter it.");
            SetPlayerPos(playerid, InterInfo[x][EnterPos][0], InterInfo[x][EnterPos][1], InterInfo[x][EnterPos][2]);
            SetPlayerInterior(playerid, 0);
        }
    }
    return 1;
}
Any solution?
Reply


Messages In This Thread
interior problem - by LocMax - 23.02.2014, 18:59
Re: interior problem - by LocMax - 23.02.2014, 19:02
Re: interior problem - by LocMax - 23.02.2014, 19:11
Re: interior problem - by FilesMAker - 23.02.2014, 19:18
Re: interior problem - by RealHobo009 - 23.02.2014, 19:30
Re: interior problem - by LocMax - 23.02.2014, 19:33
Re: interior problem - by RealHobo009 - 23.02.2014, 19:36
Re: interior problem - by FilesMAker - 23.02.2014, 19:42
Re: interior problem - by RealHobo009 - 23.02.2014, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)