[Ajuda] Flood mensagem public
#4

PHP код:
//  Abaixo das Includes 
new PlayerAvisado[MAX_PLAYERS] = { 0, ... };
forward CheckCarHealth();  
public 
CheckCarHealth()  
{  
    for(new 
0GetMaxPlayers(); i++)  
    {  
        if (
IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && PlayerAvisado[i] <= gettime() )  
        {  
            new 
Float:health;  
            
GetVehicleHealth(GetPlayerVehicleID(i),health);  
            if(
health <= 400)  
            {  
                if(
GetPlayerState(i) == PLAYER_STATE_DRIVER)  
                {  
                    new 
motlualarporcappormaob;  
                    new 
carro GetPlayerVehicleID(i);  
                    
GetVehicleParamsEx(carromotlualarporcappormaob);  
                    
SetVehicleParamsEx(carroVEHICLE_PARAMS_OFFVEHICLE_PARAMS_OFFalarporcappormaob);  
                    
SetVehicleHealth(carro400);  
                } 
                 
                
SendClientMessage(i, -1"{B4B5B7}| INFO | Seu veнculo parou de funcionar, chame um mecвnico (/mecanico)!");  
                
PlayerAvisado[i] = gettime() + 10// em 10 segundos ele receberб o aviso novamente
                
return 1;  
            }  
        }  
    }  
    return 
1;  

Reply


Messages In This Thread
Flood mensagem public - by LucasDias - 01.07.2015, 02:39
Re: Flood mensagem public - by Gii - 01.07.2015, 02:51
Re: Flood mensagem public - by LucasDias - 01.07.2015, 03:16
Re: Flood mensagem public - by Gii - 01.07.2015, 04:08
Re: Flood mensagem public - by LucasDias - 01.07.2015, 04:49

Forum Jump:


Users browsing this thread: 2 Guest(s)