Dynamic Door /enter and /exit issue.
#1

I have gotten through all my other problems in this system and look to hopefully finish this by tonight.

I have came across an issue where I can only enter and exit a dynamic door when I create it. Once the server restarted I would have to create the door again to be able to use it. I checked to see if everything was saving and it is. I also checked to see if the interior choords are there ( the location where the door will teleport you to) and they are there:





Now what could possibly be the issue?

Here is my enter and exit command:

pawn Код:
CMD:enter(playerid,params[])
{
    new inter = GetPlayerInterior(playerid);
    new vir = GetPlayerVirtualWorld(playerid);
    foreach(Doors, i)
    {
        if(PlayerToPoint(2.0, playerid, DoorData[i][dExteriorX], DoorData[i][dExteriorY], DoorData[i][dExteriorZ]) && inter == DoorData[i][dExteriorInt] && vir == DoorData[i][dExteriorVW])
        {
       
            SetPlayerInterior(playerid, DoorData[i][dInteriorInt]);
            SetPlayerPos(playerid, DoorData[i][dInteriorX], DoorData[i][dInteriorY], DoorData[i][dInteriorZ]);
            SetPlayerVirtualWorld(playerid, DoorData[i][dInteriorVW]);

        }
        else
        {
            SendClientMessage(playerid,COLOR_GREY,"No door in range.");
        }
    }
    return 1;
}

CMD:exit(playerid,params[])
{
   
    new inter = GetPlayerInterior(playerid);
    new vir = GetPlayerVirtualWorld(playerid);
    foreach(Doors, i)
    {
        if(PlayerToPoint(2.0, playerid, DoorData[i][dInteriorX], DoorData[i][dInteriorY], DoorData[i][dInteriorZ]) && inter == DoorData[i][dInteriorInt] && vir == DoorData[i][dInteriorVW])
        {
            SetPlayerPos(playerid, DoorData[i][dExteriorX], DoorData[i][dExteriorY], DoorData[i][dExteriorZ]);
            SetPlayerInterior(playerid, DoorData[i][dExteriorInt]);
            SetPlayerVirtualWorld(playerid, DoorData[i][dExteriorVW]);
        }
        else
        {

        }
    }
    return 1;
}
Reply


Messages In This Thread
Dynamic Door /enter and /exit issue. - by Shockey HD - 04.04.2013, 21:10
Re: Dynamic Door /enter and /exit issue. - by !Junior! - 04.04.2013, 22:23
Re: Dynamic Door /enter and /exit issue. - by Shockey HD - 04.04.2013, 22:53
Re: Dynamic Door /enter and /exit issue. - by drichie - 04.07.2013, 12:45

Forum Jump:


Users browsing this thread: 2 Guest(s)