05.07.2018, 14:33
Quote:
Fiz uma adaptaзгo na funзгo para que ela possa ser utilizada diretamente em uma caixa de diбlogo:
Comando: Код:
dcmd_admins(playerid,params[]) { #pragma unused params //Alertar admins para quem digitar o comando /admins if(PlayerInfo[playerid][Level] < 1) { new pname[MAX_PLAYER_NAME],SACSB[100];GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(SACSB, sizeof(SACSB), "| CMDS-LOG | O(A) jogador(a) %s[%d] usou o comando ( /Admins )", pname, playerid); CallRemoteFunction("MessageToAdmins","is",yellow,SACSB); } //Estrutura do comando /admins new Fixed[43], ADMsDialog[43*15], Name[MAX_PLAYER_NAME], level, admscount; for(new i, a = GetPlayerPoolSize(); i <= a; i++) { if(IsPlayerConnected(i)) { level = PlayerInfo[i][Level]; if(level > 0) { if(AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0) { GetPlayerName(i, Name, sizeof(Name)); FixAdminList(Name, 1, true, Fixed); strcat(ADMsDialog, Fixed); admscount++; } } } } if(admscount > 0) ShowPlayerDialog(playerid,1000,DIALOG_STYLE_MSGBOX,"Admins", ADMsDialog, "Fechar", ""); else ShowPlayerDialog(playerid,1000,DIALOG_STYLE_MSGBOX,"Admins", "{FF0000}Nгo hб administradores online no momento!", "Fechar", ""); return 1; } Код:
stock FixAdminList(adm_name[], adm_level, bool:adm_online, fixed_string[]) { // formato: // nome do admin (24 char) nнvel x/x on/offline // aaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbb ccccccc new len_adm_name = strlen(adm_name); new calc_spaces = MAX_PLAYER_NAME - len_adm_name; fixed_string[0] = '\0'; strcat(fixed_string, adm_name, 43); for(new x = 0; x < calc_spaces; ++ x) strcat(fixed_string, " ", 43); format(fixed_string, 43, "%s Nivel %d/5 %s\n", fixed_string, adm_level, (adm_online ? ("Online") : ("Offline"))); return 1; } |
PHP код:
C:\Users\Pedro Tramontina\Desktop\Projeto\filterscripts\ladmin4v2.pwn(4797) : error 017: undefined symbol "GetPlayerPoolSize"
Linha do erro
PHP код:
for(new i, a = GetPlayerPoolSize(); i <= a; i++)