SA-MP Forums Archive
Problem with RangeOfPoint - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with RangeOfPoint (/showthread.php?tid=416324)



Problem with RangeOfPoint - Squirrel - 16.02.2013

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



Re: Problem with RangeOfPoint - Roach_ - 16.02.2013

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..


Re: Problem with RangeOfPoint - Squirrel - 16.02.2013

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


Re: Problem with RangeOfPoint - park4bmx - 16.02.2013

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


Re: Problem with RangeOfPoint - Roach_ - 16.02.2013

Maybe you have put wrong coords..


Re: Problem with RangeOfPoint - Stu1 - 16.02.2013

Код:
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;
}