28.04.2012, 18:24
Proper indentation will help avoid these errors.
That should be inside OnPlayerCommandText. In your version the "/exit" command will never be executed since its inside the "/enter" command.
pawn Код:
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, -207.19999695,1119.19995117,20.10000038) )
{
SetPlayerPos(playerid, -2158.80004883,642.90002441,1052.00000000);
SetPlayerInterior(playerid, 1);
GameTextForPlayer(playerid,"~b~DMV ~w~Office", 3000, 4);
return 1;
}
}
else if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, -2158.80004883,642.90002441,1052.00000000) )
{
SetPlayerPos(playerid, -207.19999695,1119.19995117,20.10000038);
SetPlayerInterior(playerid, 0);
return 1;
}
}