[Pedido] Anti-Flood
#5

Final do script:
pawn Код:
stock IsPlayerFlooding(p, time){

    static
        getMessageTime [ MAX_PLAYERS char ]
    ;
   
   
    if ( getMessageTime { p } != 0 ) {
   
        if ( ( gettime() - getMessageTime { p }  ) < time ){
       
            getMessageTime { p } = gettime ( ) ;
            return !false ;
        }
    }
   
    getMessageTime { p } = gettime ( ) ;
    return !true ;
}


Usagem:
pawn Код:
if(IsPlayerFlooding(playerid, 3)){ // 3 segundos

    return SendClientMessage(playerid, -1,"Vocк estб frodano(3s)"),0;
}
Funзгo criada por min.
Reply


Messages In This Thread
Anti-Flood - by PSYRocK - 26.10.2012, 02:15
Re: Anti-Flood - by matheuspain - 26.10.2012, 02:25
Re: Anti-Flood - by PSYRocK - 26.10.2012, 02:30
Re: Anti-Flood - by matheuspain - 26.10.2012, 02:37
Re: Anti-Flood - by zSuYaNw - 26.10.2012, 02:42
Re: Anti-Flood - by PSYRocK - 26.10.2012, 02:54
Re: Anti-Flood - by PSYRocK - 26.10.2012, 02:56

Forum Jump:


Users browsing this thread: 1 Guest(s)