[Ajuda] Dialgo admins online - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Dialgo admins online (
/showthread.php?tid=375964)
Dialgo admins online -
.ThePro - 08.09.2012
Sempre que seto 2 admins online e do /admins fica tudo certo, quando um desses admins sai fica 2 nomes do admin que fico online e um desses nomes com o level de admin do que saiu.
Код:
#define DIALOG_Admins 7
COMANDO!
Код:
CMD:admins(playerid, params[])
{
if(Logado[playerid] == false) return SendClientMessage(playerid,-1,"{8000FF}[ERRO] {FFFFFF}Vocк nгo estб logado");
new s[128], ss[128], Jogador[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] > 0)
{
GetPlayerName(i, Jogador, sizeof(Jogador));
format(ss, 128, "{FFFFFF}%s {FF00FF}[%s]\n\n", Jogador, admins(i));
strcat(s, ss);
}
}
ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", "");
return true;
}
STOCK
Код:
admins(playerid)/* MOSTRA OS ADMINISTRADORES ONLINE */
{
new String[64];
if(PlayerInfo[id][pAdmin] == 1)
String = "Moderador";
else if(PlayerInfo[playerid][pAdmin] == 2)
String = "NНVEL 2";
else if(PlayerInfo[playerid][pAdmin] == 3)
String = "NНVEL 3";
else if(PlayerInfo[playerid][pAdmin] == 4)
String = "NНVEL 4";
else if(PlayerInfo[playerid][pAdmin] == 5)
String = "NНVEL 5";
return String;
}
Re: Dialgo admins online -
Sky™ - 08.09.2012
pawn Код:
CMD:admins(playerid, params[])
{
if(Logado[playerid] == false) return SendClientMessage(playerid,-1,"{8000FF}[ERRO] {FFFFFF}Vocк nгo estб logado");
new s[128], ss[128], Jogador[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] > 0)
{
GetPlayerName(i, Jogador, sizeof(Jogador));
format(ss, 128, "{FFFFFF}%s {FF00FF}[%s]\n\n", Jogador, admins(i));
strcat(s, ss);
}
}
}
ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", "");
return true;
}
Tente isso chapa ^^
Re: Dialgo admins online -
VenoN - 08.09.2012
й acho qeu ta resolvido pois antes nгo tava pra msotra os COnectados ai dava esses erros cabulosos