Portal SAMP
Sistema Do Carro Não Explodir - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: Sistema Do Carro Não Explodir (/showthread.php?tid=878)



Sistema Do Carro Não Explodir - Carlos 嫌 - 07/03/2021

Bom Eu Queria 1 Sistema Que Quando o Carro Chega-se No Valor 300 De Lataria Ele Meio Que Parace e Não Liga-se Eu Ate Consegui Fazer Pra Ele Ficar Reparando Sempre No Valor 300 Mais Eu Não Me Lembro De Como Faz Ele Parar Se Alguem Puder Estar Postando o Sistema Completo Agradeço Muito


RE: Sistema Do Carro Não Explodir - Dr Editor - 08/03/2021

Código:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    new Float:health;
    GetVehicleHealth(vehicleid, health);
   
    if(health <= 300.0)
    {
        SetVehicleHealth(vehicleid, 300.0);
        SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0);
    }
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float:health;
    GetVehicleHealth(vehicleid, health);
   
    if(health <= 300.0)
        SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0);
    return true;
}