25.01.2011, 16:19
Код:
new string[12];
format(string, sizeof(string),"%d",plate);
SetVehicleNumberPlate(CreateVehicle(ID, cx, cy, cz, cf, C1, C2, -1), string);
Код:
public LoadCars()
{
new string[12];
new path[128];
new Float:cx, Float:cy, Float:cz, Float:cf, ID, C1, C2, Plate[256];
for(new i=1; i<MAX_CARS; i++)
{
if(VehicleLoaded[i] == 0)
{
format(path,sizeof(path),"/autos/%i.ini",i);
if(fexist(path))
{
cx = dini_Float(path,"X");
cy = dini_Float(path,"Y");
cz = dini_Float(path,"Z");
cf = dini_Float(path,"Face");
ID = dini_Int(path,"ID");
C1 = dini_Int(path,"C1");
C2 = dini_Int(path,"C2");
Plate = dini_Get(path,"Plate");
format(string, sizeof(string),"%d",Plate);
SetVehicleNumberPlate(CreateVehicle(ID, cx, cy, cz, cf, C1, C2, -1), string);
VehicleLoaded[i] = 1;
}
}
else break;
}
return 1;
}
