Range bug [Giving rep] [small problem]
#1

Well what I am doing here wrong..
Код:
	if (strcmp("/Russiangateopen", cmdtext, true) == 0 || (strcmp("/Rgo", cmdtext, true) == 0))
	{
	    if(IsPlayerInRangeOfPoint(playerid, 20.0, -1820.6879, 1.8925, 15.1172))
	    {
	        SendClientMessage(playerid, COLOR_RED, "<!>You are not in range of that gate!");
	        return 1;
	    }
	    SendClientMessage(playerid, COLOR_YELLOW, "<!>You have just opened the gate!");
	    MoveObject(gateR1, -1817.5251, 1.9901, 10.4987, 1, 0.00, 0.00, 91.00); //opened
	    return 1;
	}
I made gates that are working but only if you are 20 feet away from them... I wanted to make it if you are 20feet+ away that you cannot open it. Gates are working but only if you are 20+ feet away...
Reply
#2

Check it out:
pawn Код:
if (strcmp("/Russiangateopen", cmdtext, true) == 0 || (strcmp("/Rgo", cmdtext, true) == 0))
    {
        if(!IsPlayerInRangeOfPoint(playerid, 20.0, -1820.6879, 1.8925, 15.1172))   // not in range
        {
            SendClientMessage(playerid, COLOR_RED, "<!>You are not in range of that gate!");
            return 1;
        }
        SendClientMessage(playerid, COLOR_YELLOW, "<!>You have just opened the gate!");
        MoveObject(gateR1, -1817.5251, 1.9901, 10.4987, 1, 0.00, 0.00, 91.00); //opened
        return 1;
    }
Reply
#3

Thanks mate!
Sent the rep ^_^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)