20.05.2015, 18:37
You can only be in range with 1 so you won't be for the other three. Sending the message that is not in range inside the loop isn't good.
PHP код:
new bool: in_range;
for(new t=0;t<MAX_DUCANI;t++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, DucanInfo[t][bPosX], DucanInfo[t][bPosY], DucanInfo[t][bPosZ]))
{
in_range = true;
ShowPlayerDialog(playerid, DIALOG_DUCAN, DIALOG_STYLE_LIST, "Balkan Godfather-"COL_ZLATNA"Trafika", "Bonovi(10$,20$,50$,100$,200$)\nBuket cvijeca(20$)\nKondom(16$)\nCigare(17$)\nUpaljac(10$)\nCola(8$)\nGusti sok(10$)", "Kupi", "Odustani");
break;
}
}
if (!in_range) SendClientMessage(playerid,COLOR_GREY,"Moras biti u ducanu ili na trafici!");