OnVehicleHealthChange
#1

Maybe someone has got this function? I really need it. Yes, I have searched for it but.. 0! :X
Reply
#2

pawn Код:
new oldVH[MAX_VEHICLES],newVH[MAX_VEHICLES];




public OnVehicleHealthChange(vehicleid, newhealth, oldhealth)
{
    return 1;
}
public OnGameModeInit()
{
    SetTimer("VehicleCheck", 1000, true);
    return 1;
}

public VehicleCheck()
{
    for(new v = 1; v <= MAX_VEHICLES; v++)
    {
        new Float:health;
        GetVehicleHealth(v, health);
        newVH[v] = floatround(health);
        if(newVH[v] != oldVH[v])
        {
            OnVehicleHealthChange(v, newVH[v], oldVH[v]);
            oldVH[v] = newVH[v];
        }
    }
    return 1;
}

idk ..
Reply
#3

Maybe this topic helps you?

http://forum.sa-mp.com/showthread.ph...nVehicleDamage

(I searched for OnVehicleDamage, as that sounds more logical to me).
Reply
#4

oh now i remember where i take the function i post xD time ago
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)