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
#2

The problem is that your script doesn't automatically save the DD, you would have to get a new Dynamic Door System, because the one you have is very buggy.


Please don't forget to Rep
Reply
#3

That wasn't the issue, the issue was the loop.


Though I have gotten a new issue with the loading of interiors.


It seems that everytime i try to save a interior to MySql I get this:
Код:
[19:16:53] >> mysql_fetch_field_row( Connection handle: 1 )

[19:16:53] CMySQLHandler::FetchField("ExteriorInt") -
Any idea why?
Reply
#4

i have the same problem with this but its in my dynamic rob point system ...and for doors i use key to enter and exit so didnt experience this prob with my dynamic door system
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)