SA-MP Forums Archive
When i shutdown samp - server.exe my cars dissapear - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: When i shutdown samp - server.exe my cars dissapear (/showthread.php?tid=433742)



When i shutdown samp - server.exe my cars dissapear - Luca12 - 28.04.2013

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


Re: When i shutdown samp - server.exe my cars dissapear - [MG]Dimi - 28.04.2013

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.


Re: When i shutdown samp - server.exe my cars dissapear - Luca12 - 28.04.2013

I have all of that


Re: When i shutdown samp - server.exe my cars dissapear - -CaRRoT - 28.04.2013

Which script are you using.. And show GameModeInItExitFunc.


Re: When i shutdown samp - server.exe my cars dissapear - Luca12 - 28.04.2013

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


Re: When i shutdown samp - server.exe my cars dissapear - -CaRRoT - 28.04.2013

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


Re: When i shutdown samp - server.exe my cars dissapear - Luca12 - 28.04.2013

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;
}




Re: When i shutdown samp - server.exe my cars dissapear - Luca12 - 28.04.2013

i closing right click and the exit


Re: When i shutdown samp - server.exe my cars dissapear - Goldilox - 28.04.2013

Are you sure you have saved the vehicles with AddStaticVehicle?


Re: When i shutdown samp - server.exe my cars dissapear - Luca12 - 28.04.2013

how you mean?