Hallo,
ich habe grade germerkt, dass anstatt 1% Prozent Benzin wie immer, jetzt 4, 5% oder sogar mehr alle 15 Sekunden abgezogen werden.
Vorher hatten wir das Problem nicht...
Meine public CheckGas():
public CheckGas()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
for(new v=0;v<MAX_VEHICLES;v++)
{
if(Gas[v] >= 1)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(v, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine == 1)
{
if(IsAPlane(v) || IsABoat(v) || IsANoTachoVeh(v)) { Gas[v]++; }
Gas[v]--;
}
}
else
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(v,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
}
}
}
}
return 1;
}
Und das Einzige, was ich in letzter Zeit geändert habe, ist die public OnVehicleSpawn(vehicleid) und die public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger).
Hier die beiden public's:
public OnVehicleSpawn(vehicleid)
{
if(vehicleid == fbiCars[51])
{
AddVehicleComponent(vehicleid, 1010);
AddVehicleComponent(vehicleid, 1087);
AddVehicleComponent(vehicleid, 1080);
AddVehicleComponent(vehicleid, 1029);
AddVehicleComponent(vehicleid, 1030);
AddVehicleComponent(vehicleid, 1031);
AddVehicleComponent(vehicleid, 1169);
AddVehicleComponent(vehicleid, 1141);
AddVehicleComponent(vehicleid, 1138);
ChangeVehiclePaintjob(vehicleid, 0);
}
else if(vehicleid == fbiCars[52])
{
AddVehicleComponent(vehicleid, 1010);
AddVehicleComponent(vehicleid, 1087);
AddVehicleComponent(vehicleid, 1080);
AddVehicleComponent(vehicleid, 1066);
AddVehicleComponent(vehicleid, 1070);
AddVehicleComponent(vehicleid, 1072);
AddVehicleComponent(vehicleid, 1160);
AddVehicleComponent(vehicleid, 1159);
AddVehicleComponent(vehicleid, 1158);
AddVehicleComponent(vehicleid, 1067);
ChangeVehiclePaintjob(vehicleid, 0);
}
else if(vehicleid == fbiCars[53])
{
AddVehicleComponent(vehicleid, 1010);
AddVehicleComponent(vehicleid, 1087);
AddVehicleComponent(vehicleid, 1080);
AddVehicleComponent(vehicleid, 1018);
AddVehicleComponent(vehicleid, 1017);
AddVehicleComponent(vehicleid, 1007);
AddVehicleComponent(vehicleid, 1023);
}
else if(vehicleid == fbiCars[54])
{
AddVehicleComponent(vehicleid, 1010);
AddVehicleComponent(vehicleid, 1087);
AddVehicleComponent(vehicleid, 1080);
}
else if(vehicleid == fbiCars[55])
{
AddVehicleComponent(vehicleid, 1010);
AddVehicleComponent(vehicleid, 1087);
AddVehicleComponent(vehicleid, 1080);
}
else if(vehicleid == fbiCars[56])
{
AddVehicleComponent(vehicleid, 1010);
AddVehicleComponent(vehicleid, 1087);
AddVehicleComponent(vehicleid, 1080);
}
else if(vehicleid == fbiCars[57])
{
AddVehicleComponent(vehicleid, 1010);
AddVehicleComponent(vehicleid, 1087);
AddVehicleComponent(vehicleid, 1080);
}
else if(vehicleid == fbiCars[58])
{
AddVehicleComponent(vehicleid, 1010);
}
else if(vehicleid == fbiCars[59])
{
AddVehicleComponent(vehicleid, 1010);
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger)
{
removeTimer[playerid] = SetTimerEx("RmPlFromVehicle", 333, true, "ii", playerid, vehicleid);
}
if(GetVehicleModel(vehicleid) == 510)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
return 1;
}
Hoffentlich kann mir jemand helfen
MfG