04.11.2018, 16:30
Hi!
I have a problem in my gamemode,when i type '2' or 'mmb' (key submission), i not give the message with "No suspects in range". how to solve it?
I have a problem in my gamemode,when i type '2' or 'mmb' (key submission), i not give the message with "No suspects in range". 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] < 6 && Player[i][playerWanted] != 0) { format(msg, 100, "/ticket %d", i); return OnPlayerCommandReceived(playerid, msg); } if(GetDistanceBetweenPlayers(playerid, i) < 7.0 && Player[i][playerWanted] > 5) { format(msg, 100, "/arrest %d", i); return OnPlayerCommandReceived(playerid, msg); } else { SendClientMessage(playerid, COLOR_RED, "No suspects in range."); break; } } } if((newkeys == KEY_SUBMISSION) && IsNowTicketed[playerid] == true) { new msg[78]; format(msg, 100, "/payticket %d", TicketCop[playerid]); return OnPlayerCommandReceived(playerid, msg); }