Going into a interior is messing up a little bit
#1

Ok so pretty much i made it so you have to press C to go into a interior


My problem is when i go up to the door and press C i go in there and come straight back out and its only luck if i can stay in that interior is there any way to stop this happening


pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_CROUCH)
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 1554.5713,-1675.6034,16.1953))
    {
            SetPlayerPos(playerid, 246.4274,107.8742,1003.2188);
            SetPlayerInterior(playerid, 10);
            return 0;
    }
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 1119.1348,-1370.0374,13.9844))
    {
            SetPlayerPos(playerid, 204.3374,-168.5418,1000.5234);
            SetPlayerInterior(playerid, 14);
            SendClientMessage(playerid, 0xFF9900AA, " You have entered an interior /help for a list of commands ");
            return 0;
    }
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 1366.3108,-1279.5417,13.5469))
    {
            SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625);
            SetPlayerInterior(playerid, 1);
            return 0;
    }
    } else
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.0, 286.15,-40.64,1001.52))
        {
            SetPlayerPos(playerid, 1367.97,-1279.76,13.55);
            SetPlayerInterior(playerid, 0);
            return 1;
        }
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 204.3374,-168.5418,1000.5234))
        {
            SetPlayerPos(playerid, 1119.1348,-1370.0374,13.9844);
            SetPlayerInterior(playerid, 0);
            return 1;
        }
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 246.4274,107.8742,1003.2188))
        {
            SetPlayerPos(playerid, 1554.5713,-1675.6034,16.1953);
            SetPlayerInterior(playerid, 0);
            return 1;
        }
    }
}

Please Help Me Please
Reply
#2

you made an exit point ?
Reply
#3

Quote:
Originally Posted by axxelac
Посмотреть сообщение
you made an exit point ?
What you mean


I have made it so if you press c and your in side you go out


Please Help Me Please
Reply
#4

You could set a timer along with a variable so they have to wait to teleport again. That would prevent them from being accidently teleported upon entry.
Reply
#5

make sure you dont put the range point on same coord as you go out if not tell me
Reply
#6

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
You could set a timer along with a variable so they have to wait to teleport again. That would prevent them from being accidently teleported upon entry.
How would i do that


Please Help Me Please
Reply
#7

Quote:
Originally Posted by axxelac
Посмотреть сообщение
make sure you dont put the range point on same coord as you go out if not tell me
The range point is not the same as the coordinates


Please Help Me Please
Reply
#8

@Scripter12345.

I'd Say you have a Readup on Timers.

Also, What do you Mean its Messing Up?
I Can't Really Understand you that Well...


Ezay
\o/
Reply
#9

Quote:
Originally Posted by Ezay
Посмотреть сообщение
@Scripter12345.

I'd Say you have a Readup on Timers.

Also, What do you Mean its Messing Up?
I Can't Really Understand you that Well...


Ezay
\o/
I mean when i am running and hit c to go into a interior


When i get in the interior it just puts me straight back out


Please Help Me Please
Reply
#10

Comment your Coding(s).

So i Can See,

Entrance Point : eg. /* LSPD Entrance */
Exit Point: eg. /* LSPD Exit */
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)