[Ajuda] Comandos Bugado - 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] Comandos Bugado (
/showthread.php?tid=622072)
Comandos Bugado -
VinnyScript - 18.11.2016
funзao do comando, para ver os adminstradores online.
mas so quem consegue ver e os admins, oq a de errado
PHP код:
CMD:admins(playerid)
{
if(AFKP[playerid] == true) return SendClientMessage(playerid, Cinza, "[ERRO] Vocк estб ausente.");
if(Logado[playerid] == false) return SendClientMessage(playerid, Cinza, "[ERRO] Vocк deve logar primeiro.");
new rString[256],rString2[256];
for(new r = 0; r < MAX_PLAYERS; r++)
{
if(IsPlayerConnected(r))
{
if(CBDAdmin[r] > 0)
{
format(rString2, sizeof(rString2), "{FF0000}» {32CD32}%s - {FFFFFF}%s {FF0000}«\n\n", rNome(r), AdminLevel(r));
strcat(rString, rString2);
ShowPlayerDialog(playerid, rAdmins, DIALOG_STYLE_MSGBOX, "[CBD] - Administradores", rString, "Fechar", "");
}
}
}
return 1;
}
Re: Comandos Bugado -
F1N4L - 18.11.2016
ShowPlayerDialog dentro do loop?
Coloque essa funзгo fora do loop e tente novamente.
Re: Comandos Bugado -
VinnyScript - 19.11.2016
continua a mesma coisa fora do loop
Respuesta: Comandos Bugado -
SammyJ - 19.11.2016
PHP код:
CMD:admins(playerid)
{
if(AFKP[playerid] == true) return SendClientMessage(playerid, Cinza, "[ERRO] Vocк estб ausente.");
if(Logado[playerid] == false) return SendClientMessage(playerid, Cinza, "[ERRO] Vocк deve logar primeiro.");
new rString[256],rString2[128];
for(new r=0, max = GetPlayerPoolSize(); r <= max; r++)
{
if(IsPlayerConnected(r))
{
if(CBDAdmin[r] > 0)
{
format(rString2, sizeof(rString2), "{FF0000}» {32CD32}%s - {FFFFFF}%s {FF0000}«\n\n", rNome(r), AdminLevel(r));
strcat(rString, rString2);
}
}
}
return ShowPlayerDialog(playerid, rAdmins, DIALOG_STYLE_MSGBOX, "[CBD] - Administradores", rString, "Fechar", "");
}