Dynamic Veh System.. Something is wrong
#1

Look guys, i made my own dynamic veh system in Y_INI load/save system. (Sorry, i'm bad at English)..
I put this in my command:
Код:
new carid;
					for(new b = 51; b < sizeof(CI); b++)
					{
						if(CI[b][cPostavljen] == 1)
						{
							carid = b + 1;
						}
					}
This number " 51 " is number of my vehicles in the script (without any car from dynamic veh system)...
And car is created, but it don't save me in folder Vozila/ like a Vozilo_52.ini, it saves me like Vozilo_0.ini o.O

This code is on the end of the createveh cmd:
Код:
SacuvajVozilo(carid);
And this is public of that code:
Код:
public SacuvajVozilo(idvozila)
{
    new dFile[128];
	format(dFile, sizeof(dFile),"LV-RP/vozila/Vozilo_%d.ini",idvozila);
	new INI:File = INI_Open(dFile);
    INI_WriteInt(File,"cModel",CI[idvozila][cModel]);
	INI_WriteFloat(File,"cPosX",CI[idvozila][cPosX]);
	INI_WriteFloat(File,"cPosY",CI[idvozila][cPosY]);
	INI_WriteFloat(File,"cPosZ",CI[idvozila][cPosZ]);
	INI_WriteFloat(File,"cAngle",CI[idvozila][cAngle]);
	INI_WriteInt(File,"cBoja1",CI[idvozila][cBoja1]);
	INI_WriteInt(File,"cBoja2",CI[idvozila][cBoja2]);
	INI_WriteString(File,"cVlasnik",CI[idvozila][cVlasnik]);
	INI_WriteString(File,"cIme",CI[idvozila][cIme]);
	INI_WriteInt(File,"cCena",CI[idvozila][cCena]);
	INI_WriteString(File,"cTablice",CI[idvozila][cTablice]);
	INI_WriteInt(File,"cRegistrovan",CI[idvozila][cRegistrovan]);
	INI_WriteInt(File,"cKupljen",CI[idvozila][cKupljen]);
	INI_WriteInt(File,"cZakljucan",CI[idvozila][cZakljucan]);
	INI_WriteInt(File,"cPostavljen",CI[idvozila][cPostavljen]);
	INI_WriteInt(File,"cDroga",CI[idvozila][cDroga]);
	INI_WriteInt(File,"cGun1",CI[idvozila][cGun1]);
	INI_WriteInt(File,"cAmmo1",CI[idvozila][cAmmo1]);
	INI_WriteInt(File,"cGun2",CI[idvozila][cGun2]);
	INI_WriteInt(File,"cAmmo2",CI[idvozila][cAmmo2]);
	INI_WriteInt(File,"cGun3",CI[idvozila][cGun3]);
	INI_WriteInt(File,"cAmmo3",CI[idvozila][cAmmo3]);
	INI_WriteInt(File,"cNovac",CI[idvozila][cNovac]);
	INI_Close(File);
	return 1;
}
Please
Reply
#2

having the same problem atm, i cant even fix mines, i trying to use Yini instead of Dini, cause dini is kinda easier to save using that but i wanna use straight yini


Keep watching here to try and figure it out
https://sampforum.blast.hk/showthread.php?tid=273088
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)