Label issue
#1

I am having a problem with some labels it load the label correct dealership label at first and eminently change to the gas station label here is the code I looked threw it and could not find it here the code


pawn Код:
LoadMainfileData()//mark
{
    INI_ParseFile(mainfilename,"GlobalControlData",false,false);
    new str[256];
    INI_ParseFile(restrictedcarsfilename,"LoadRestrictedCarData",false,false);
    for(new dealershipid;dealershipid < MAX_DEALERSHIPS;dealershipid++)
    {
        format(str,sizeof(str),"dealershipstate[%i]",dealershipid);
        dealershipstate[dealershipid] = QINI_Int(mainfilename,str);
        if((dealershipstate[dealershipid])==1)
        {
            INI_ParseFile(mainfilename,"LoadDealerShipData",false,true,dealershipid);
            format(str,sizeof(str),"dealership:%i\n%s",dealershipid,DealershipOwner(dealershipid));
            dealershiplabel[dealershipid] = Create3DTextLabel(str,YELLOW,dealershipx[dealershipid],dealershipy[dealershipid],dealershipz[dealershipid],DISTANCELABEL,0,0);
        }
    }
    for(new gasstationid;gasstationid < MAX_GASSTATIONS;gasstationid++)
    {
        format(str,sizeof(str),"gasstationstate[%i]",gasstationid);
        gasstationstate[gasstationid] = QINI_Int(mainfilename,str);
        if((gasstationstate[gasstationid])==1)
        {
            INI_ParseFile(mainfilename,"LoadGasStationData",false,true,gasstationid);
            printf("Gasstationid:%i -- gasstationstate = %i gasstationownedstate = %i gasstationownername = %s gasstationx = %f gasstationy = %f gasstationz = %f gasstationcost = %i ",gasstationid,gasstationstate[gasstationid],gasstationownedstate[gasstationid],gasstationownername[gasstationid],gasstationx[gasstationid],gasstationy[gasstationid],gasstationz[gasstationid],gasstationcost[gasstationid]);
            printf("gasstationgaslowestlevel = %f gasstationneedgasstate = %i ammountofgasneeded = %f gasstationtotalcapacity = %f",gasstationgaslowestlevel[gasstationid],gasstationneedgasstate[gasstationid],ammountofgasneeded[gasstationid],gasstationtotalcapacity[gasstationid]);
            for(new count;count < MAX_GASPUMPS;count++)
            {
                format(str,sizeof(str),"gaspumpstate[%i][%i]",count,gasstationid);
                gaspumpstate[count][gasstationid] = QINI_Int(mainfilename,str);
                if((gaspumpstate[count][gasstationid])==1)
                {
                    countstorage = count;
                    INI_ParseFile(mainfilename,"LoadGasPumpData",false,true,gasstationid);
                    printf("gaspump:%i-%i -- gaspumpstate = %i gaspumpx = %f gaspumpy = %f gaspumpz = %f gaspumpxrot = %f gaspumpyrot = %f gaspumpzrot = %f",count,gasstationid,gaspumpstate[count][gasstationid],gaspumpx[count][gasstationid],gaspumpy[count][gasstationid],gaspumpz[count][gasstationid],gaspumpxrot[count][gasstationid],gaspumpyrot[count][gasstationid],gaspumpzrot[count][gasstationid]);
                    printf("gaspumpobjectid = %i gaspumpcurrentsaleammount = %i gaspumpusegestate = %i gaspumpuser = %s gaspumpgas = %f",gaspumpobjectid[count][gasstationid],gaspumpcurrentsaleammount[count][gasstationid],gaspumpusegestate[count][gasstationid],gaspumpuser[count][gasstationid],gaspumpgas[count][gasstationid]);
                    gaspumpobject[count][gasstationid] = CreateDynamicObject(gaspumpobjectid[count][gasstationid],gaspumpx[count][gasstationid],gaspumpy[count][gasstationid],gaspumpz[count][gasstationid],gaspumpxrot[count][gasstationid],gaspumpyrot[count][gasstationid],gaspumpzrot[count][gasstationid],-1,-1,-1,300.0);
                    format(str,sizeof(str),"gaspump:%i-%i\n%s\ncurrentfuel:%f our of %f\n%s",count,gasstationid,CurrentReful(count,gasstationid),gaspumpgas[count][gasstationid],MAX_GASPERPUMP,GasPumpUsage(count,gasstationid));
                    gaspumplabel[count][gasstationid] = Create3DTextLabel(str,YELLOW,gaspumpx[count][gasstationid],gaspumpy[count][gasstationid],gaspumpz[count][gasstationid],DISTANCELABEL,0,0);
                }
            }
            UpdateGasStationLabels(gasstationid);
            GasStationCapacity(gasstationid);
            format(str,sizeof(str),"%s\ngasstationID:%i\n%s\nyou have %f gas",gasstationname[gasstationid],gasstationid,GasStationOwner(gasstationid),TotalGasInGasStation(gasstationid));
            gasstationlabel[gasstationid] = Create3DTextLabel(str,YELLOW,gasstationx[gasstationid],gasstationy[gasstationid],gasstationz[gasstationid],DISTANCELABEL,0,0);
        }
    }
    for(new refineryid;refineryid < MAX_REFINERYS;refineryid++)
    {
        format(str,sizeof(str),"refinerystate[%i]",refineryid);
        refinerystate[refineryid] = QINI_Int(mainfilename,str);
        if((refinerystate[refineryid])==1)
        {
            INI_ParseFile(mainfilename,"LoadRefineryData",false,true,refineryid);
            printf("%i:refineryownedstate = %i refineryownername = %s refineryx = %f refineryy = %f refineryz = %f refineryproductionstate = %i refinerycost = %i refinerycash = %i",refineryid,refineryownedstate[refineryid],refineryownername[refineryid],refineryx[refineryid],refineryy[refineryid],refineryz[refineryid],refineryproductionstate[refineryid],refinerycost[refineryid],refinerycash[refineryid]);
            format(str,sizeof(str),"Refinery:%i\nRefinery state:%s\n%s\nthere is a total of %f fuel",refineryid,RefineryProductionState(refineryid),RefineryOwner(refineryid),TotalOil(refineryid));
            refinerylabel[refineryid] = Create3DTextLabel(str,YELLOW,refineryx[refineryid],refineryy[refineryid],refineryz[refineryid],DISTANCELABEL,0,0);
            for(new count;count < MAX_OILPUMPS;count++)
            {
                format(str,sizeof(str),"oilstoragestate[%i][%i]",count,refineryid);
                oilstoragestate[count][refineryid] = QINI_Int(mainfilename,str);
                format(str,sizeof(str),"oilpumpstate[%i][%i]",count,refineryid);
                oilpumpstate[count][refineryid] = QINI_Int(mainfilename,str);
                printf("count = %i oilstoragestate = %i oilpumpstate = %i",count,oilstoragestate[count][refineryid],oilpumpstate[count][refineryid]);
                if((oilstoragestate[count][refineryid])==1)
                {
                    countstorage = count;
                    INI_ParseFile(mainfilename,"LoadOilStorageData",false,true,refineryid);
                    printf("%i-%i:oilstorageobjectid = %i oilstoragestate = %i oilstoragex = %f oilstoragey = %f oilstoragez = %f",count,refineryid,oilstorageobjectid[count][refineryid],oilstoragestate[count][refineryid],oilstoragex[count][refineryid],oilstoragey[count][refineryid],oilstoragez[count][refineryid]);
                    printf("%i-%i:oilstoragexrot = %f oilstorageyrot = %f oilstoragezrot = %f oilstoragefuel = %f",count,refineryid,oilstoragexrot[count][refineryid],oilstorageyrot[count][refineryid],oilstoragezrot[count][refineryid],oilstoragefuel[count][refineryid]);
                    format(str,sizeof(str),"ID:%i-%i\n This fuelstorage is owned by %s\nThere is currently %fL out of %f fuel in hear\ncurrentstate:%s",count,refineryid,refineryownername[refineryid],oilstoragefuel[count][refineryid],MAX_OILSTORAGE,RefineryProductionState(refineryid));
                    oilstoragelabel[count][refineryid] = Create3DTextLabel(str,YELLOW,oilstoragex[count][refineryid],oilstoragey[count][refineryid],oilstoragez[count][refineryid],DISTANCELABEL,0,0);
                    oilstorageobject[count][refineryid] = CreateDynamicObject(oilstorageobjectid[count][refineryid],oilstoragex[count][refineryid],oilstoragey[count][refineryid],oilstoragez[count][refineryid],oilstoragexrot[count][refineryid],oilstorageyrot[count][refineryid],oilstoragezrot[count][refineryid],-1,-1,-1,300.0);
                }
                if((oilpumpstate[count][refineryid])==1)
                {
                    countstorage = count;
                    INI_ParseFile(mainfilename,"LoadOilPumpData",false,true,refineryid);
                    printf("%i-%i:oilpumpstate = %i oilpumpx = %f oilpumpy = %f oilpumpz = %f oilpumpxrot = %f oilpumpyrot = %f oilpumpzrot = %f oilpumpobjectid = %i",count,refineryid,oilpumpstate[count][refineryid],oilpumpx[count][refineryid],oilpumpy[count][refineryid],oilpumpz[count][refineryid],oilpumpxrot[count][refineryid],oilpumpyrot[count][refineryid],oilpumpzrot[count][refineryid],oilpumpobjectid[count][refineryid]);
                    format(str,sizeof(str),"OilpumpID:%i-%i,owner:%s,state:%s",count,refineryid,refineryownername[refineryid],RefineryProductionState(refineryid));
                    oilpumplabel[count][refineryid] = Create3DTextLabel(str,YELLOW,oilpumpx[count][refineryid],oilpumpy[count][refineryid],oilpumpz[count][refineryid],DISTANCELABEL,0,0);
                    oilpumpobject[count][refineryid] = CreateDynamicObject(oilpumpobjectid[count][refineryid],oilpumpx[count][refineryid],oilpumpy[count][refineryid],oilpumpz[count][refineryid],oilpumpxrot[count][refineryid],oilpumpyrot[count][refineryid],oilpumpzrot[count][refineryid],-1,-1,-1,300.0);
                }
            }
            format(str,sizeof(str),"Refinery:%i\nRefinery state:%s\n%s\nthere is a total of %f fuel",refineryid,RefineryProductionState(refineryid),RefineryOwner(refineryid),TotalOil(refineryid));
            Update3DTextLabelText(refinerylabel[refineryid],YELLOW,str);
            if((refineryproductionstate[refineryid])==1||(refineryproductionstate[refineryid])==4)
            {
                refineryproductiontimer[refineryid] = SetTimerEx("RefineryOilProduction",1000,true,"i",refineryid);
            }
        }
    }
}
Here is some of the additional code that you may need to understand some of it

pawn Код:
public GlobalControlData(name[],value[])
{
    INI_Int("costofoilpumps",costofoilpumps);
    INI_Int("costofoilstorage",costofoilstorage);
    INI_Float("oilpumpedpersec",oilpumpedpersec);
    INI_Int("costofgaspump",costofgaspump);
    return 1;
}
pawn Код:
public LoadRestrictedCarData(name[],value[])
{
    new str[128];
    for(new count;count < 612;count++)
    {
        format(str,sizeof(str),"%i",count);
        INI_Int(str,restrictcar[count]);
    }
    return 1;
}
pawn Код:
public LoadDealerShipData(dealershipid,name[],value[])
{
    new str[128];
    format(str,sizeof(str),"dealershipstate[%i]",dealershipid);
    INI_Int(str,dealershipstate[dealershipid]);
    format(str,sizeof(str),"dealershipx[%i]",dealershipid);
    INI_Float(str,dealershipx[dealershipid]);
    format(str,sizeof(str),"dealershipy[%i]",dealershipid);
    INI_Float(str,dealershipy[dealershipid]);
    format(str,sizeof(str),"dealershipz[%i]",dealershipid);
    INI_Float(str,dealershipz[dealershipid]);
    format(str,sizeof(str),"dealershipownedstate[%i]",dealershipid);
    INI_Int(str,dealershipownedstate[dealershipid]);
    format(str,sizeof(str),"dealershipownername[%i]",dealershipid);
    INI_String(str,dealershipownername[dealershipid],sizeof(dealershipownername));
    format(str,sizeof(str),"dealershipcost[%i]",dealershipid);
    INI_Int(str,dealershipcost[dealershipid]);
    format(str,sizeof(str),"dealershipcash[%i]",dealershipid);
    INI_Int(str,dealershipcash[dealershipid]);
    return 1;
}
pawn Код:
public LoadGasStationData(gasstationid,name[],value[])
{
    new str[128];
    format(str,sizeof(str),"gasstationstate[%i]",gasstationid);
    INI_Int(str,gasstationstate[gasstationid]);
    format(str,sizeof(str),"gasstationownedstate[%i]",gasstationid);
    INI_Int(str,gasstationownedstate[gasstationid]);
    format(str,sizeof(str),"gasstationownername[%i]",gasstationid);
    INI_String(str,gasstationownername[gasstationid],sizeof(gasstationownername));
    format(str,sizeof(str),"gasstationx[%i]",gasstationid);
    INI_Float(str,gasstationx[gasstationid]);
    format(str,sizeof(str),"gasstationy[%i]",gasstationid);
    INI_Float(str,gasstationy[gasstationid]);
    format(str,sizeof(str),"gasstationz[%i]",gasstationid);
    INI_Float(str,gasstationz[gasstationid]);
    format(str,sizeof(str),"gasstationcost[%i]",gasstationid);
    INI_Int(str,gasstationcost[gasstationid]);
    format(str,sizeof(str),"gasstationcash[%i]",gasstationid);
    INI_Int(str,gasstationcash[gasstationid]);
    format(str,sizeof(str),"gasstationgascost[%i]",gasstationid);
    INI_Int(str,gasstationgascost[gasstationid]);
    format(str,sizeof(str),"gasstationgaslowestlevel[%i]",gasstationid);
    INI_Float(str,gasstationgaslowestlevel[gasstationid]);
    format(str,sizeof(str),"gasstationneedgasstate[%i]",gasstationid);
    INI_Int(str,gasstationneedgasstate[gasstationid]);
    format(str,sizeof(str),"ammountofgasneeded[%i]",gasstationid);
    INI_Float(str,ammountofgasneeded[gasstationid]);
    format(str,sizeof(str),"gasstationname[%i]",gasstationid);
    INI_String(str,gasstationname[gasstationid],sizeof(gasstationname));
    return 1;
}
pawn Код:
public LoadGasPumpData(gasstationid,name[],value[])
{
    new str[128];
    new gaspumpid = countstorage;
    format(str,sizeof(str),"gaspumpstate[%i][%i]",gaspumpid,gasstationid);
    INI_Int(str,gaspumpstate[gaspumpid][gasstationid]);
    format(str,sizeof(str),"gaspumpx[%i][%i]",gaspumpid,gasstationid);
    INI_Float(str,gaspumpx[gaspumpid][gasstationid]);
    format(str,sizeof(str),"gaspumpy[%i][%i]",gaspumpid,gasstationid);
    INI_Float(str,gaspumpy[gaspumpid][gasstationid]);
    format(str,sizeof(str),"gaspumpz[%i][%i]",gaspumpid,gasstationid);
    INI_Float(str,gaspumpz[gaspumpid][gasstationid]);
    format(str,sizeof(str),"gaspumpxrot[%i][%i]",gaspumpid,gasstationid);
    INI_Float(str,gaspumpxrot[gaspumpid][gasstationid]);
    format(str,sizeof(str),"gaspumpyrot[%i][%i]",gaspumpid,gasstationid);
    INI_Float(str,gaspumpyrot[gaspumpid][gasstationid]);
    format(str,sizeof(str),"gaspumpzrot[%i][%i]",gaspumpid,gasstationid);
    INI_Float(str,gaspumpzrot[gaspumpid][gasstationid]);
    format(str,sizeof(str),"gaspumpobjectid[%i][%i]",gaspumpid,gasstationid);
    INI_Int(str,gaspumpobjectid[gaspumpid][gasstationid]);
    return 1;
}
pawn Код:
UpdateGasStationLabels(gasstationid)
{
    new string[256];
    for(new gaspumpid;gaspumpid < MAX_GASPUMPS;gaspumpid++)
    {
        if((gaspumpstate[gaspumpid][gasstationid])==1)
        {
            format(string,sizeof(string),"gaspump:%i-%i\n%s\ncurrentfuel:%f our of %f\n%s",gaspumpid,gasstationid,CurrentReful(gaspumpid,gasstationid),gaspumpgas[gaspumpid][gasstationid],MAX_GASPERPUMP,GasPumpUsage(gaspumpid,gasstationid));
            Update3DTextLabelText(gaspumplabel[gaspumpid][gasstationid],YELLOW,string);
        }
    }
    format(string,sizeof(string),"%s\ngasstationID:%i\n%s\nyou have %f gas",gasstationname[gasstationid],gasstationid,GasStationOwner(gasstationid),TotalGasInGasStation(gasstationid));
    Update3DTextLabelText(gasstationlabel[gasstationid],YELLOW,string);
}
pawn Код:
GasStationCapacity(gasstationid)
{
    new numofgaspumps;
    for(new count;count < MAX_GASPUMPS;count++)
    {
        if((gaspumpstate[count][gasstationid])==1)
        {
            numofgaspumps++;
        }
    }
    gasstationtotalcapacity[gasstationid] = numofgaspumps * MAX_GASPERPUMP;
}
pawn Код:
public LoadRefineryData(refineryid,name[],value[])
{
    new str[256];
    format(str,sizeof(str),"refineryownedstate[%i]",refineryid);
    INI_Int(str,refineryownedstate[refineryid]);
    format(str,sizeof(str),"refineryownername[%i]",refineryid);
    INI_String(str,refineryownername[refineryid],sizeof(refineryownername));
    format(str,sizeof(str),"refineryx[%i]",refineryid);
    INI_Float(str,refineryx[refineryid]);
    format(str,sizeof(str),"refineryy[%i]",refineryid);
    INI_Float(str,refineryy[refineryid]);
    format(str,sizeof(str),"refineryz[%i]",refineryid);
    INI_Float(str,refineryz[refineryid]);
    format(str,sizeof(str),"refineryproductionstate[%i]",refineryid);
    INI_Int(str,refineryproductionstate[refineryid]);
    format(str,sizeof(str),"refinerycost[%i]",refineryid);
    INI_Int(str,refinerycost[refineryid]);
    format(str,sizeof(str),"refinerycash[%i]",refineryid);
    INI_Int(str,refinerycash[refineryid]);
    format(str,sizeof(str),"refinerysellstate[%i]",refineryid);
    INI_Int(str,refinerysellstate[refineryid]);
    format(str,sizeof(str),"refinerytrailerstate[%i]",refineryid);
    INI_Int(str,refinerytrailerstate[refineryid]);
    format(str,sizeof(str),"refinerytrailerx[%i]",refineryid);
    INI_Float(str,refinerytrailerx[refineryid]);
    format(str,sizeof(str),"refinerytrailery[%i]",refineryid);
    INI_Float(str,refinerytrailery[refineryid]);
    format(str,sizeof(str),"refinerytrailerz[%i]",refineryid);
    INI_Float(str,refinerytrailerz[refineryid]);
    format(str,sizeof(str),"refinerytrailerrot[%i]",refineryid);
    INI_Float(str,refinerytrailerrot[refineryid]);
    return 1;
}
pawn Код:
public LoadOilStorageData(refineryid,name[],value[])
{
    new str[256],count = countstorage;
    format(str,sizeof(str),"oilstorageobjectid[%i][%i]",count,refineryid);
    INI_Int(str,oilstorageobjectid[count][refineryid]);
    format(str,sizeof(str),"oilstoragex[%i][%i]",count,refineryid);
    INI_Float(str,oilstoragex[count][refineryid]);
    format(str,sizeof(str),"oilstoragey[%i][%i]",count,refineryid);
    INI_Float(str,oilstoragey[count][refineryid]);
    format(str,sizeof(str),"oilstoragez[%i][%i]",count,refineryid);
    INI_Float(str,oilstoragez[count][refineryid]);
    format(str,sizeof(str),"oilstoragexrot[%i][%i]",count,refineryid);
    INI_Float(str,oilstoragexrot[count][refineryid]);
    format(str,sizeof(str),"oilstorageyrot[%i][%i]",count,refineryid);
    INI_Float(str,oilstorageyrot[count][refineryid]);
    format(str,sizeof(str),"oilstoragezrot[%i][%i]",count,refineryid);
    INI_Float(str,oilstoragezrot[count][refineryid]);
    format(str,sizeof(str),"oilstoragefuel[%i][%i]",count,refineryid);
    INI_Float(str,oilstoragefuel[count][refineryid]);
    return 1;
}
pawn Код:
public LoadOilPumpData(refineryid,name[],value[])
{
    new str[256],count = countstorage;
    format(str,sizeof(str),"oilpumpx[%i][%i]",count,refineryid);
    INI_Float(str,oilpumpx[count][refineryid]);
    format(str,sizeof(str),"oilpumpy[%i][%i]",count,refineryid);
    INI_Float(str,oilpumpy[count][refineryid]);
    format(str,sizeof(str),"oilpumpz[%i][%i]",count,refineryid);
    INI_Float(str,oilpumpz[count][refineryid]);
    format(str,sizeof(str),"oilpumpxrot[%i][%i]",count,refineryid);
    INI_Float(str,oilpumpxrot[count][refineryid]);
    format(str,sizeof(str),"oilpumpyrot[%i][%i]",count,refineryid);
    INI_Float(str,oilpumpyrot[count][refineryid]);
    format(str,sizeof(str),"oilpumpzrot[%i][%i]",count,refineryid);
    INI_Float(str,oilpumpzrot[count][refineryid]);
    format(str,sizeof(str),"oilpumpobjectid[%i][%i]",count,refineryid);
    INI_Int(str,oilpumpobjectid[count][refineryid]);
    return 1;
}
pawn Код:
public RefineryOilProduction(refineryid)
{
    new once;
    if((refineryproductionstate[refineryid])==1)
    {
        new numofoilpumps,numofoilstorage,Float:totaloilpumpedpersec,Float:totalnumofstorageoil;
        for(new oilpumpid;oilpumpid < MAX_OILPUMPS;oilpumpid++)
        {
            if((oilpumpstate[oilpumpid][refineryid])==1)
            {
                numofoilpumps++;
            }
        }
        for(new oilstorageid;oilstorageid < MAX_OILPUMPS;oilstorageid++)
        {
            if((oilstoragestate[oilstorageid][refineryid])==1)
            {
                if((oilstoragefull[oilstorageid][refineryid])==0)
                {
                    numofoilstorage++;
                }
            }
        }
        if((numofoilstorage)==0)
        {
            refineryproductionstate[refineryid]=2;
            return 1;
        }
        totaloilpumpedpersec = oilpumpedpersec * numofoilpumps;
        totalnumofstorageoil = totaloilpumpedpersec / numofoilstorage;
        new string[256];
        for(new count;count < MAX_OILPUMPS;count++)
        {
            if((oilstoragestate[count][refineryid])==1)
            {
                new Float:check = oilstoragefuel[count][refineryid] + totalnumofstorageoil;
                if((check)<=MAX_OILSTORAGE)
                {
                    oilstoragefuel[count][refineryid] = oilstoragefuel[count][refineryid] + totalnumofstorageoil;
                    format(string,sizeof(string),"ID:%i-%i\n This fuelstorage is owned by %s\nThere is currently %fL out of %f fuel in hear\ncurrentstate:%s",count,refineryid,refineryownername[refineryid],oilstoragefuel[count][refineryid],MAX_OILSTORAGE,RefineryProductionState(refineryid));
                Update3DTextLabelText(oilstoragelabel[count][refineryid],YELLOW,string);
                }
                else
                {
                    check = check - MAX_OILSTORAGE;
                    oilstoragefuel[count][refineryid] = oilstoragefuel[count][refineryid] + (totalnumofstorageoil - check);
                    new done;
                    for(new count2;count2 < MAX_OILPUMPS;count2++)
                    {
                        if((oilstoragestate[count2][refineryid])==1)
                        {
                            new Float:check2 = oilstoragefuel[count][refineryid] + check;
                            if((check2)<=MAX_OILSTORAGE)
                            {
                                oilstoragefuel[count2][refineryid] = oilstoragefuel[count2][refineryid] + check;
                                format(string,sizeof(string),"ID:%i-%i\n This fuelstorage is owned by %s\nThere is currently %fL out of %f fuel in hear\ncurrentstate:%s",count2,refineryid,refineryownername[refineryid],oilstoragefuel[count2][refineryid],MAX_OILSTORAGE,RefineryProductionState(refineryid));
                                Update3DTextLabelText(oilstoragelabel[count2][refineryid],YELLOW,string);
                                done = 1;
                                break;
                            }
                        }
                    }
                    if((done)==1)
                    {
                        continue;
                    }
                    else
                    {
                        refineryproductionstate[refineryid] = 2;
                    }
                }
            }
        }
        format(string,sizeof(string),"Refinery:%i\nRefinery state:%s\n%s\nthere is a total of %f fuel",refineryid,RefineryProductionState(refineryid),RefineryOwner(refineryid),TotalOil(refineryid));
        Update3DTextLabelText(refinerylabel[refineryid],YELLOW,string);
    }
    if((once)==1)
    {
        return 1;
    }
    else if((refineryproductionstate[refineryid])==2||(refineryproductionstate[refineryid])==0)
    {
        once =1;
        new string[256];
        for(new count;count < MAX_OILPUMPS;count++)
        {
            if((oilstoragestate[count][refineryid])==1)
            {
                format(string,sizeof(string),"ID:%i-%i\n This fuelstorage is owned by %s\nThere is currently %fL out of %f fuel in hear\ncurrentstate:%s",count,refineryid,refineryownername[refineryid],oilstoragefuel[count][refineryid],MAX_OILSTORAGE,RefineryProductionState(refineryid));
                Update3DTextLabelText(oilstoragelabel[count][refineryid],YELLOW,string);
                SaveOilStorageData(count,refineryid);
            }
            if((oilstoragestate[count][refineryid])==1)
            {
                format(string,sizeof(string),"OilpumpID:%i-%i,owner:%s,state:%s",count,refineryid,refineryownername[refineryid],RefineryProductionState(refineryid));
                Update3DTextLabelText(oilpumplabel[count][refineryid],YELLOW,string);
                SaveOilPumpData(count,refineryid);
            }
        }
        format(string,sizeof(string),"Refinery:%i\nRefinery state:%s\n%s\nthere is a total of %f fuel",refineryid,RefineryProductionState(refineryid),RefineryOwner(refineryid),TotalOil(refineryid));
        Update3DTextLabelText(refinerylabel[refineryid],YELLOW,string);
        KillTimer(refineryproductionstate[refineryid]);
        SaveRefineryData(refineryid);
        if((refineryproductionstate[refineryid])==2)
        {
            for(new i;i < MAX_PLAYERS;i++)
            {
                if(IsPlayerConnected(i))
                {
                    new name[MAX_PLAYER_NAME];
                    GetPlayerName(i,name,sizeof(name));
                    if(strcmp(name,refineryownername[refineryid],false,sizeof(name))==0)
                    {
                        format(string,sizeof(string),"Your Refinery has stoped working, [ID:%i]",refineryid);
                        SendClientMessage(i, YELLOW, string);
                    }
                }
            }
        }
    }
    return 1;
}
Reply
#2

Hello, Horsemeat.
I don't understand what you want, and what's your problem ?
Reply
#3

Ok this is what is going on I have multiple labels (a gas station label a refinery label and a dealership label as well as small labels for each gas pump) when creating a dealership everything is fine but when loading the filter script it load the dealership label and then quickly loads the gas station label in the dealership labels spot I scan threw the code careful to see if I accidentally format the gas station label with the dealership but I could not find anything
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)