15.04.2014, 07:56
Hello Guys,
Ive got the following Problem.
Ive made an script that asks if the Vehicle health is <= 300, it should turn the engine off.
But it doesnt seems to ork... ive got no Errors but nothing happend in game, whats from with it?
Hopefully someone can answear my question cuz am doing an Banger Racing script if anyone know what Bnager Racing is and maybe intrested in it, PM me.
Cheers Lads
on onFilterScriptinit ive got this
SetTimer("EngineBroke",200,1);
then
forward EngineBroke(playerid, vehicleid);
public EngineBroke(playerid, vehicleid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:vhealth;
new veh;
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, vhealth);
if(vhealth <= 300)
{
ToggleEngine(vehicleid, VEHICLE_PARAMS_OFF);
return 1;
}
return 1;
}
return 1;
}
yes, ToggleEngine is defined and works without Problems...
Ive got the following Problem.
Ive made an script that asks if the Vehicle health is <= 300, it should turn the engine off.
But it doesnt seems to ork... ive got no Errors but nothing happend in game, whats from with it?
Hopefully someone can answear my question cuz am doing an Banger Racing script if anyone know what Bnager Racing is and maybe intrested in it, PM me.
Cheers Lads
on onFilterScriptinit ive got this
SetTimer("EngineBroke",200,1);
then
forward EngineBroke(playerid, vehicleid);
public EngineBroke(playerid, vehicleid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:vhealth;
new veh;
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, vhealth);
if(vhealth <= 300)
{
ToggleEngine(vehicleid, VEHICLE_PARAMS_OFF);
return 1;
}
return 1;
}
return 1;
}
yes, ToggleEngine is defined and works without Problems...