Load vehicles
#3

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Does it save correctly and did you define VEHICLE_TYPE_PUBLIC, etc..?
About saving ..
I think there the problem

SA-MP dedicated server stop working...
Then I just do close and now I also checked the information is not saved
And what is "run time error 6: "Invalid instruction""?
pawn Код:
public OnGameModeExit()
{
    new file[14];
    for(new i; i < MAX_VEHICLES; i++) if(IsValidVehicle(i) && Vehicles[i][vCreated])
    {
        format(file, sizeof file, "Cars/%d.ini", i);
        new INI:ini = INI_Open(file);
        INI_SetTag(ini, "VehicleData");
        INI_WriteInt(ini, "Model", Vehicles[i][vModel]);
        INI_WriteFloat(ini, "X", Vehicles[i][vPos][0]);
        INI_WriteFloat(ini, "Y", Vehicles[i][vPos][1]);
        INI_WriteFloat(ini, "Z", Vehicles[i][vPos][2]);
        INI_WriteFloat(ini, "A", Vehicles[i][vPos][3]);
        INI_WriteInt(ini, "Color1", Vehicles[i][vColor][0]);
        INI_WriteInt(ini, "Color2", Vehicles[i][vColor][1]);
        INI_WriteInt(ini, "Price", Vehicles[i][vPrice]);
        INI_WriteInt(ini, "Type", Vehicles[i][vType]);
        INI_WriteBool(ini, "HaveOwners", Vehicles[i][vHaveOwners]);
        INI_WriteString(ini, "Owners", Vehicles[i][vOwners]);
        INI_WriteString(ini, "Name", Vehicles[i][vName]);
        INI_WriteInt(ini, "PayTax", Vehicles[i][vPayTax]);
        INI_WriteInt(ini, "Sale", Vehicles[i][vSale]);
        INI_WriteInt(ini, "3DColor", Vehicles[i][v3DColor]);
        INI_WriteString(ini, "3DText", Vehicles[i][v3DText]);
        INI_WriteBool(ini, "HaveNitro", Vehicles[i][vHaveNitro]);
        INI_WriteBool(ini, "HaveAutoNitro", Vehicles[i][vHaveAutoNitro]);
        INI_WriteBool(ini, "HaveHyd", Vehicles[i][vHaveHyd]);
        INI_WriteBool(ini, "HaveDisco", Vehicles[i][vHaveDisco]);
        INI_WriteBool(ini, "DiscoActive", Vehicles[i][vDiscoActive]);
        INI_WriteInt(ini, "Wheels", Vehicles[i][vWheels]);
        INI_Close(ini);
    }
    mysql_close();
    return 1;
}
Reply


Messages In This Thread
Load vehicles - by benel1 - 16.03.2015, 17:00
Re: Load vehicles - by ATGOggy - 16.03.2015, 17:11
Re: Load vehicles - by benel1 - 16.03.2015, 17:27
Re: Load vehicles - by ATGOggy - 16.03.2015, 17:34
Re: Load vehicles - by benel1 - 16.03.2015, 17:41
Re: Load vehicles - by ATGOggy - 16.03.2015, 18:04
Re: Load vehicles - by benel1 - 17.03.2015, 13:43
Re: Load vehicles - by benel1 - 17.03.2015, 21:20
Re: Load vehicles - by SickAttack - 17.03.2015, 21:32

Forum Jump:


Users browsing this thread: 3 Guest(s)