SA-MP Forums Archive
[Ajuda] loop bugadгo - 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] loop bugadгo (/showthread.php?tid=595654)



loop bugadгo - F1N4L - 06.12.2015

Eu to com um problema neste code, ele verifica os reports de todos os players, porйm quando eu saio e entro ele diz que nгo tem reports sendo q na database aparece == 1

code
PHP код:
#define LOOP_PLAYERS(%0) \
            
for(new %0_%GetPlayerPoolSize(); %<= _%0IsPlayerConnected(%0); %0++)
CMD:readreport(playeridparams[])
{
    new 
DIALOG[98+670], string[128], bool:count false;
    
LOOP_PLAYERS(i)
    {
        if(
gUser[i][u_bugtemp] == 1)
        {
            new 
bugkey DB::RetrieveKey(gGlobal[s_bugreporttable], "username"ReturnPlayerName(playerid));
            
DB::GetStringEntry(gGlobal[s_bugreporttable], bugkey"bugreport"string);
            
format(stringsizeof(string), "Player: %s\nReport: %s\nRead: %i\n\n"ReturnPlayerName(i), stringgUser[playerid][u_readbugreport]);
            
strcat(DIALOGstring);
            
count true;
        }
    }
    if(! 
count) return SendClientMessage(playeridCOLOR_FIREBRICK"ERROR: No muted players in the server.");
    else
    {
        
ShowPlayerDialog(playeridDIALOG_COMMONDIALOG_STYLE_MSGBOX"Muted players"DIALOG"Close""");
    }
    return 
1;

Este code funciona enquanto o player estб ingame, preciso que mesmo offline apareзa os reports de bugs...


Re: loop bugadгo - EditPawn - 06.12.2015

Tenta dessa forma

PHP код:
#define LOOP_PLAYERS(%0) \ 
            
for(new %0; %!= GetPlayerPoolSize(); %0++) \
                if(
IsPlayerConnected(%0)) 



Re: loop bugadгo - F1N4L - 06.12.2015

Quote:
Originally Posted by EditPawn
Посмотреть сообщение
Tenta dessa forma

PHP код:
#define LOOP_PLAYERS(%0) \ 
            
for(new %0; %!= GetPlayerPoolSize(); %0++) \
                if(
IsPlayerConnected(%0)) 
Pior q nem conta, conectado ou nгo....