05.04.2012, 02:34
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
Please Help Me Please
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