18.05.2011, 10:47
Ok, I found out that I should add if(IsPlayerInRangeOfPoint(playerid, range, x, y, z)).
But somewhat my commands do not work. Once I use /enter, I can't use /exit. Is the return the problem?
But somewhat my commands do not work. Once I use /enter, I can't use /exit. Is the return the problem?
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10, 1866.1990966797,-1760.0908203125,13.546875))
{
SetPlayerPos(playerid,-1747.0718994141,987.37799072266,18.087209701538);
return 1;
}
return 1;
}
if (strcmp("/exit", cmdtext, true, 5) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10, -1747.0718994141, 987.37799072266, 18.087209701538))
{
SetPlayerPos(playerid,1866.1990966797,-1760.0908203125,13.546875);
return 1;
}
return 1;
}
return 1;
}