03.10.2016, 16:40
(
Последний раз редактировалось FalcaoNC; 03.10.2016 в 17:18.
)
@RESOLVIDO
if(strcmp(cmd, "/admins", true) == 0) { new PTstring[500], PTstr2[128], stringCargo[30], playerNome[MAX_PLAYER_NAME]; for(new i = 0, mp = GetPlayerPoolSize(); i <= mp; i++) { if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0) { if(HideAdm[i] != 0) continue; switch(PlayerInfo[i][pAdmin]) { case 1: stringCargo = "Temporario"; case 2: stringCargo = "Moderador"; case 3: stringCargo = "Auxiliar"; case 4: stringCargo = "Administrador"; case 1337: stringCargo = "Master Editor"; case 1338: stringCargo = "Responsavel Lider"; case 1339: stringCargo = "Supervidor"; case 1340: stringCargo = "Gerente"; case 1341: stringCargo = "Sub Dono"; case 1342: stringCargo = "Fundador"; case 3000: stringCargo = "Resposavel Geral"; } GetPlayerName(i, playerNome, sizeof(playerNome)); if(away[i] == 0) { format(PTstr2, sizeof(PTstr2), "{FF69B4}%s {FFFFFF}- Cargo: {FF69B4}%s{FFFFFF} - Modo: %s", playerNome, stringCargo, admtrampando[i] == 1 ? ("{00B2EE} Trabalhando") : ("{32CD32} Jogando")); strcat(PTstring, PTstr2, sizeof(PTstring)); } else { new datatext[129]; format(datatext, sizeof(datatext), "AUSENTES/%s.txt",sendername); if(fexist(datatext)) { new File:handle = fopen(datatext, io_read), buf[128]; if(handle) { while(fread(handle, buf)) { datatext = buf; } fclose(handle); } } else { datatext = "Sem Motivo"; } format(PTstr2, sizeof(PTstr2), "{FF69B4}%s {FFFFFF}- Cargo: {FF69B4}%s{FFFFFF} - Modo:{FFFF00} Ausente{FFFFFF} - Motivo:{FFFF00} %s", playerNome, stringCargo, datatext); strcat(PTstring, PTstr2, sizeof(PTstring)); } } } ShowPlayerDialog(playerid, 1999, DIALOG_STYLE_LIST, "{FF69B4}» {FFFFFF} Admins Online: {FF69B4} «", PTstring, "Ok", ""); return 1; }
Tente isso:
Код:
if(strcmp(cmd, "/admins", true) == 0) { new PTstring[500], PTstr2[128], stringCargo[30], playerNome[MAX_PLAYER_NAME]; for(new i = 0, mp = GetPlayerPoolSize(); i <= mp; i++) { if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0) { if(HideAdm[i] != 0) continue; switch(PlayerInfo[i][pAdmin]) { case 1: stringCargo = "Temporario"; case 2: stringCargo = "Moderador"; case 3: stringCargo = "Auxiliar"; case 4: stringCargo = "Administrador"; case 1337: stringCargo = "Master Editor"; case 1338: stringCargo = "Responsavel Lider"; case 1339: stringCargo = "Supervidor"; case 1340: stringCargo = "Gerente"; case 1341: stringCargo = "Sub Dono"; case 1342: stringCargo = "Fundador"; case 3000: stringCargo = "Resposavel Geral"; } GetPlayerName(i, playerNome, sizeof(playerNome)); if(away[i] == 0) { format(PTstr2, sizeof(PTstr2), "{FF69B4}%s {FFFFFF}- Cargo: {FF69B4}%s{FFFFFF} - Modo: %s", playerNome, stringCargo, admtrampando[i] == 1 ? ("{00B2EE} Trabalhando") : ("{32CD32} Jogando")); strcat(PTstring, PTstr2, sizeof(PTstring)); } else { new datatext[129]; format(datatext, sizeof(datatext), "AUSENTES/%s.txt",sendername); if(fexist(datatext)) { new File:handle = fopen(datatext, io_read), buf[128]; if(handle) { while(fread(handle, buf)) { datatext = buf; } fclose(handle); } } else { datatext = "Sem Motivo"; } format(PTstr2, sizeof(PTstr2), "{FF69B4}%s {FFFFFF}- Cargo: {FF69B4}%s{FFFFFF} - Modo:{FFFF00} Ausente{FFFFFF} - Motivo:{FFFF00} %s", playerNome, stringCargo, datatext); strcat(PTstring, PTstr2, sizeof(PTstring)); } } } ShowPlayerDialog(playerid, 1999, DIALOG_STYLE_LIST, "{FF69B4}» {FFFFFF} Admins Online: {FF69B4} «", PTstring, "Ok", ""); return 1; } |
(50017) : error 017: undefined symbol "GetPlayerPoolSize"
if(strcmp(cmd, "/admins", true) == 0) { new PTstring[500], PTstr2[128], stringCargo[30], playerNome[MAX_PLAYER_NAME]; for(new i = 0; i <= MaiorID; i++) { if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0) { if(HideAdm[i] != 0) continue; switch(PlayerInfo[i][pAdmin]) { case 1: stringCargo = "Temporario"; case 2: stringCargo = "Moderador"; case 3: stringCargo = "Auxiliar"; case 4: stringCargo = "Administrador"; case 1337: stringCargo = "Master Editor"; case 1338: stringCargo = "Responsavel Lider"; case 1339: stringCargo = "Supervidor"; case 1340: stringCargo = "Gerente"; case 1341: stringCargo = "Sub Dono"; case 1342: stringCargo = "Fundador"; case 3000: stringCargo = "Resposavel Geral"; } GetPlayerName(i, playerNome, sizeof(playerNome)); if(away[i] == 0) { format(PTstr2, sizeof(PTstr2), "{FF69B4}%s {FFFFFF}- Cargo: {FF69B4}%s{FFFFFF} - Modo: %s\n", playerNome, stringCargo, admtrampando[i] == 1 ? ("{00B2EE} Trabalhando") : ("{32CD32} Jogando")); strcat(PTstring, PTstr2, sizeof(PTstring)); } else { new datatext[129]; format(datatext, sizeof(datatext), "AUSENTES/%s.txt",sendername); if(fexist(datatext)) { new File:handle = fopen(datatext, io_read), buf[128]; if(handle) { while(fread(handle, buf)) { datatext = buf; } fclose(handle); } } else { datatext = "Sem Motivo"; } format(PTstr2, sizeof(PTstr2), "{FF69B4}%s {FFFFFF}- Cargo: {FF69B4}%s{FFFFFF} - Modo:{FFFF00} Ausente{FFFFFF} - Motivo:{FFFF00} %s\n", playerNome, stringCargo, datatext); strcat(PTstring, PTstr2, sizeof(PTstring)); } } } ShowPlayerDialog(playerid, 1999, DIALOG_STYLE_LIST, "{FF69B4}» {FFFFFF} Admins Online: {FF69B4} «", PTstring, "Ok", ""); return 1; }