SA-MP Forums Archive
[Ajuda] comando - 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] comando (/showthread.php?tid=382871)



comando - Lucas_Henrique - 05.10.2012

ai gente fiz um comando aqui para mostrar todos do servidor que tem menos de 18 fps, mais nгos ei se estб certo podem me ajudar?

pawn Код:
dcmd_laggers(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 1) return SendClientMessage(playerid,red,"[ERRO]: Vocк nгo tem permissгo para isso");
    new ppFPS = GetPVarInt(playerid,"PVarFPS");
    new string[1000]; new NomeDoPlayer[24];
    GetPlayerName(playerid,NomeDoPlayer,MAX_PLAYER_NAME);
    for(new l; v <MAX_PLAYERS; l++)
    if(ppFPS < 18);
    format(string,sizeof(string),"%s (%i) - FPS: %d",NomeDoPlayer,l,ppFPS[l]);
    ShowPlayerDialog(playerid,DIALOG_LAGADOS,DIALOG_STYLE_MSGBOX,"Lagados (Menos que 18 FPs):",string,"Fechar","Voltar");
    return 1;
}



Re: comando - Lucas_Henrique - 05.10.2012

up!!!


Re: comando - .FuneraL. - 05.10.2012

pawn Код:
dcmd_laggers(playerid)
{
    new ppFPS[MAX_PLAYERS] = GetPVarInt(playerid, "PVarFPS");
    new string[128], string2[1000], NomeDoPlayer[24];
    for(new i; i < MAX_PLAYERS; i++)
    {
         GetPlayerName(i, NomeDoPlayer, 24);
         if(ppFPS[i] < 18)
         {
              format(string, sizeof(string), "%s (%i) - FPS: %d", NomeDoPlayer, i, ppFPS[i]);
              strcat(string2, string, sizeof(string2));
              ShowPlayerDialog(playerid, DIALOG_LAGADOS, DIALOG_STYLE_MSGBOX, "Lagados (Menos que 18 FPS)", string2, "Fechar", "Voltar");
         }
     }
     return 1;
}
Tenta assim