SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/04/2013, 10:10 PM   #1
Shockey HD
Gangsta
 
Shockey HD's Avatar
 
Join Date: Jul 2011
Posts: 684
Reputation: 14
Default Dynamic Door /enter and /exit issue.

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 Code:
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;
}
Shockey HD is offline   Reply With Quote
Old 04/04/2013, 11:23 PM   #2
!Junior!
Little Clucker
 
Join Date: Sep 2011
Posts: 5
Reputation: 0
Default Re: Dynamic Door /enter and /exit issue.

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
!Junior! is offline   Reply With Quote
Old 04/04/2013, 11:53 PM   #3
Shockey HD
Gangsta
 
Shockey HD's Avatar
 
Join Date: Jul 2011
Posts: 684
Reputation: 14
Default Re: Dynamic Door /enter and /exit issue.

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:
Code:
[19:16:53] >> mysql_fetch_field_row( Connection handle: 1 )

[19:16:53] CMySQLHandler::FetchField("ExteriorInt") -
Any idea why?
Shockey HD is offline   Reply With Quote
Old 04/07/2013, 01:45 PM   #4
drichie
Big Clucker
 
drichie's Avatar
 
Join Date: Jun 2012
Posts: 135
Reputation: 1
Default Re: Dynamic Door /enter and /exit issue.

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
__________________


drichie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Simple Entry and Exit Points [Adding icons + Creating /enter and /exit commands] zDevon Tutorials 19 18/07/2015 10:32 PM
When i enter a Dynamic Door my VIP room is bugged Eljayar Scripting Help 4 02/03/2012 04:42 PM
Yellow door Enter/Exit Ihsan_Cingisiz Help Archive 5 11/06/2010 03:00 PM
how to create an /exit and /enter command to enter an costum interior? sandisk125 Help Archive 5 18/08/2009 02:07 PM
Issue about /enter & /exit commands at an "i" icon Alice[WS] Help Archive 1 07/08/2009 09:18 PM


All times are GMT. The time now is 12:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.