05.11.2018, 08:19
PHP Code:
if(newkeys & KEY_SUBMISSION)
{
if(!isLEO(playerid)) return 0;
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)
{
if(IsNowTicketed[playerid] == false) return 0;
new msg[78];
format(msg, 100, "/payticket %d", TicketCop[playerid]);
return OnPlayerCommandReceived(playerid, msg);
}