Pls help me find this script
#1

er.. plugin that make u stop the car and cant run if car health is low

pls help me =/\=

T_T
Reply
#2

Not really a plugin but you could use something like this.


pawn Код:
forward Check_Veh();

public Check_Veh()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerState(i) == 2)
        {
            new Float:health, vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
            vehicleid = GetPlayerVehicleID(i);
            GetVehicleHealth(vehicleid, health);
            GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
            if(health < 300) // less then 30%
            {
                SetVehicleParamsEx(vehicleid, false, lights, alarm, doors, bonnet, boot, objective);
            }
        }
    }
}

public OnGameModeInit()
{
    SetTimer("Check_Veh", 1000, true);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)