[Pedido] Fumaзa preta carro para e nгo liga mais
#1

Eu queria saber se alguem tem algum codigo que quando o carro fica com fumaзa preta ele para de funcionar ou seja nгo liga mais de jeito nenhum.
Muito obrigado, procurei procurei e nгo achei.
Reply
#2

Help-me
Reply
#3

pawn Код:
new Float:Vida;
new veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, Vida);

if(vida < 30)
    ToglePlayerControllable(playerid, 0);
pequena base...
Reply
#4

Isto deve resolver o seu problema .



Coloque :


pawn Код:
//No OnGameModeInit/OnFilterScriptInit:


SetTimer("VeiculosQuebrados", 1000, true);



//E, no Final do GM/FS:


forward VeiculosQuebrados();
public VeiculosQuebrados()
{
    for(new x = 1; x <= MAX_VEHICLES; x++)
    {
        new Float:Lataria;
        new bool:Funciona;
        GetVehicleHealth(x, Lataria);
        if(Lataria > 400.0)     Funciona = true;
        else    Funciona = false;
        new Partes[7];
        GetVehicleParamsEx(x, Partes[0], Partes[1], Partes[2], Partes[3], Partes[4], Partes[5], Partes[6]);
        Partes[0] = Funciona;
        SetVehicleParamsEx(x, Partes[0], Partes[1], Partes[2], Partes[3], Partes[4], Partes[5], Partes[6]);
    }
    return 1;
}


Espero ter ajudado .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)