Haos123
Новичок
PHP:
for(new i = 0;i<MAX_BUY_V; i++)/// new i = 1;
{
format(lcfile,sizeof(lcfile),"[auto]/%d.cfg",i);
if(dini_Exists(lcfile)){// íèæå áûëî êðåàäåò++
VehicleSystem[i][modelCA] = dini_Int(lcfile,"veh_model");
VehicleSystem[i][xCA] = dini_Float(lcfile,"veh_x");
VehicleSystem[i][yCA] = dini_Float(lcfile,"veh_y");
VehicleSystem[i][zCA] = dini_Float(lcfile,"veh_z");
VehicleSystem[i][Farbe1] = dini_Int(lcfile,"veh_Farbe1");
VehicleSystem[i][Farbe2] = dini_Int(lcfile,"veh_Farbe2");
VehicleSystem[i][aCA] = dini_Float(lcfile,"veh_a");
strmid(VehicleSystem[i][owner],dini_Get(lcfile,"veh_owner"),0,128,128);
strmid(VehicleSystem[i][cnumber],dini_Get(lcfile,"car_number"),0,128,128);
VehicleSystem[i][preis] = dini_Int(lcfile,"veh_preis");
VehicleSystem[i][saleCA] = dini_Int(lcfile,"veh_sale");
VehicleSystem[i][carlock] = dini_Int(lcfile,"car_lock");
VehicleSystem[i][strah] = dini_Int(lcfile,"car_strah");
VehicleSystem[i][teh] = dini_Int(lcfile,"car_teh");
VehicleSystem[i][cwheels] = dini_Int(lcfile,"car_wheels");
if(VehicleSystem[i][carlock]!=0) { gCarLock[i] = 0; }
if(VehicleSystem[i][modelCA]!=0){
created++;
new car = CreateVehicle(VehicleSystem[i][modelCA],VehicleSystem[i][xCA],VehicleSystem[i][yCA],VehicleSystem[i][zCA],VehicleSystem[i][aCA],VehicleSystem[i][Farbe1],VehicleSystem[i][Farbe2],600000);
SetTuneCar(i);
IDIS[car] = created;
printf("Ìàøèíà %d ñîçäàíà!",IDIS[car]);
}
}
}
print("Çàãðóçêà ìàøèí çàâåðøåíà!\n");
PHP:
public SetTuneCar(i)
{
if(VehicleSystem[i][cwheels] != 0) { AddVehicleComponent(i, VehicleSystem[i][cwheels]); }
}
PHP:
public OnVehicleSpawn(vehicleid)
{
SetTuneCar(vehicleid);
return true;
}
