Problem mit Tank System

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo liebe Community ich habe Folgendes Problem,


    ich habe einen Befehl gemacht (/accar) der InGame Autos Erstellt und Sofort Saved und beim Start des Servers auch alle Automatisch laden tut (über dini) dazu habe ich noch nen Tank System gemacht der auch Super funktioniert aber beim laden der Autos nur ein Auto den geladenen Tank beckommt und aller ander nicht (sprich ein auto Tank=100 alle anderen Tank=0) und weis einfach nicht wo der Fehler liegt



    ocmd:accar(playerid,params[])
    {
    new vID,fID, staat, Float:x, Float:z, Float:y, Float:r, Color1, Color2;
    GetPlayerPos(playerid,x,y,z);
    GetPlayerFacingAngle(playerid,r);
    if(sscanf(params,"iiiii",vID,Color1,Color2,fID,staat))return SendClientMessage(playerid,rot,"/accar [Vehicle ID][Farbe 1][Farbe 2][Fraktions ID (Wenn Staatfahrzeug 0)][Staat (Wenn ein Staats Fahrzeug 1)]");
    if(vID<400||vID>611)return SendClientMessage(playerid,rot,"Die Vehicle ID muss zwischen 400 und 611 liegen!");
    if(fID==0)
    {
    if(staat==0)
    {
    SendClientMessage(playerid, rot,"Du musst endweder das Auto als Staats oder als Fraktions Fahrzeug Melden!");
    return 1;
    }
    }
    new i = getFreeCarID()+1;
    new string[164];
    format(string,sizeof string,"/autos/car %i.txt",i);
    dini_Create(string);
    dini_FloatSet(string,"x",x);
    dini_FloatSet(string,"y",y);
    dini_FloatSet(string,"z",z);
    dini_FloatSet(string,"r",r);
    dini_IntSet(string,"VehicleID",vID);
    dini_IntSet(string,"Color_1",Color1);
    dini_IntSet(string,"Color_2",Color2);
    dini_IntSet(string,"Fraktion",fID);
    dini_IntSet(string,"Staat",staat);
    new mycar;
    mycar=CreateVehicle(vID,x,y,z,r,Color1,Color2,0);
    PutPlayerInVehicle(playerid,mycar,0);
    new tID = getFreeTankID();
    VEHICLE_TANK[tID][td_tank]= 100.0;
    VEHICLE_TANK[tID][td_vehicle_id]= mycar;
    VEHICLE_TANK[tID][td_status]=1;
    return 1;
    }



    LoadCars()
    {
    for( new i=1; i<sizeof vInfo; i++)
    {
    if(vInfo[i][v_id_x]!=0)continue;
    new string[164];
    format(string,sizeof string,"/autos/car %i.txt",i);
    if(!dini_Exists(string))continue;
    new vID = getFreeCarID();
    SetVehicleParamsEx(i,0,0,0,0,0,0,0);
    vInfo[vID][v_db_id]= i;
    vInfo[vID][v_vehicleid]= dini_Int(string,"VehicleID");
    vInfo[vID][v_x]= dini_Float(string,"x");
    vInfo[vID][v_y]= dini_Float(string,"y");
    vInfo[vID][v_z]= dini_Float(string,"z");
    vInfo[vID][v_r]= dini_Float(string,"r");
    vInfo[vID][v_paintjob]=dini_Int(string,"v_paintjob");
    vInfo[vID][v_color_1]= dini_Int(string,"Color_1");
    vInfo[vID][v_color_2]= dini_Int(string,"Color_2");
    vInfo[vID][v_fraktion]= dini_Int(string,"Fraktion");
    new tID = getFreeTankID();
    VEHICLE_TANK[tID][td_tank]= dini_Float(string,"Tank");

    vInfo[vID][v_id_x]=CreateVehicle(vInfo[vID][v_vehicleid],vInfo[vID][v_x],vInfo[vID][v_y],vInfo[vID][v_z],vInfo[vID][v_r],vInfo[vID][v_color_1],vInfo[vID][v_color_2],0);
    ChangeVehiclePaintjob(vInfo[vID][v_id_x],vInfo[vID][v_paintjob]);
    VEHICLE_TANK[tID][td_vehicle_id]= vInfo[vID][v_id_x];
    VEHICLE_TANK[tID][td_status]=1;
    SetVehicleParamsEx(vInfo[vID][v_id_x],0,0,0,0,0,0,0);
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_spoiler"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_hood"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_roof"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_sideskirt"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_lamps"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_nitro"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_exhaust"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_wheels"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_stereo"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_hydraulics"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_front_bumper"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_rear_bumper"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_vent_left"));
    AddVehicleComponent(vInfo[vID][v_id_x],dini_Int(string,"v_vent_right"));
    printf("Auto// Verzeichnes: ../scriptfiles%s ID: %i geladen!",string,vID);
    }
    return 1;
    }



    SaveCars()
    {
    for(new i=0; i<sizeof(vInfo); i++)
    {
    if(vInfo[i][v_id_x]==0)continue;
    new id_x = vInfo[i][v_db_id];
    new string[164];
    format(string,sizeof string,"/autos/car %i.txt",id_x);
    new color1,color2;
    for(new io=0; io<sizeof VEHICLE_TANK; io++)
    {
    new tID=VEHICLE_TANK[io][td_vehicle_id];
    dini_FloatSet(string,"Tank",VEHICLE_TANK[tID][td_tank]);
    }
    GetVehicleColor(id_x, color1,color2);
    vInfo[id_x][v_color_1]=color1;
    vInfo[id_x][v_color_2]=color2;
    vInfo[id_x][v_spoiler]=GetVehicleComponentInSlot(id_x,0);
    vInfo[id_x][v_hood]=GetVehicleComponentInSlot(id_x,1);
    vInfo[id_x][v_roof]=GetVehicleComponentInSlot(id_x,2);
    vInfo[id_x][v_sideskirt]=GetVehicleComponentInSlot(id_x,3);
    vInfo[id_x][v_lamps]=GetVehicleComponentInSlot(id_x,4);
    vInfo[id_x][v_nitro]=GetVehicleComponentInSlot(id_x,5);
    vInfo[id_x][v_exhaust]=GetVehicleComponentInSlot(id_x,6);
    vInfo[id_x][v_wheels]=GetVehicleComponentInSlot(id_x,7);
    vInfo[id_x][v_stereo]=GetVehicleComponentInSlot(id_x,8);
    vInfo[id_x][v_hydraulics]=GetVehicleComponentInSlot(id_x,9);
    vInfo[id_x][v_front_bumper]=GetVehicleComponentInSlot(id_x,10);
    vInfo[id_x][v_rear_bumper]=GetVehicleComponentInSlot(id_x,11);
    vInfo[id_x][v_vent_left]=GetVehicleComponentInSlot(id_x,12);
    vInfo[id_x][v_vent_right]=GetVehicleComponentInSlot(id_x,13);
    ChangeVehiclePaintjob(vInfo[id_x][v_id_x],vInfo[id_x][v_paintjob]);
    dini_IntSet(string,"Color_1",vInfo[id_x][v_color_1]);
    dini_IntSet(string,"Color_2",vInfo[id_x][v_color_2]);
    dini_IntSet(string,"v_spoiler",vInfo[id_x][v_spoiler]);
    dini_IntSet(string,"v_hood",vInfo[id_x][v_hood]);
    dini_IntSet(string,"v_roof",vInfo[id_x][v_roof]);
    dini_IntSet(string,"v_sideskirt",vInfo[id_x][v_sideskirt]);
    dini_IntSet(string,"v_lamps",vInfo[id_x][v_lamps]);
    dini_IntSet(string,"v_nitro",vInfo[id_x][v_nitro]);
    dini_IntSet(string,"v_exhaust",vInfo[id_x][v_exhaust]);
    dini_IntSet(string,"v_wheels",vInfo[id_x][v_wheels]);
    dini_IntSet(string,"v_stereo",vInfo[id_x][v_stereo]);
    dini_IntSet(string,"v_hydraulics",vInfo[id_x][v_hydraulics]);
    dini_IntSet(string,"v_front_bumper",vInfo[id_x][v_front_bumper]);
    dini_IntSet(string,"v_rear_bumper",vInfo[id_x][v_rear_bumper]);
    dini_IntSet(string,"v_vent_left",vInfo[id_x][v_vent_left]);
    dini_IntSet(string,"v_vent_right",vInfo[id_x][v_vent_right]);
    dini_IntSet(string,"v_paintjob",vInfo[id_x][v_paintjob]);

    }
    return 1;
    }



    public Sekunde()
    {
    for(new i=0; i<sizeof vInfo; i++)
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine==0)continue;
    new tID;
    for(new ipp=0; ipp<sizeof VEHICLE_TANK; ipp++)
    {
    if(VEHICLE_TANK[ipp][td_status]==0)continue;
    tID=ipp;
    }
    printf("Auto %i Tank %i",i,VEHICLE_TANK[tID][td_tank]);
    print("Motor ist an!");
    VEHICLE_TANK[tID][td_tank]=VEHICLE_TANK[tID][td_tank]-VEHICLE_TANK_ABZUG;
    printf("0.2L wurden abgezogen Jetzt: %f",VEHICLE_TANK[tID][td_tank]);
    for(new pi=0; pi<MAX_PLAYERS; pi++)
    {
    if(GetPlayerVehicleID(pi)==VEHICLE_TANK[tID][td_vehicle_id])
    {
    if(VEHICLE_TANK[tID][td_tank]<=0)
    {
    engine=0;
    SetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(pi,rot," Der Tank ist Leer!");
    return 1;
    }
    }
    if(GetVehicleModel(i)==462)
    {
    VEHICLE_TANK[tID][td_tank]=100.0;
    new string[164];
    format(string,sizeof string,"Tank: %iL",floatround(VEHICLE_TANK[tID][td_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    return 1;
    }
    if(vInfo[i][v_vehicleid]==462)
    {
    VEHICLE_TANK[tID][td_tank]=100.0;
    new string[164];
    format(string,sizeof string,"Tank: %iL",floatround(VEHICLE_TANK[tID][td_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    return 1;
    }
    new string[164];
    if(!IsPlayerInAnyVehicle(pi))continue;
    print("Spieler gefunden!");
    if(GetPlayerVehicleSeat(pi)==0)
    {
    print("fahrer gefunden");
    format(string,sizeof string,"Tank: %iL",floatround(VEHICLE_TANK[tID][td_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    print("Anzeige aktualisiert!");
    if(VEHICLE_TANK[tID][td_tank]<=0)
    {
    SendClientMessage(pi,rot,"Dein Tank ist leer!");
    engine=0;
    SetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    }
    }
    }
    }
    }



    Schonmal Vielen dank für alle Hilfreichen Antworten
    LG: xlTreasurelx

  • Du bist da mit dem Index und der vehicle ID durcheinander gekommen.
    Außerdem sind die Tank-Schleifen immer bis ans Ende gelaufen.


    Versuche es so:
    SaveCars()
    {
    for(new i=0; i<sizeof(vInfo); i++)
    {
    if(vInfo[i][v_id_x]==0)continue;
    new string[64];
    format(string,sizeof string,"/autos/car %i.txt",vInfo[i][v_db_id]);
    new color1,color2;
    for(new io=0; io<sizeof VEHICLE_TANK; io++)
    {
    if(VEHICLE_TANK[io][td_vehicle_id] != vInfo[i][v_id_x]) continue;
    dini_FloatSet(string,"Tank",VEHICLE_TANK[io][td_tank]);
    break;
    }
    GetVehicleColor(vInfo[i][v_id_x], color1,color2);
    vInfo[i][v_color_1]=color1;
    vInfo[i][v_color_2]=color2;
    vInfo[i][v_spoiler]=GetVehicleComponentInSlot(vInfo[i][v_id_x],0);
    vInfo[i][v_hood]=GetVehicleComponentInSlot(vInfo[i][v_id_x],1);
    vInfo[i][v_roof]=GetVehicleComponentInSlot(vInfo[i][v_id_x],2);
    vInfo[i][v_sideskirt]=GetVehicleComponentInSlot(vInfo[i][v_id_x],3);
    vInfo[i][v_lamps]=GetVehicleComponentInSlot(vInfo[i][v_id_x],4);
    vInfo[i][v_nitro]=GetVehicleComponentInSlot(vInfo[i][v_id_x],5);
    vInfo[i][v_exhaust]=GetVehicleComponentInSlot(vInfo[i][v_id_x],6);
    vInfo[i][v_wheels]=GetVehicleComponentInSlot(vInfo[i][v_id_x],7);
    vInfo[i][v_stereo]=GetVehicleComponentInSlot(vInfo[i][v_id_x],8);
    vInfo[i][v_hydraulics]=GetVehicleComponentInSlot(vInfo[i][v_id_x],9);
    vInfo[i][v_front_bumper]=GetVehicleComponentInSlot(vInfo[i][v_id_x],10);
    vInfo[i][v_rear_bumper]=GetVehicleComponentInSlot(vInfo[i][v_id_x],11);
    vInfo[i][v_vent_left]=GetVehicleComponentInSlot(vInfo[i][v_id_x],12);
    vInfo[i][v_vent_right]=GetVehicleComponentInSlot(vInfo[i][v_id_x],13);
    ChangeVehiclePaintjob(vInfo[i][v_id_x],vInfo[i][v_paintjob]);
    dini_IntSet(string,"Color_1",vInfo[i][v_color_1]);
    dini_IntSet(string,"Color_2",vInfo[i][v_color_2]);
    dini_IntSet(string,"v_spoiler",vInfo[i][v_spoiler]);
    dini_IntSet(string,"v_hood",vInfo[i][v_hood]);
    dini_IntSet(string,"v_roof",vInfo[i][v_roof]);
    dini_IntSet(string,"v_sideskirt",vInfo[i][v_sideskirt]);
    dini_IntSet(string,"v_lamps",vInfo[i][v_lamps]);
    dini_IntSet(string,"v_nitro",vInfo[i][v_nitro]);
    dini_IntSet(string,"v_exhaust",vInfo[i][v_exhaust]);
    dini_IntSet(string,"v_wheels",vInfo[i][v_wheels]);
    dini_IntSet(string,"v_stereo",vInfo[i][v_stereo]);
    dini_IntSet(string,"v_hydraulics",vInfo[i][v_hydraulics]);
    dini_IntSet(string,"v_front_bumper",vInfo[i][v_front_bumper]);
    dini_IntSet(string,"v_rear_bumper",vInfo[i][v_rear_bumper]);
    dini_IntSet(string,"v_vent_left",vInfo[i][v_vent_left]);
    dini_IntSet(string,"v_vent_right",vInfo[i][v_vent_right]);
    dini_IntSet(string,"v_paintjob",vInfo[i][v_paintjob]);
    }
    return 1;
    }


    public Sekunde()
    {
    for(new i=0; i<sizeof vInfo; i++)
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine==0)continue;
    new tID;
    for(new ipp=0; ipp<sizeof VEHICLE_TANK; ipp++)
    {
    if(VEHICLE_TANK[ipp][td_vehicle_id] != vInfo[i][v_id_x]) continue;
    tID=ipp;
    break;
    }
    printf("Auto %i Tank %i",i,VEHICLE_TANK[tID][td_tank]);
    print("Motor ist an!");
    VEHICLE_TANK[tID][td_tank]=VEHICLE_TANK[tID][td_tank]-VEHICLE_TANK_ABZUG;
    printf("0.2L wurden abgezogen Jetzt: %f",VEHICLE_TANK[tID][td_tank]);
    for(new pi=0; pi<MAX_PLAYERS; pi++)
    {
    if(!IsPlayerInAnyVehicle(pi))continue;
    print("Spieler gefunden!");
    if(GetPlayerVehicleID(pi)==VEHICLE_TANK[tID][td_vehicle_id])
    {
    if(VEHICLE_TANK[tID][td_tank]<=0)
    {
    engine=0;
    SetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(pi,rot," Der Tank ist Leer!");
    break;
    }
    }
    if(GetVehicleModel(i)==462)
    {
    VEHICLE_TANK[tID][td_tank]=100.0;
    new string[164];
    format(string,sizeof string,"Tank: %iL",floatround(VEHICLE_TANK[tID][td_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    break;
    }
    if(vInfo[i][v_vehicleid]==462)
    {
    VEHICLE_TANK[tID][td_tank]=100.0;
    new string[164];
    format(string,sizeof string,"Tank: %iL",floatround(VEHICLE_TANK[tID][td_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    break;
    }
    new string[164];
    if(GetPlayerVehicleSeat(pi)==0)
    {
    print("fahrer gefunden");
    format(string,sizeof string,"Tank: %iL",floatround(VEHICLE_TANK[tID][td_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    print("Anzeige aktualisiert!");
    if(VEHICLE_TANK[tID][td_tank]<=0)
    {
    SendClientMessage(pi,rot,"Dein Tank ist leer!");
    engine=0;
    SetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    }
    }
    }
    }
    return 1;
    }

  • Gegenfrage:
    Hat es einen bestimmten Grund, warum du ein extra Array für den Tank machst?


    Meiner Meinung nach wäre es wesentlich sinnvoller den Tank so zu nutzen:
    vInfo[i][v_tank]
    Ohne ein extra Array. Das würde einen Haufen Arbeit sparen.

  • Ich hatte es so gemacht weil als ich es im vInfo reingepackt hatte hatte ich nur probleme und das war fürs erste nach dem ich einen extra array erstellt hatte erledigt aber jz tauchen immer mehr fehler auf



    //edit
    |
    |
    v



    public Sekunde()
    {
    for(new i=0; i<sizeof vInfo; i++)
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine==0)continue;
    printf("Auto %i Tank %i",i,vInfo[i][v_tank]);
    print("Motor ist an!");
    vInfo[i][v_tank]=vInfo[i][v_tank]-VEHICLE_TANK_ABZUG;
    printf("0.2L wurden abgezogen Jetzt: %f",vInfo[i][v_tank]);
    for(new pi=0; pi<MAX_PLAYERS; pi++)
    {
    if(!IsPlayerInAnyVehicle(pi))continue;
    print("Spieler gefunden!");
    if(vInfo[i][v_tank]<=0)
    {
    engine=0;
    SetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(pi,rot," Der Tank ist Leer!");
    break;
    }
    if(GetVehicleModel(i)==462)
    {
    vInfo[i][v_tank]=100.0;
    new string[164];
    format(string,sizeof string,"Tank: %iL",floatround(vInfo[i][v_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    break;
    }
    if(vInfo[i][v_vehicleid]==462)
    {
    vInfo[i][v_tank]=100.0;
    new string[164];
    format(string,sizeof string,"Tank: %iL",floatround(vInfo[i][v_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    break;
    }
    new string[164];
    if(GetPlayerVehicleSeat(pi)==0)
    {
    print("fahrer gefunden");
    format(string,sizeof string,"Tank: %iL",floatround(vInfo[i][v_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    print("Anzeige aktualisiert!");
    if(vInfo[i][v_tank]<=0)
    {
    SendClientMessage(pi,rot,"Dein Tank ist leer!");
    engine=0;
    SetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    }
    }
    }
    }


    So habe jz alles wieder in vInfo reingepackt!!!
    Habe aber immernoch das er überall den Tank gleichsetzt

  • So sieht es auf jeden Fall besser aus.


    Versuche es dann so:
    public Sekunde()
    {
    for(new i=0; i<sizeof vInfo; i++)
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vInfo[i][v_id_x],engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine!=1)continue;
    printf("Auto %i Tank %i",vInfo[i][v_id_x],vInfo[i][v_tank]);
    print("Motor ist an!");
    vInfo[i][v_tank]=vInfo[i][v_tank]-VEHICLE_TANK_ABZUG;
    printf("0.2L wurden abgezogen Jetzt: %f",vInfo[i][v_tank]);
    for(new pi=0; pi<MAX_PLAYERS; pi++)
    {
    if(GetPlayerVehicleID(pi) != vInfo[i][v_id_x] || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)continue;
    print("Spieler gefunden!");
    new string[164];
    if(vInfo[i][v_tank]<=0)
    {
    engine=0;
    SetVehicleParamsEx(vInfo[i][v_id_x],engine,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(pi,rot," Der Tank ist Leer!");
    break;
    }
    if(GetVehicleModel(vInfo[i][v_id_x])==462)
    {
    vInfo[i][v_tank]=100.0;
    format(string,sizeof string,"Tank: %iL",floatround(vInfo[i][v_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    break;
    }
    if(vInfo[i][v_vehicleid]==462)
    {
    vInfo[i][v_tank]=100.0;
    format(string,sizeof string,"Tank: %iL",floatround(vInfo[i][v_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    break;
    }
    if(GetPlayerVehicleSeat(pi)==0)
    {
    print("fahrer gefunden");
    format(string,sizeof string,"Tank: %iL",floatround(vInfo[i][v_tank]));
    PlayerTextDrawSetString(pi,Tacho_Fuel[pi],string);
    print("Anzeige aktualisiert!");
    if(vInfo[i][v_tank]<=0)
    {
    SendClientMessage(pi,rot,"Dein Tank ist leer!");
    engine=0;
    SetVehicleParamsEx(vInfo[i][v_id_x],engine,lights,alarm,doors,bonnet,boot,objective);
    }
    }
    }
    }
    return 1;
    }