[Ajuda] Admins - 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] Admins (
/showthread.php?tid=425146)
Admins -
vitorvlv - 24.03.2013
pawn Код:
CMD:admins(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerName(i,nome,sizeof(nome));
if(pInfo[i][adm] > 0)
{
format(String,sizeof(String),"%s = %s",nome,admins(i));
}
}
ShowPlayerDialog(playerid,982,DIALOG_STYLE_MSGBOX ,"Administradores Online",String,"Ok","");
return true;
}
Como faz para quando nгo tiver admin online,mandar a mensagem "Nгo tem administradores on" ?
Re: Admins -
ungroup - 24.03.2013
Nem testei criei agora mas tenta ae
pawn Код:
CMD:admins(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(pInfo[i][adm] > 0)
{
new String[256];
new Name[100];
GetPlayerName(i, Name, sizeof(Name));
format(String,sizeof(String),"Administrador: %s",Name);
ShowPlayerDialog(playerid,982,DIALOG_STYLE_MSGBOX ,"Administradores Online",String,"Ok","");
}
else
{
SendClientMessage(playerid,-1,"Nenhum administrador online.");
return 0;
}
}
return true;
}
Re: Admins -
Jefferson Santos - 24.03.2013
Tente:
pawn Код:
CMD:admins(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerName(i,nome,sizeof(nome));
if(pInfo[i][adm] > 0)
{
format(String,sizeof(String),"%s = %s",nome,admins(i));
}
}
ShowPlayerDialog(playerid,982,DIALOG_STYLE_MSGBOX ,"Administradores Online",String,"Ok","");
return true;
}
if(!result)
return SendClientMessage(playerid, -1,"Nгo hб administradores online neste momento!");
return true;
}
return 0;
}
*To sem pawno rs fiz no bloco de notas mesmo.
Re: Admins -
Supera - 24.03.2013
pawn Код:
CMD:admins(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerName(i,nome,sizeof(nome));
if(pInfo[i][adm] > 0)
{
format(String,sizeof(String),"%s = %s",nome,admins(i));
}
}
if(strlen(String) > 0)
{
ShowPlayerDialog(playerid,982,DIALOG_STYLE_MSGBOX ,"Administradores Online",String,"Ok","");
}
else
SendClientMessage(playerid, 0xFF0000FF, "Nгo tem administradores online");
return true;
}