26.04.2012, 23:14
Vocк pode melhorar muito esse cуdigo ;s
pawn Код:
CMD:membros(playerid, params[])
{
if(Player[playerid][Membro] == 0)
return SendClientMessage(playerid, COR_AMARELO, "Vocк nгo faz parte de uma Organizaзгo.");
SendClientMessage(playerid, COR_DARK, "::_____| MEMBROS ONLINE |_____:");
for(new i, j = GetMaxPlayers(); i != j; i++)
{
if(IsPlayerConnected(i))
{
if(Player[playerid][Membro] != Player[i][Membro])
continue;
if(Player[i][Membro] == 1)
{
if(Player[i][Cargo] == 1) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|1| Soldado %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes); }
else if(Player[i][Cargo] == 2) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|2| Cabo %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes); }
else if(Player[i][Cargo] == 3) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|3| Sargento %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes); }
else if(Player[i][Cargo] == 4) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|4| Major %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes); }
else if(Player[i][Cargo] == 5) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|5| Ten. Coronel %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes); }
else if(Player[i][Cargo] == 6) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|6| Coronel %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes); }
}
if(Player[i][Membro] == 2)
{
if(Player[i][Cargo] == 1) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|1| Laranja %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes);}
else if(Player[i][Cargo] == 2) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|2| Fogueteiro %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes);}
else if(Player[i][Cargo] == 3) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|3| Traficante %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes);}
else if(Player[i][Cargo] == 4) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|4| Rei do Trafico %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes);}
else if(Player[i][Cargo] == 5) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|5| Comandante Geral %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes);}
else if(Player[i][Cargo] == 6) { GetPlayerName(i, nome, sizeof(nome)); format(stringes, 64, "|6| Chefгo %s (%d)", nome, playerid); SendClientMessage(playerid, COR_AMARELO, stringes);}
}
}
}
return 1;
}