23.02.2012, 17:35
(
Last edited by ombre; 24/02/2012 at 01:07 AM.
)
Hi,
I have a problem for convert DINI to Y_INI
The veh isn't created and I need to create this vehicle before to have veh[playerid] = id car and next INI_Int("Model",Vehicles[veh[playerid]][vModel]);...
Thanks
I have a problem for convert DINI to Y_INI
Code:
//dini loadvehicle(playerid) { veh[playerid] = CreateVehicle(dini_Int(file, "Model"), dini_Float(file, "X"), dini_Float(file, "Y"), dini_Float(file, "Z"), dini_Float(file, "Angle"), dini_Int(file, "Color1"), dini_Int(file, "Color2"), 3600); strmid(Vehicles[veh[playerid]][vOwner], dini_Get(file, "Owner"), 0, strlen(dini_Get(file, "Owner")), 255); strmid(Vehicles[veh[playerid]][vInfo], dini_Get(file, "Info"), 0, strlen(dini_Get(file, "Info")), 255); Vehicles[[veh[playerid]][vModel] = dini_Int(file, "Model"); Vehicles[[veh[playerid]][vX] = dini_Float(file, "X"); Vehicles[[veh[playerid]][vY] = dini_Float(file, "Y"); Vehicles[[veh[playerid]][vZ] = dini_Float(file, "Z"); ... } //Y_INI loadvehicle(playerid) { INI_ParseFile(file, "Load", .bExtra = true, .extra = playerid); return 1; } Load(playerid,name[],value[]) { new vx1; new Float:vx2; new Float:vx3; new Float:vx4; new Float:vx5; new vx6; new vx7; INI_Int("Model",vx1); INI_Float("X",vx2); INI_Float("Y",vx3); INI_Float("Z",vx4); INI_Float("Angle",vx5); INI_Int("Color1",vx6); INI_Int("Color2",vx7); veh[playerid] = CreateVehicle(vx1,vx2,vx3,vx4,vx5,vx6,vx7, 3600); INI_String("Vehicle",Vehicles[veh[playerid]][vOwner],255); INI_String("Info",Vehicles[veh[playerid]][vInfo],255); INI_Int("Model",Vehicles[veh[playerid]][vModel]); INI_Float("X",Vehicles[veh[playerid]][vX]); ... }
Thanks