Quote:
Originally Posted by trapstar2020
are u inrange of where u want to enter/exit? cuz u have Messages telling u ur not there so i guess ur not in the area
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1284.6202,-1585.2909,13.5469))
see that if the player isnt 3foot steps away from the position u cannot enter
REP++
|
Did you even read what the problem was?
Change this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/enter", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1366.3108,-1279.5417,13.5469))
{
SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625);//AmmunationEntrance
SetPlayerInterior(playerid, 1);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2229.5374,-1721.7302,13.5658))
{
SetPlayerPos(playerid, 773.579956,-77.096694,1000.655029);//GantonGymEntrance
SetPlayerInterior(playerid, 7);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1284.6202,-1585.2909,13.5469))
{
SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);//LicenseCenterEntrance
SetPlayerInterior(playerid, 3);
}
}
if(!strcmp(cmdtext, "/exit", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
{
SetPlayerPos(playerid, 1366.3108,-1279.5417,13.5469);//AmmunationExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
{
SetPlayerPos(playerid, 1366.3108,-1279.5417,13.5469);//AmmunationExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 773.579956,-77.096694,1000.655029))
{
SetPlayerPos(playerid, 2229.5374,-1721.7302,13.5658);//GantonGymExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, -2029.798339,-106.675910,1035.171875))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1284.6202,-1585.2909,13.5469);//LicenseCenterExit
}
}
return 1;
}
To this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/enter", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1366.3108,-1279.5417,13.5469))
{
SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625);//AmmunationEntrance
SetPlayerInterior(playerid, 1);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2229.5374,-1721.7302,13.5658))
{
SetPlayerPos(playerid, 773.579956,-77.096694,1000.655029);//GantonGymEntrance
SetPlayerInterior(playerid, 7);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1284.6202,-1585.2909,13.5469))
{
SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);//LicenseCenterEntrance
SetPlayerInterior(playerid, 3);
}
return 1;
}
if(!strcmp(cmdtext, "/exit", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
{
SetPlayerPos(playerid, 1366.3108,-1279.5417,13.5469);//AmmunationExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
{
SetPlayerPos(playerid, 1366.3108,-1279.5417,13.5469);//AmmunationExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 773.579956,-77.096694,1000.655029))
{
SetPlayerPos(playerid, 2229.5374,-1721.7302,13.5658);//GantonGymExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, -2029.798339,-106.675910,1035.171875))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1284.6202,-1585.2909,13.5469);//LicenseCenterExit
}
return 1;
}
return 0;
}