11.03.2011, 20:01
Cуdigo:
warning nesta linha:
pawn Код:
public LoadDynamicCars()
{
new arrCoords[21][64];
new strFromFile2[256];
new File: file = fopen("WFVRP_Scriptfiles/Cars/carspawns.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(DynamicCars))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
DynamicCars[idx][CarModel] = strval(arrCoords[0]);
DynamicCars[idx][CarX] = floatstr(arrCoords[1]);
DynamicCars[idx][CarY] = floatstr(arrCoords[2]);
DynamicCars[idx][CarZ] = floatstr(arrCoords[3]);
DynamicCars[idx][CarAngle] = floatstr(arrCoords[4]);
DynamicCars[idx][CarColor1] = strval(arrCoords[5]);
DynamicCars[idx][CarColor2] = strval(arrCoords[6]);
DynamicCars[idx][FactionCar] = strval(arrCoords[7]);
DynamicCars[idx][CarType] = strval(arrCoords[8]);
DynamicCars[idx][buy] = strval(arrCoords[9]);
DynamicCars[idx][comprado] = strval(arrCoords[10]);
DynamicCars[idx][valor] = strval(arrCoords[11]);
DynamicCars[idx][drogascarro] = strval(arrCoords[12]);
DynamicCars[idx][matscarro] = strval(arrCoords[13]);
DynamicCars[idx][arma1] = strval(arrCoords[14]);
DynamicCars[idx][ammo1] = strval(arrCoords[15]);
DynamicCars[idx][arma2] = strval(arrCoords[16]);
DynamicCars[idx][ammo2] = strval(arrCoords[17]);
DynamicCars[idx][arma3] = strval(arrCoords[18]);
DynamicCars[idx][ammo3] = strval(arrCoords[19]);
DynamicCars[idx][avariado] = strval(arrCoords[20]);
new vehicleid = CreateVehicle(DynamicCars[idx][CarModel],DynamicCars[idx][CarX],DynamicCars[idx][CarY],DynamicCars[idx][CarZ],DynamicCars[idx][CarAngle],DynamicCars[idx][CarColor1],DynamicCars[idx][CarColor2], -1,DynamicCars[idx][buy],DynamicCars[idx][comprado],DynamicCars[idx][valor],DynamicCars[idx][drogascarro],DynamicCars[idx][matscarro],DynamicCars[idx][arma1],DynamicCars[idx][ammo1],DynamicCars[idx][arma2],DynamicCars[idx][ammo2],DynamicCars[idx][arma3],DynamicCars[idx][ammo3]);
if(DynamicCars[idx][FactionCar] != 255)
{
SetVehicleNumberPlate(vehicleid, DynamicFactions[DynamicCars[idx][FactionCar]][fName]);
SetVehicleToRespawn(vehicleid);
}
idx++;
}
fclose(file);
}
return 1;
}
pawn Код:
new vehicleid = CreateVehicle(DynamicCars[idx][CarModel],DynamicCars[idx][CarX],DynamicCars[idx][CarY],DynamicCars[idx][CarZ],DynamicCars[idx][CarAngle],DynamicCars[idx][CarColor1],DynamicCars[idx][CarColor2], -1,DynamicCars[idx][buy],DynamicCars[idx][comprado],DynamicCars[idx][valor],DynamicCars[idx][drogascarro],DynamicCars[idx][matscarro],DynamicCars[idx][arma1],DynamicCars[idx][ammo1],DynamicCars[idx][arma2],DynamicCars[idx][ammo2],DynamicCars[idx][arma3],DynamicCars[idx][ammo3]);