22.11.2012, 13:52
Here
pawn Код:
if (strcmp("/radar", cmdtext, true, 10) == 0)
{
new counter = 0, string[268], player[268];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 30.0, x, y, z) && i != playerid && IsPlayerConnected(i) && IsACop(i))
{
counter++;
}
}
if(counter == 0) return SendClientMessage(playerid, 0xFF0000FF, "No one is in your range.");
strdel(string, 0, strlen(string));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 30.0, x, y, z) && i != playerid && IsPlayerConnected(i) && IsACop(i))
{
format(player, sizeof(player), "%s (%d)\n", Nick(i), i);
strins(string, player, strlen(string), sizeof(string));
}
}
ShowPlayerDialog(playerid, DIALOG_RADAR, DIALOG_STYLE_MSGBOX, "Radar", string, "Okay", "");
strdel(string, 0, strlen(string));
return 1;
}