16.07.2018, 01:23
PHP код:
enum vConceInfo
{
vModel,
vPreco,
vColorOne,
vColorTwo,
Float:vLocalx,
Float:vLocaly,
Float:vLocalz,
Float:vAngle,
vehicleconce,
}
new ConceInfo[3][vConceInfo];
#define MAX_CONCE 100
stock LoadCarrosConce()
{
new file[100];
for(new idx = 0; idx < MAX_CONCE; idx++)
{
format(file, sizeof file, "Concessionaria/Carro_%d.ini", idx);
if(DOF2_FileExists(file))
{
ConceInfo[idx][vModel] = DOF2_GetInt(file, "Modelo");
ConceInfo[idx][vPreco] = DOF2_GetInt(file, "Preco");
ConceInfo[idx][vColorOne] = DOF2_GetInt(file, "Cor1");
ConceInfo[idx][vColorTwo] = DOF2_GetInt(file, "Cor2");
ConceInfo[idx][vLocalx] = DOF2_GetFloat(file, "CarroX");
ConceInfo[idx][vLocaly] = DOF2_GetFloat(file, "CarroY");
ConceInfo[idx][vLocalz] = DOF2_GetFloat(file, "CarroZ");
ConceInfo[idx][vAngle] = DOF2_GetFloat(file, "CarroA");
ConceInfo[idx][vehicleconce] = AddStaticVehicleEx(ConceInfo[idx][vModel],
ConceInfo[idx][vLocalx], ConceInfo[idx][vLocaly], ConceInfo[idx][vLocalz],
ConceInfo[idx][vAngle], ConceInfo[idx][vColorOne], ConceInfo[idx][vColorTwo], -1);
SetVehicleVirtualWorld(ConceInfo[idx][vehicleconce], 0);
LinkVehicleToInterior(ConceInfo[idx][vehicleconce], 0);
}
}
return 1;
}