Peršokti į turinį
ksystofs

Del Masinos

Recommended Posts

Sveiki turiu problema del masinos saugojimo, kai perku masina ir darau restart, masinos nera,0 rasau /carmapas rodo kaime, rasau /remont raso kad neturiu ka remontuot,

tai reiskias nesaugo masinos,

ieskojau klaidos ir pagalvojau kad cia:

{
    new file[128];
    new Float:posx, Float:posy, Float:posz, Float:posr;
    GetVehiclePos(i, posx, posy, posz);
    GetVehicleZAngle(i, posr);
    format(file, sizeof(file), "saves/vehicle/%i.ini",i);
    dini_Create(file);
    dini_IntSet(file,"gas",vehicleDB[i][gas]);
    dini_BoolSet(file,"locked",vehicleDB[i][locked]);
    dini_BoolSet(file,"parduodama",vehicleDB[i][parduodama]);
    dini_IntSet(file,"lastuser",vehicleDB[i][lastuser]);
    dini_FloatSet(file,"pos_X",posx);
    dini_FloatSet(file,"pos_Y",posy);
    dini_FloatSet(file,"pos_Z",posz);
	dini_FloatSet(file,"rot",posr);
	dini_Set(file,"owner_name",vehicleDB[i][owner_name]);
	dini_IntSet(file,"model",GetVehicleModel(i));
	dini_IntSet(file,"col1",vehicleDB[i][col1]);
	dini_IntSet(file,"col2",vehicleDB[i][col2]);
	}

ir pakeiciau sita i

stock irasytimasina(playerid)
{
  if( Carlist[ playerid ] != INVALID_VEHICLE_ID )
  {
     new
        vehicleid = Carlist[ playerid ];

     if( vehicleDB[ vehicleid ][ locked ] )
     {
        new
            file[ 60 ],
            Float:coo;

        GetVehicleHealth( vehicleid, coo );
        format         ( file, 60, "saves/vehicle/%s.ini", vehicleDB[ vehicleid ][ owner_name ] );
        if( !dini_Exists( file ) ) dini_Create( file );
        dini_Set      ( file, "Savininkas", vehicleDB[ vehicleid ][ owner_name ] );
        dini_IntSet      ( file, "Modelis", GetVehicleModel( vehicleid ) );
        dini_IntSet      ( file, "Degalai", vehicleDB[ vehicleid ][ gas ] );
        dini_FloatSet      ( file, "Bukle", coo );
        dini_IntSet      ( file, "Spalva1", vehicleDB[ vehicleid ][ col1 ] );
        dini_IntSet      ( file, "Spalva2", vehicleDB[ vehicleid ][ col2 ] );
        dini_IntSet      ( file, "Paintjobas", vehicleDB[ vehicleid ][ Paintjob ] );
        dini_FloatSet      ( file, "X", vehicleDB[ vehicleid ][ lastpos ][ 0 ] );
        dini_FloatSet      ( file, "Y", vehicleDB[ vehicleid ][ lastpos ][ 1 ] );
        dini_FloatSet      ( file, "Z", vehicleDB[ vehicleid ][ lastpos ][ 2 ] );
        dini_FloatSet      ( file, "F", vehicleDB[ vehicleid ][ lastpos ][ 3 ] );
        dini_IntSet      ( file, "Tune0",GetVehicleComponentInSlot(vehicleid,0));
        dini_IntSet      ( file, "Tune1",GetVehicleComponentInSlot(vehicleid,1));
        dini_IntSet      ( file, "Tune2",GetVehicleComponentInSlot(vehicleid,2));
        dini_IntSet      ( file, "Tune3",GetVehicleComponentInSlot(vehicleid,3));
        dini_IntSet      ( file, "Tune4",GetVehicleComponentInSlot(vehicleid,4));
        dini_IntSet      ( file, "Tune5",GetVehicleComponentInSlot(vehicleid,5));
        dini_IntSet      ( file, "Tune6",GetVehicleComponentInSlot(vehicleid,6));
        dini_IntSet      ( file, "Tune7",GetVehicleComponentInSlot(vehicleid,7));
        dini_IntSet      ( file, "Tune8",GetVehicleComponentInSlot(vehicleid,8));
        dini_IntSet      ( file, "Tune9",GetVehicleComponentInSlot(vehicleid,9));
        dini_IntSet      ( file, "Tune10",GetVehicleComponentInSlot(vehicleid,10));
        dini_IntSet      ( file, "Tune11",GetVehicleComponentInSlot(vehicleid,11));
        dini_IntSet      ( file, "Tune12",GetVehicleComponentInSlot(vehicleid,12));
        dini_IntSet      ( file, "Tune13",GetVehicleComponentInSlot(vehicleid,13));
     }
  }
}

ir rodo du errorus:

1 error 033: array must be indexed (variable "Carlist")

2 error 033: array must be indexed (variable "-unknown-")

eilutes:

1 if( Carlist[ playerid ] != INVALID_VEHICLE_ID )

2 vehicleid = Carlist[ playerid ];

taigi padekite istaisyti, o gal zinote kai kitaip padaryti saugojima, laukiu pagalbos

uz pagalba duosiu 2+rep ir 300FLT

Aciu

-- Papildyta --

Tai ka neks nepades?

maldauju padekite

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį

Komentuoti gali tik prisijungę nariai

Jeigu turite paskyrą, prisijunkite

Sukurti paskyrą

Sukurkite paskyrą mūsų forume

Registruotis

Prisijungti

Turite paskyrą? Prisijunkite

Prisijungti dabar

  • Narių peržiūri šį forumą:   0 nariai

    Nėra registruotų narių peržiūrinčių šį forumą.


  • SuperGames programele
  • SuperGames programele


×