[Ajuda] Sistema de relatorio
#2

PHP код:
    if(strcmp(cmd"/relatorio"true) == || strcmp(cmd"/relato"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
Player[playerid][pLogged] == false)
            {
                
SendClientMessage(playeridCOR_ERRO"Vocк nгo estб logado!");
                return 
1;
            }
            
            if(
Player[playerid][DelayRelato] == true)
                return 
SendClientMessage(playeridCOR_ERRO"ERRO: Por favor, sem floodar o '/Relato' ou '/Duvida', Espere 1 minuto.");
            
            
GetPlayerName(playeridsendernamesizeof(sendername));
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            
            new 
Float:HPFloat:AM;
            
GetPlayerHealth(playeridHP);
            
GetPlayerArmour(playeridAM);
            
            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(playeridCOR_USOCORRETO"USE: /relatorio [texto]");
                return 
1;
            }
            
            if(
HP <= 60.0 && AM == 0.0)
            {
                
SendClientMessage(playeridCOR_USOCORRETO"Vocк estб praticamente Morrendo, nгo pode mais pedir vida!");
                return 
1;
            }
            
            
format(stringsizeof(string), "{00FF00}» RELATУRIO DE %s [ID: %d]: %s"sendernameplayeridresult);
            
ABroadCast(0xFFFF66FF,string,1);
            
SendClientMessage(playerid0xA9A9A9AA"Seu relatуrio foi enviado com sucesso a Administraзгo.");
            
Player[playerid][DelayRelato] = true;
            
SetTimerEx("TempoRelato"600000"i"playerid);
        }
        return 
1;
    } 
Reply


Messages In This Thread
Sistema de relatorio - by GMVega - 25.11.2016, 21:42
Re: Sistema de relatorio - by henriqueTL - 25.11.2016, 21:53
Re: Sistema de relatorio - by GMVega - 25.11.2016, 22:08
Re: Sistema de relatorio - by GMVega - 26.11.2016, 00:26
Re: Sistema de relatorio - by teteu99 - 26.11.2016, 00:30
Re: Sistema de relatorio - by GMVega - 26.11.2016, 00:33
Re: Sistema de relatorio - by teteu99 - 26.11.2016, 00:36
Re: Sistema de relatorio - by Psicotico - 26.11.2016, 00:37
Re: Sistema de relatorio - by GMVega - 26.11.2016, 00:40
Re: Sistema de relatorio - by GMVega - 26.11.2016, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)