SA-MP Forums Archive
[Ajuda] Mandar relatуrio de 60 em 60 segundos.. - 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] Mandar relatуrio de 60 em 60 segundos.. (/showthread.php?tid=388499)



Mandar relatуrio de 60 em 60 segundos.. - duuuwh - 29.10.2012

Gostaria que se alguem mandasse relatуrio, ele podesse mandar outro em apenas 60 segundos, e ao ele tentar mandar com menos de 60 segundos, aparecer esta mensagem: " Vocк sу pode mandar um relatуrio por minuto "

PHP код:
if(strcmp(cmd"/relatorio"true) == || strcmp(cmd"/relato"true) == 0)
     {
          if(
IsPlayerConnected(playerid))
        {
            if(
gPlayerLogged[playerid] == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"Vocк nгo estб logado!");
                return 
true;
            }
            
GetPlayerName(playeridsendernamesizeof(sendername));
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[64];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /relatorio [texto]");
                return 
true;
            }
            if(
PlayerInfo[playerid][pVIP] == 1)
            {
                new 
lol;
                
lol PlayerInfo[playerid][pVIP];
                
format(stringsizeof(string), "Relatуrio VIP de %s - ID[%d]: %s "sendernameplayeridlol, (result));
                
//HelperBroadCast(COLOR_YELLOW,string,1);
                
ABroadCast(COLOR_LIGHTBLUE,string,1);
                
SendClientMessage(playeridCOLOR_LIGHTBLUE"Seu relatуrio VIP foi enviado aos admins..");
            }
            else if(
PlayerInfo[playerid][pVIP] == 2)
            {
                new 
lol;
                
lol PlayerInfo[playerid][pVIP];
                
format(stringsizeof(string), "Relatуrio VIP-POWER de %s - ID[%d]: %s "sendernameplayeridlol, (result));
                
//HelperBroadCast(COLOR_YELLOW,string,1);
                
ABroadCast(COLOR_LIGHTBLUE,string,1);
                
SendClientMessage(playeridCOLOR_LIGHTBLUE"Seu relatуrio VIP-POWER foi enviado aos admins..");
            }
            else
            {
                
format(stringsizeof(string), "Relatуrio de %s(%d): %s "sendernameplayerid, (result));
                
//HelperBroadCast(COLOR_YELLOW,string,1);
                
ABroadCast(COLOR_YELLOW,string,1);
                
SendClientMessage(playeridCOLOR_YELLOW"Seu relatуrio foi enviado aos admins..");
            }
        }
        return 
true;
    } 



Re: Mandar relatуrio de 60 em 60 segundos.. - Q.I - 29.10.2012

so pesquisar aqui tem a resposta"

https://sampforum.blast.hk/showthread.php?pid=2193698#pid2193698


Re: Mandar relatуrio de 60 em 60 segundos.. - duuuwh - 29.10.2012

Nem vi o tуpico. KK..

Valeu aн! :]