if(!strcmp(cmd, "/admins", true) || !strcmp(cmd, "/mods", true) || !strcmp(cmd, "/administradores", true) || !strcmp(cmd, "/moderadores", true))
{
new NickName[25];
new temadm;
foreach(Player, i)
{
if(DOF2_GetInt(f(i), "AdminL") == 1)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {1E90FF}Dono", NickName, i);
}
}
if(aInfo[i][Admin] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {1E90FF}Administrador", NickName, i);
}
}
if(aInfo[i][Moderador] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {00FF7F}Moderador", NickName, i);
}
}
if(aInfo[i][Ajudante] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {FFA500}Ajudante", NickName, i);
}
}
}
if(temadm == 1){
ShowPlayerDialog(playerid, ADMINSD, DIALOG_STYLE_MSGBOX, "{FFFFFF}Administradores online:", string, "Fechar", "");
return 1;
}
if(temadm == 1) return ShowPlayerDialog(playerid, ADMINSD, DIALOG_STYLE_MSGBOX, "{FFFFFF}Administradores online:", "{FF0000}Nгo hб membros da Administraзгo online no momento'", "Fechar", "");
return 1;
}
Bom, estou desenvolvendo um /admins em dialog mas nгo consigo :/
Se tiver 1 admin online no servidor, aparece o dialog de boa. Mas se tiver mais de um, o dialog nгo aparece. Quem me ajudar, dou +REP Obrigado. Obs: Eu entrei em 2 contas usando o SandBoxie. Print(se quiser): CODE: PHP код:
|
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(VARIAVEL ADMIN)
{
DIALOG QUE MOSTRA QUANTIDADE DE ADMIN ON++;
}
}
}
Nгo entendi esse DIALOG QUE MOSTRA A QUANTIDADE DE ADMIN ON++... Pode me ajudar?
|
if(Admin3 == 0) return ShowPlayerDialog(playerid, DAdmins, DIALOG_STYLE_MSGBOX, "Administradores online:", "Sem Administradores On no Momento!", "Fechar", "");
else if(Admin3 > 0)
{
format(Admin, 128, "Olб %s, hб %d administradores online no Momento:\n\n", Nome(playerid), Admin3);
}
GetPlayerName(i, NickName, 25);
GetPlayerName(i, NickName, 128;
if(!strcmp(cmd, "/admins", true) || !strcmp(cmd, "/mods", true) || !strcmp(cmd, "/administradores", true) || !strcmp(cmd, "/moderadores", true))
{
new NickName[128];
new temadm;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(DOF2_GetInt(f(i), "AdminL") == 1)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 128);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {1E90FF}Dono", NickName, i);
}
}
if(aInfo[i][Admin] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 128);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {1E90FF}Administrador", NickName, i);
}
}
if(aInfo[i][Moderador] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 128);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {00FF7F}Moderador", NickName, i);
}
}
if(aInfo[i][Ajudante] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 128);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {FFA500}Ajudante", NickName, i);
}
}
}
if(temadm == 1){
ShowPlayerDialog(playerid, ADMINSD, DIALOG_STYLE_MSGBOX, "{FFFFFF}Administradores online:", string, "Fechar", "");
return 1;
}
if(temadm == 1) return ShowPlayerDialog(playerid, ADMINSD, DIALOG_STYLE_MSGBOX, "{FFFFFF}Administradores online:", "{FF0000}Nгo hб membros da Administraзгo online no momento'", "Fechar", "");
return 1;
}
}
Mude new NickName[25]; Para new NickName[128]; E Mude o resto ,
EX : pawn Код:
pawn Код:
|