16.05.2009, 23:30
Quote:
Originally Posted by Weirdosport
Why involve a variable at all? My solution = no variable necessary, and it's most in keeping with what he originally posted..
|
TimmehBoy's code use and extra if check and Jefff's code a always raising variable both should be on the same level
Here my solution, I use an already existing variable which need to be used and dont need an extra if check or raising
pawn Код:
if(strcmp(cmdtext, "/ignorelist", true) == 0 || strcmp(cmdtext, "/il", true) == 0)
{
SendClientMessage(playerid, 0x2641FEAA, "Ignoring:");
string[0] = 0; //just for make sure that it works... not necessary if some factors are existing
for(new i; i < MAX_PLAYERS; i++)
if(MyIgnoredPlayers[playerid][i] >= 1)
{
GetPlayerName(i, playername, sizeof(playername));
format(string, sizeof(string), "%s (%d)", playername, i);
SendClientMessage(playerid, 0xFFFFFFAA, string);
}
if(!string[0]) SendClientMessage(playerid, COLOR_RED, "No One.");
return true;
}