Problem with RangeOfPoint
#1

I dont get any errors but simply it doesnt do a shit. It always says "<!>You are not inside the armoury!"

Код:
COMMAND:getgear(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 10.0, 321.4954,306.3996,999.1484))
	{
	    ShowPlayerDialog(playerid,3224,DIALOG_STYLE_LIST,"Items", "Deagle\n.AK-47\n.M4\n.Spaz\n.Shotgun\n.9MM\n.Sniper\n.Rifle\n.SMG\n.Uzi\n.Nightstick\n.Knife\n.Tear Gas\n.Grenade\n.Extinguisher", "Get", "Close");
		return 1;
	}
	else
	{
		SendClientMessage(playerid, COLOR_RED, "<!>You are not inside the armoury!");
		return 1;
	}
}
Reply
#2

Try this:
pawn Код:
COMMAND:getgear(playerid)
{
    if(!IsPlayerInRangeOfPoint(playerid, 10.0, 321.4954, 306.3996, 999.1484)) return SendClientMessage(playerid, COLOR_RED, "<!>You are not inside the armoury!");
    ShowPlayerDialog(playerid, 3224, DIALOG_STYLE_LIST, "Items", "Deagle\n.AK-47\n.M4\n.Spaz\n.Shotgun\n.9MM\n.Sniper\n.Rifle\n.SMG\n.Uzi\n.Nightstick\n.Knife\n.Tear Gas\n.Grenade\n.Extinguisher", "Get", "Close");
    return 1;
}
If it doesn't work, try to change the DIALOG ID..
Reply
#3

I tried changing it to 1 etc. With other commnads I dont have any errors or such, they work normally. Just this one doesnt.
Reply
#4

your Z coordinates dont look good to me, 999.1484 ?? are you sure ?
or either that is custom map or I.D.K.
Reply
#5

Maybe you have put wrong coords..
Reply
#6

Код:
COMMAND:getgear(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 10.0, 321.4954,306.3996,999.1484))
	{
	    ShowPlayerDialog(playerid,3224,DIALOG_STYLE_LIST,"Items", "Deagle\n.AK-47\n.M4\n.Spaz\n.Shotgun\n.9MM\n.Sniper\n.Rifle\n.SMG\n.Uzi\n.Nightstick\n.Knife\n.Tear Gas\n.Grenade\n.Extinguisher", "Get", "Close");
	}
	else
	{
		SendClientMessage(playerid, COLOR_RED, "<!>You are not inside the armoury!");
	}
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)