When i shutdown samp - server.exe my cars dissapear
#1

So when I buy the car and park I go out from server but samp server.exe is turned on the problem is when i shutdown samp-server.exe and again I turned on and I go to the server my cars don't load please anyone.

Sorry for my bad English.I hope you understand what I talked
Reply
#2

You MUST Save Vehicles and then load them again on Server start up. Use Search, there are bunch of both tutorials and scripts for your needs.
Reply
#3

I have all of that
Reply
#4

Which script are you using.. And show GameModeInItExitFunc.
Reply
#5

it's my script i try put savevehicle on ongamemodeexitfunc but isn't working
Reply
#6

We won't be able to help you until you show your code.
Reply
#7

ok

so this is under ongamemodeinit

Quote:

for(new idx = 1; idx < sizeof(VInfo); idx++)
{
new gFile[35];
format(gFile, 35, FPATH,idx);
INI_ParseFile(gFile, "ucitajcar", .bExtra = true, .extra = idx);
VInfo[idx][ownedvehicle] = CreateVehicle_H(VInfo[idx][hModel], VInfo[idx][hPozX], VInfo[idx][hPozY], VInfo[idx][hPozZ], VInfo[idx][hPozA], VInfo[idx][hBoja1], VInfo[idx][hBoja2], -1);
IgracevAuto1[playerid] = idx;
}

this is saving

Quote:

forward SpremiVozilo(idvozila);
public SpremiVozilo(idvozila)
{
new file4[128];
format(file4, sizeof(file4), FPATH, idvozila);
new INI:File = INI_Open(file4);
INI_SetTag(File,"data");
INI_WriteInt(File,"Id", idvozila);
INI_WriteInt(File,"Model", VInfo[idvozila][hModel]);
INI_WriteFloat(File,"PozX", VInfo[idvozila][hPozX]);
INI_WriteFloat(File,"PozY", VInfo[idvozila][hPozY]);
INI_WriteFloat(File,"PozZ", VInfo[idvozila][hPozZ]);
INI_WriteFloat(File,"PozA", VInfo[idvozila][hPozA]);
INI_WriteInt(File,"Paintjob", VInfo[idvozila][hPaintJob]);
INI_WriteInt(File,"Komponenta1", VInfo[idvozila][hsKomponenta1]);
INI_WriteInt(File,"Komponenta2", VInfo[idvozila][hsKomponenta2]);
INI_WriteInt(File,"Komponenta3", VInfo[idvozila][hsKomponenta3]);
INI_WriteInt(File,"Komponenta4", VInfo[idvozila][hsKomponenta4]);
INI_WriteInt(File,"Komponenta5", VInfo[idvozila][hsKomponenta5]);
INI_WriteInt(File,"Komponenta6", VInfo[idvozila][hsKomponenta6]);
INI_WriteInt(File,"Komponenta7", VInfo[idvozila][hsKomponenta7]);
INI_WriteInt(File,"Komponenta8", VInfo[idvozila][hsKomponenta8]);
INI_WriteInt(File,"Komponenta9", VInfo[idvozila][hsKomponenta9]);
INI_WriteInt(File,"Komponenta10", VInfo[idvozila][hsKomponenta10]);
INI_WriteInt(File,"Komponenta11", VInfo[idvozila][hsKomponenta11]);
INI_WriteInt(File,"Komponenta12", VInfo[idvozila][hsKomponenta12]);
INI_WriteInt(File,"Komponenta13", VInfo[idvozila][hsKomponenta13]);
INI_WriteString(File,"Vlasnik", VInfo[idvozila][hVlasnik]);
INI_WriteString(File,"Opis", VInfo[idvozila][hOpis]);
INI_WriteInt(File,"ImaVlasnika",VInfo[idvozila][hImaVlasnika]);
INI_WriteString(File,"Tablice",VInfo[idvozila][hTablice]);
INI_WriteInt(File,"VW",VInfo[idvozila][hvw]);
INI_WriteInt(File,"Ent",VInfo[idvozila][hent]);
INI_WriteInt(File,"Prodat",VInfo[idvozila][hProdat]);
INI_WriteInt(File,"ColorOne",VInfo[idvozila][hBoja1]);
INI_WriteInt(File,"ColorTwo",VInfo[idvozila][hBoja2]);
INI_WriteInt(File,"CenaKes",VInfo[idvozila][hck]);
INI_WriteInt(File,"CenaGold",VInfo[idvozila][hcg]);
INI_Close(File);
return 1;
}

Reply
#8

i closing right click and the exit
Reply
#9

Are you sure you have saved the vehicles with AddStaticVehicle?
Reply
#10

how you mean?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)