06.11.2018, 18:32
HI!
The problem is:
When i type the key_submission (2), i give the message "No suspects in range." even if is a suspect with 3 wanted near at me,how to solve it?
The problem is:
When i type the key_submission (2), i give the message "No suspects in range." even if is a suspect with 3 wanted near at me,how to solve it?
Code:
if((newkeys == KEY_SUBMISSION) && isLEO(playerid)) { foreach(new i : Player) { new msg[100]; if(GetDistanceBetweenPlayers(playerid, i) < 7.0 && Player[i][playerWanted] <= 5 && Player[i][playerWanted] >= 1) { format(msg, 100, "/ticket %d", i); return CallLocalFunction("OnPlayerCommandText", "ds", playerid, msg); } if(GetDistanceBetweenPlayers(playerid, i) < 7.0 && Player[i][playerWanted] >= 6) { format(msg, 100, "/arrest %d", i); return CallLocalFunction("OnPlayerCommandText", "ds", playerid, msg); } else { SendClientMessage(playerid, COLOR_RED, "No suspects in range."); return 1; } } }