[Ajuda] Mandar relatуrio de 60 em 60 segundos..
#1

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) == 0 || strcmp(cmd, "/relato", true) == 0)
     {
          if(
IsPlayerConnected(playerid))
        {
            if(
gPlayerLogged[playerid] == 0)
            {
                
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб logado!");
                return 
true;
            }
            
GetPlayerName(playerid, sendername, sizeof(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(playerid, COLOR_GRAD2, "USE: /relatorio [texto]");
                return 
true;
            }
            if(
PlayerInfo[playerid][pVIP] == 1)
            {
                new 
lol;
                
lol = PlayerInfo[playerid][pVIP];
                
format(string, sizeof(string), "Relatуrio VIP de %s - ID[%d]: %s ", sendername, playerid, lol, (result));
                
//HelperBroadCast(COLOR_YELLOW,string,1);
                
ABroadCast(COLOR_LIGHTBLUE,string,1);
                
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu relatуrio VIP foi enviado aos admins..");
            }
            else if(
PlayerInfo[playerid][pVIP] == 2)
            {
                new 
lol;
                
lol = PlayerInfo[playerid][pVIP];
                
format(string, sizeof(string), "Relatуrio VIP-POWER de %s - ID[%d]: %s ", sendername, playerid, lol, (result));
                
//HelperBroadCast(COLOR_YELLOW,string,1);
                
ABroadCast(COLOR_LIGHTBLUE,string,1);
                
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu relatуrio VIP-POWER foi enviado aos admins..");
            }
            else
            {
                
format(string, sizeof(string), "Relatуrio de %s(%d): %s ", sendername, playerid, (result));
                
//HelperBroadCast(COLOR_YELLOW,string,1);
                
ABroadCast(COLOR_YELLOW,string,1);
                
SendClientMessage(playerid, COLOR_YELLOW, "Seu relatуrio foi enviado aos admins..");
            }
        }
        return 
true;
    } 
Reply
#2

so pesquisar aqui tem a resposta"

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

Nem vi o tуpico. KK..

Valeu aн! :]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)