Dynamic Door /enter and /exit issue. - 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: Dynamic Door /enter and /exit issue. (
/showthread.php?tid=428193)
Dynamic Door /enter and /exit issue. -
Shockey HD - 04.04.2013
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;
}
Re: Dynamic Door /enter and /exit issue. -
!Junior! - 04.04.2013
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
Re: Dynamic Door /enter and /exit issue. -
Shockey HD - 04.04.2013
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?
Re: Dynamic Door /enter and /exit issue. -
drichie - 04.07.2013
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