15.12.2010, 19:26
This one should work properly, and does not require the use of any additional plugins/includes (even though the ones used in Retardedwolf's solution are very useful
):
![Wink](images/smilies/wink.png)
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/blue", cmdtext, true, 5) == 0)
{
SendClientMessageToAll(0xDEEE20FF, "|_List of blue players_|");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(GetPlayerColor(i) == 0x00137FAA) //0x00137FFAA = Blue color
{
new names[MAX_PLAYER_NAME], string[44];
GetPlayerName(i, names, sizeof(names));
format(string, sizeof(string), "%s(%d)",names ,playerid);
SendClientMessage(playerid, 0x7F0037AA, string);
}
}
return 1;
}
return 0;
}