Garage help
#2

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?
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;
}
Reply


Messages In This Thread
Garage help - by Squidle - 17.05.2011, 09:57
Re: Garage help - by Squidle - 18.05.2011, 10:47

Forum Jump:


Users browsing this thread: 1 Guest(s)