[Ajuda] GetTime
#1

PHP код:
new time gettime();
    switch( 
time LastDeathplayerid ] )
    {
        case 
.. 3:
        {
            
DeathSpamplayerid }++;
            if( 
DeathSpamplayerid } == )
            {
                
SendClientMessage(playeridred"[Anti-Hack]: {FFFFFF}Vocк foi Kickado por suspeita de {FF0000}Fake Kill {00FF00}(Mortes Falsas).");
                
Kick(playerid);
                
                
format(gStringsizeof(gString), "[Anti-Hack]: {FFFFFF}%s [ID: %d] foi Kickado por suspeita de {FF0000}Fake Kill {00FF00}(Mortes Falsas)."Nome(playerid), playerid);
                
SendClientMessageToAll(redgString);
                return 
1;
            }
        }
        default: 
DeathSpamplayerid } = 0;
    }
    
LastDeathplayerid ] = time
Este cуdigo estб dando 1 warning, nгo consigo retira-lo!

Код:
...(7167) : warning 219: local variable "time" shadows a variable at a preceding level
Linha:

PHP код:
    new time gettime(); 
Crйditos do cуdigo: Lorenc_.
Reply
#2

jб possui uma vбriavel time no servidor, exclua uma. eu acho
Reply
#3

pawn Код:
new ptime = gettime();
    switch( ptime - LastDeath[ playerid ] )
    {
        case 0 .. 3:
        {
            DeathSpam{ playerid }++;
            if( DeathSpam{ playerid } == 3 )
            {
                SendClientMessage(playerid, red, "[Anti-Hack]: {FFFFFF}Vocк foi Kickado por suspeita de {FF0000}Fake Kill {00FF00}(Mortes Falsas).");

                Kick(playerid);
                 
                format(gString, sizeof(gString), "[Anti-Hack]: {FFFFFF}%s [ID: %d] foi Kickado por suspeita de {FF0000}Fake Kill {00FF00}(Mortes Falsas).", Nome(playerid), playerid);
                SendClientMessageToAll(red, gString);
                return 1;
            }
        }
        default: DeathSpam{ playerid } = 0;
    }
    LastDeath[ playerid ] = ptime;
Reply
#4

Sу mudar o nome da variбvel, como o Paulor fez acima.
Reply
#5

Puts, kkkk...

Nem tinha pensado nisso, valeu!!

Reply
#6

E depois fala


" Se vocк nгo souber isso se mata" no meu post, e nгo sabe isso...

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)