04.09.2018, 13:49
Olб! entгo,eu queria colocar cada level um cargo,porem unico cargo que mostra й o "dono" e eu gostaria de acrescentar o resto,por exemplo:
nнvel 1: ajudante
nнvel 2: moderador
nнvel 3: sub-administrador
nнvel 4: administrador
nнvel 5 jб estб como "dono"
comando:
obg a quem me ajudar!!
nнvel 1: ajudante
nнvel 2: moderador
nнvel 3: sub-administrador
nнvel 4: administrador
nнvel 5 jб estб como "dono"
comando:
PHP код:
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), "[ADM]: %s[%i] digitou /ADMINS", pname, playerid);
CallRemoteFunction("MessageToAdmins","is",yellow,SACSB);}
//Estrutura do comando /admins
new Adms[650],ADMsDialog[810],Name[MAX_PLAYER_NAME],level,admscount;
for(new i,a = GetMaxPlayers();i < a;i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] > 0)
{
if(PlayerInfo[i][Level] == 5)
{
if(AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
{
level = PlayerInfo[i][Level];
GetPlayerName(i, Name, sizeof(Name));
if(admscount < 15) format(Adms, sizeof(Adms), "{1E90FF}%s\n%s[%i] - ( Nнvel: %i ) - Dono do servidor", Adms,Name,i,level);
admscount++;
}
}
else
{
if(AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
{
level = PlayerInfo[i][Level];
GetPlayerName(i, Name, sizeof(Name));
if(admscount < 15) format(Adms, sizeof(Adms), "{1E90FF}%s\n%s[%i] - ( Nнvel: %i )", Adms,Name,i,level);
admscount++;
}
}
}
}
}
if(admscount > 0)
format(ADMsDialog, sizeof(ADMsDialog), "{FFFF00}Administradores Online: {FFFFFF}%i{FF0000}{00FF22}\n%s\n\n{FFFFFF}Reporte os jogadores contra as regras! /Report [ID] [Motivo]", admscount,Adms);
else
format(ADMsDialog, sizeof(ADMsDialog), "{FFFFFF}Nгo hб membros da Administraзгo Online no Momento.", admscount,Adms);
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_MSGBOX,"{FF0000}Admins!",ADMsDialog,"OK","");
return 1;}