30.03.2018, 23:16
Nгo,vocк tem que usar o cуdigo que te passei,vocк vai manter as funзхes e trocar sу o comando.
Sistema completo :
Sistema completo :
PHP код:
Cargos(playerid)
{
new Str[25];
if(WE_GetInt(f(playerid), "AdminL") == 1)
{
Str = "Dono";
}
else if(aInfo[playerid][Admin] == 1 && WE_GetInt(f(playerid), "AdminL") == 0)
{
Str = "Administrador";
}
else if(aInfo[playerid][Moderador] == 1 && WE_GetInt(f(playerid), "AdminL") == 0)
{
Str = "Moderador";
}
else if(aInfo[playerid][Ajudante] == 1 && WE_GetInt(f(playerid), "AdminL") == 0)
{
Str = "Ajudante";
}
else if(aInfo[playerid][Corregedor] == 1 && WE_GetInt(f(playerid), "AdminL") == 0)
{
Str = "Corregedor";
}
return Str;
}
IsAdmin(playerid)
{
if((WE_GetInt(f(playerid), "AdminL") == 1) || aInfo[playerid][Admin] == 1 && WE_GetInt(f(playerid), "AdminL") == 0 || aInfo[playerid][Moderador] == 1 && WE_GetInt(f(playerid), "AdminL") == 0 || aInfo[playerid][Ajudante] == 1 && WE_GetInt(f(playerid), "AdminL") == 0 || aInfo[playerid][Corregedor] == 1 && WE_GetInt(f(playerid), "AdminL") == 0)
return true;
else return false;
}
if(!strcmp(cmd, "/admins", true) || !strcmp(cmd, "/mods", true) || !strcmp(cmd, "/administradores", true) || !strcmp(cmd, "/moderadores", true))
{
SendClientMessage(playerid, AZUL_WE, "Administraзгo online:");
new
adml,Str[80];
foreach(Player, i)
{
if(IsAdmin(playerid))
{
if(aInfo[i][Oculto] == false)
{
adml ++;
format(string, sizeof(string), "{FF1E1E}%s [%d] {FFFFFF}- Cargo: {328E0A}%s\n", PlayerName(i), i,Cargos(i));
strcat(Str,string);
}
}
}
ShowPlayerDialog(playerid, 4444, DIALOG_STYLE_TABLIST, "Administradores",Str,"Ok","");
if(adm1 == 0) SendClientMessage(playerid, VERMELHO_WE, "Nenhum membro da administraзгo conectado no momento.");
return 1;
}