Guten Tag,
obwohl mein Auto 1000 Health besitzt sagt er das er ein Motor Schaden hätte.
Wo liegt der Fehler?
if(newkeys == KEY_NO){
if(GetPlayerVehicleSeat(playerid) == 0){
new car = GetPlayerVehicleID(playerid);
if(GetVehicleModel(car) == 509 || GetVehicleModel(car) == 481 || GetVehicleModel(car) == 510){return 1;}
new vehicleid = GetPlayerVehicleID(playerid), Float:vhp;
if(GetVehicleHealth(vehicleid, vhp) <= 300)
{
SendClientMessage(playerid,Rot,"Dieses Fahrzeug hat einen Motorschaden.");
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
Engine[car] = false;
}
else if(Engine[car] == false){
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
Engine[car] = true;
}
else{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
Engine[car] = false;
}
}
}