disable dialog list select
#1

Hello
I'm newbie here, i have a question.
So if a player is in range of an airport they can't select a list of dialog,

Код:
ShowPlayerDialog(playerid, DIALOG_SLCDEST, DIALOG_STYLE_LIST, "Select Destination", "San Fierro\nLos Santos\nLas Venturas\nAbandoned Airfield\nMowrick Airport", "Select", "Cancel");
Код:
if(dialogid == DIALOG_SLCDEST)
	{
		if(response)
		{
			if(listitem == 0)
			{
				SetPlayerCheckpoint(playerid, -1301.9893,-347.4291,14.1484,10);
	 			toSF[playerid] = 1;
				SendClientMessage(playerid, green, "You've selected San Fierro as destination");
			}
			if(listitem == 1)
			{
				SendClientMessage(playerid, green, "Los Santos");
			}
			if(listitem == 2)
			{
				SendClientMessage(playerid, green, "Las Venturas");
			}
			if(listitem == 3)
			{
				SendClientMessage(playerid, green, "Abandoned Airfield");
			}
			if(listitem == 4)
			{
				SendClientMessage(playerid, green, "Mowrick Airport");
			}
		}
	}
I have tried using IsPlayerInRangeofPoint function

Код:
		if(listitem == 0)
			{
                            if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
                           {
				SetPlayerCheckpoint(playerid, -1301.9893,-347.4291,14.1484,10);
	 			toSF[playerid] = 1;
				SendClientMessage(playerid, green, "San Fierro");
                            }
                            return SendClientMessage(playerid, green, "You are near from this airport. Please select other airport");
			}
but it doesnt work

how would i do that ? thanks
Reply
#2

use Streamer of Incognito

then use finction
CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
Reply
#3

Quote:
Originally Posted by VishvaJeet
Посмотреть сообщение
use Streamer of Incognito

then use finction
CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
thanks for your answer, very nice idea! thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)