27.04.2015, 20:31
(
Последний раз редактировалось Ghost112397; 28.04.2015 в 18:58.
)
Hi, i have a spoilers system with Y_INI, the system work perfect, but the load not work.
Sorry for my bad english.
Thanks.
Sorry for my bad english.
Thanks.
PHP код:
stock GuardarAleron(vehicleid)
{
new _DirFile[MAX_FILE_NAME], INI:_File;
format(_DirFile,sizeof(_DirFile),"Alerones/%d.ini", vehicleid);
if(!fexist(_DirFile))
{
format(str, sizeof(str), "Alerones/%i.ini",vehicleid);
CreateFile(str);
}
_File = INI_Open(_DirFile);
INI_SetTag(_File,"data");
INI_WriteInt(_File,"AleronID",InformacionV[vehicleid][V_ALERON]);
INI_Close(_File);
return 1;
}
forward CargarInformacionAleron_data(i,name[],value[]);
public CargarInformacionAleron_data(i,name[],value[])
{
INI_Int("AleronID",InformacionV[vehicleid][V_ALERON]);
return 0;
}
public OnVehicleSpawn(vehicleid)
{
new objetoveh;
new _DirFile[16];
format(_DirFile,sizeof(_DirFile),"Alerones/%d.ini",vehicleid);
if(fexist(_DirFile))
{
INI_ParseFile(_DirFile,"CargarInformacionAleron_data",.bExtra = true, .extra = vehicleid);
InformacionV[vehicleid][AleronCargado] = true;
switch(GetVehicleModel(vehicleid))
{
case 402: // BUFFALO
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, -0.010, -2.400, 0.229, 0.000, 0.000, 0.000);
}
case 411: // INFERNUS
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, -0.042, -2.338, 0.330, 0.000, 0.000, -0.199);
}
case 415: // CHEETAH
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.290, 0.219, 0.000, 0.000, 0.000);
}
case 426: // PREMIER
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.540, 0.250, 0.000, 0.000, 0.000);
}
case 429: // BANSHEE
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.010, -2.222, 0.280, 0.000, 0.000, 0.000);
}
case 475: // SABRE
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.450, 0.179, 0.000, 0.000, 0.000);
}
case 492: // GREENWOOD
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.710, 0.290, 0.000, 0.000, 0.000);
}
case 507: // ELEGANT
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.830, 0.219, 0.000, 0.000, 0.000);
}
case 516: // NEBULA
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.589, 0.279, 0.000, 0.000, 0.000);
}
case 518: // BUCCANEER
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.450, 0.130, 0.000, 0.000, 0.000);
}
case 526: // FORTUNE
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.090, 0.180, 0.000, 0.000, 0.000);
}
case 533: // FELTZER
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.329, 0.219, 0.000, 0.000, 0.000);
}
case 541: // BULLET
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -1.910, 0.330, 0.000, 0.000, 0.000);
}
case 542: // CLOVER
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.651, 0.319, 0.000, 0.000, 0.000);
}
case 546: // INTRUDER
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.400, 0.309, 0.000, 0.000, 0.000);
}
case 547: // PRIMO
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.520, 0.270, 0.000, 0.000, 0.000);
}
case 550: // SUNRISE
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.440, 0.180, 0.000, 0.000, 0.000);
}
case 585: // EMPEROR
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.729, 0.389, 0.000, 0.000, 0.000);
}
case 587: // EUROS
{
objetoveh = CreateDynamicObject(InformacionV[vehicleid][V_ALERON],0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(objetoveh, vehicleid, 0.000, -2.350, 0.260, 0.000, 0.000, 0.000);
}
}
}
return 1;
}