25.03.2018, 15:57
Quote:
Acho que nгo da pra otimizar mais que isso. Sу mudei o return true pra return 1. E CountMembers = 0 pra CountMembers.
Код:
CMD:membros(playerid) { if(!Player[playerid][Organizacao]) return SendClientMessage(playerid, 0xFF0000FF, "[BLC] Vocк nгo й de uma organizaзгo."); static CountMembers, nome[MAX_PLAYER_NAME], string[MAX_PLAYER_NAME]; foreach(Player, i) { if(Player[i][Organizacao] == Player[playerid][Organizacao] && i != playerid) { if(!CountMembers) SendClientMessage(playerid, -1, "/-----Membros da Organizaзгo Online -----/"); GetPlayerName(i, nome, sizeof(nome)); format(string, sizeof(string), "%s", nome); SendClientMessage(playerid, -1, string); CountMembers++; } } SendClientMessage(playerid, CountMembers >= 1 ? (-1) : (0xFF0000FF), CountMembers >= 1 ? ("/----- Membros da Organizaзгo Online -----/") : ("[BLC] Fora vocк nгo hб nenhum(a) outro(a) membro(a) da sua organizaзгo estб online.")); return 1; } |