Vehicle Ownership
#1

Hello..

I've downloaded a Vehicle Ownership from here and edited it !
Everything works perfect in my Gamemode execpt one thing. When I buy a car , it creates a file 2 times , whit one file is everything correct but in the other one all values are "0". And when I start my server it won't load , stucks on this file. -.-

I've checked LoadPrivVeh and SavePVeh and have found nothing.

P.S. I'm using SII for it.

Hope you can help me.

Thank you.
Reply
#2

Hello.

Please could you provide some code? We cannot diagnose your code (which is creating those problems) if we cannot see it.
Reply
#3

Here you have the saving code.
It creates files like this: 0 , 1, 2 ... and then creates a fi,e named 369.

pawn Код:
stock SavePrivVeh(iVehicleID)
{
    new
        iStr[15];

    format(iStr, sizeof(iStr), "Vozila/%d.ini", iVehicleID);
    if(INI_Open(iStr))
    {
        INI_WriteInt("Model", vInfo[iVehicleID][vModel]);
        INI_WriteInt("Color1", vInfo[iVehicleID][vColor1]);
        INI_WriteInt("Color2", vInfo[iVehicleID][vColor2]);
        INI_WriteInt("Price", vInfo[iVehicleID][vPrice]);
        INI_WriteString("Owner", vInfo[iVehicleID][vOwner]);
        INI_WriteFloat("vPosX", vInfo[iVehicleID][vPosX]);
        INI_WriteFloat("vPosY", vInfo[iVehicleID][vPosY]);
        INI_WriteFloat("vPosZ", vInfo[iVehicleID][vPosZ]);
        INI_WriteFloat("vPosA", vInfo[iVehicleID][vPosA]);
        INI_WriteString("Plate", vInfo[iVehicleID][vPlate]);
        INI_WriteInt("PaintJ", vInfo[iVehicleID][vPaintJ]);
        INI_WriteInt("Locked", vInfo[iVehicleID][vLocked]);

        INI_Save();
        INI_Close();
    }
    return 1;
}
Reply
#4

The code above is the dealership information..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)