[Ajuda] Carro quebrado
#2

PHP код:
forward CheckCarHealth();
public 
CheckCarHealth()
{
    new 
string[256];
    for (new 
i=0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            new 
sendername[MAX_PLAYER_NAME];
            new 
Float:health;
            
GetVehicleHealth(GetPlayerVehicleID(i),health);
            new 
carro GetPlayerVehicleID(i);
            new 
motlualarporcappormaob;
            if(
health <= 400)
            {
                if(
GetPlayerState(i) == PLAYER_STATE_DRIVER)
                {
                    
TogglePlayerControllable(i1);
                    
SendClientMessage(iCOLOR_LIGHTBLUE"Seu veiculo quebrou, tente ligar novamente ou ligue para um mecanico!");
                    
GetPlayerName(isendernamesizeof(sendername));
                    
format(stringsizeof(string), "* O veiculo de %s quebrou."sendername);
                    
ProxDetector(30.0istringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
GetVehicleParamsEx(carromotlualarporcappormaob);
                    
SetVehicleParamsEx(carroVEHICLE_PARAMS_OFFlualarporcappormaob);
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Carro quebrado - by druiida159 - 30.03.2015, 23:56
Re: Carro quebrado - by Whoo - 31.03.2015, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)