Going into a interior is messing up a little bit -
Scripter12345 - 05.04.2012
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
Re: Going into a interior is messing up a little bit -
Chris1337 - 05.04.2012
you made an exit point ?
Re: Going into a interior is messing up a little bit -
Scripter12345 - 05.04.2012
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
Re: Going into a interior is messing up a little bit -
ReneG - 05.04.2012
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.
Re: Going into a interior is messing up a little bit -
Chris1337 - 05.04.2012
make sure you dont put the range point on same coord as you go out if not tell me
Re: Going into a interior is messing up a little bit -
Scripter12345 - 05.04.2012
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
Re: Going into a interior is messing up a little bit -
Scripter12345 - 05.04.2012
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
Re: Going into a interior is messing up a little bit -
Ezay - 05.04.2012
@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/
Re: Going into a interior is messing up a little bit -
Scripter12345 - 05.04.2012
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
Re: Going into a interior is messing up a little bit -
Ezay - 05.04.2012
Comment your Coding(s).
So i Can See,
Entrance Point : eg. /* LSPD Entrance */
Exit Point: eg. /* LSPD Exit */