[Ajuda] Admin em Dialog - 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] Admin em Dialog (
/showthread.php?tid=449582)
Admin em Dialog -
minimessi10 - 09.07.2013
Como deixa o comando /admins em dialog ?
pawn Код:
if(strcmp(cmdtext, "/admins", true) == 0)
{
SendClientMessage(playerid,verdel, "~> Lista de administradores conectados:");
static bool: result;
for(new i; i < MAX_PLAYERS; ++i) {
new pname[24];
GetPlayerName(i,pname,24);
if(IsPlayerConnected(i) && IsAdmin[playerid] < 0) {
if(IsAdmin[playerid] == 1) {
format(string,sizeof(string),"%s [ID %d]", pname, playerid);
}
SendClientMessage(playerid, 0xFFFFFFAA, string);
result = true;
}
}
if(!result)
return SendClientMessage(playerid, -1,"~> Nenhum administrador (ADM) conectado ao servidor no momento!");
return 1;
}
Respuesta: Admin em Dialog -
Parka - 09.07.2013
pedido ._.?
Re: Admin em Dialog -
clerISoN - 09.07.2013
Tenta essa:
pawn Код:
#define DIALOG 800
#define NDIALOG 801
if(strcmp(cmdtext, "/admins", true) == 0)
{
static bool: result;
for(new i; i < MAX_PLAYERS; ++i) {
new pname[24];
GetPlayerName(i,pname,24);
if(IsPlayerConnected(i) && IsAdmin[playerid] < 0) {
if(IsAdmin[playerid] == 1) {
format(string,sizeof(string),"%s [ID %d]", pname, playerid);
}
ShowPlayerDialog(playerid, DIALOG, DIALOG_STYLE_MSGBOX, "~> Lista de Administradores Online:", string, "Fechar","");
result = true;
}
}
if(!result)
return ShowPlayerDialog(playerid, NDIALOG, DIALOG_STYLE_MSGBOX, "~> Nenhum administrador (ADM) conectado ao servidor no momento!","Fechar","");
return 1;
}