Tag em cada level no /admins -
CSSDean - 01.06.2018
Gostaria de por em cada level uma tag,exemplo "Mod,ajudante etc." eu tentei fazer e so consegui por 2 tags,alguem pd me ajduar a por as outras 3? grato!
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), "| ADMINISTRAЗГO | O(A) jogador(a) %s[%i] digitou /ADMINS", pname, playerid);
CallRemoteFunction("MessageToAdmins","is",yellow,SACSB);}
//Estrutura do comando /admins
new Adms[650],ADMsDialog[810],ADMsDialog2[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), "%s\n%s[%i] \t{228B22}Staff \t{01DF01}Online", Adms,Name,i,level);
admscount++;
}
}
else
{
if(PlayerInfo[i][Level] == 4)
{
level = PlayerInfo[i][Level];
GetPlayerName(i, Name, sizeof(Name));
if(admscount < 15) format(Adms, sizeof(Adms), "%s\n%s[%i] \t{FF4500}Sub-Staff \t{01DF01}Online", Adms,Name,i,level);
admscount++;
}
}
}
}
}
if(admscount > 0)
format(ADMsDialog, sizeof(ADMsDialog), "%s",Adms);
else
format(ADMsDialog2, sizeof(ADMsDialog2), "{FF0000}A administraзгo nгo estб online no momento!", admscount,Adms);
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_LIST,"{FFFFFF}Admins!",ADMsDialog,"Fechar","Voltar");
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_MSGBOX,"{FFFFFF}Admins!",ADMsDialog2,"Fechar","Voltar");
return 1;}
Re: Tag em cada level no /admins -
NelsonC - 01.06.2018
http://forum.sa-mp.com/showpost.php?...79&postcount=2
Re: Tag em cada level no /admins -
CSSDean - 01.06.2018
Quote:
Originally Posted by NelsonC
|
atй copilou,porem na hora de testar... se tiver 2 adms,mostra a msm tag,msm sendo leveis diferentes..
Eu fiz um desse:
//inicio
PHP код:
CargoAdmin(playerid)
{
new var[17];
switch(CallRemoteFunction("GetPlayerAdminLevel","i",playerid))
{
case 1: var = "Ajudante";
case 2: var = "Moderador(a)";
case 3: var = "Administrador(a)";
case 4: var = "Sub-Staff";
case 5: var = "Staff";
}
return var;
}
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],ADMsDialog2[810],Name[MAX_PLAYER_NAME],level,admscount;
for(new i,a = GetMaxPlayers();i < a;i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] > 0)
{
if(AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
{
level = PlayerInfo[i][Level];
GetPlayerName(i, Name, sizeof(Name));
if(admscount < 15) format(Adms, sizeof(Adms), "%s\n%s[%i]\tNнvel\t%i/5\t%s{01DF01}\tOnline", Adms,Name,i,level,CargoAdmin(playerid));
admscount++;
}
}
}
}
if(admscount > 0)
format(ADMsDialog, sizeof(ADMsDialog), "%s",Adms);
else
format(ADMsDialog2, sizeof(ADMsDialog2), "{FF0000}A ( Administraзгo ) nгo estб online no momento!", admscount,Adms);
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_LIST,"{FFFFFF}Admins!",ADMsDialog,"Fechar","Voltar");
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_MSGBOX,"{FFFFFF}Admins!",ADMsDialog2,"Fechar","Voltar");
return 1;}