14.04.2012, 20:06
er.. plugin that make u stop the car and cant run if car health is low
pls help me =/\=
T_T
pls help me =/\=
T_T
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);
}