print("Testando OnGamemodeInit");
Vc colocou para printar uma mensagem na hora que liga?
Код:
print("Testando OnGamemodeInit"); Й muito estranho isso de nгo carregar... |
OnGameModeInit()
Coloque no "main()"
pawn Код:
-- Colocar itens no main ou OnGameModeInit й a mesma coisa, porйm no main й mais otimizado e seguro. |
stock LoadCars()
{
new FileName[60];
new carstring[256];
for(new i = 0; i < MAX_CARS; ++i)
{
format(FileName, sizeof(FileName), "Cars/car_%d.ini", i);
if(DOF2_FileExists(FileName))
{
CarInfo[i][CarModel] = DOF2_GetInt(FileName, "CarModel");
CarInfo[i][CarPrice] = DOF2_GetInt(FileName, "CarPrice");
CarInfo[i][CarX] = DOF2_GetFloat(FileName, "CarX");
CarInfo[i][CarY] = DOF2_GetFloat(FileName, "CarY");
CarInfo[i][CarZ] = DOF2_GetFloat(FileName, "CarZ");
CarInfo[i][CarF] = DOF2_GetFloat(FileName, "CarF");
CarInfo[i][CarSpawnX] = DOF2_GetFloat(FileName, "CarSpawnX");
CarInfo[i][CarSpawnY] = DOF2_GetFloat(FileName, "CarSpawnY");
CarInfo[i][CarSpawnZ] = DOF2_GetFloat(FileName, "CarSpawnZ");
CarInfo[i][CarSpawnF] = DOF2_GetFloat(FileName, "CarSpawnF");
CarInfo[i][CarColor] = DOF2_GetInt(FileName, "CarColor");
CarInfo[i][CarColor] = DOF2_GetInt(FileName, "CarColor2");
if(i == 1)
{
format(carstring,sizeof(carstring),"{7CFC00}Modelo: {FFFFFF}%s\n{7CFC00}Preзo: {32CD32}R$%d\n\n{7CFC00}ID: {FFFFFF}%d{FFAF00} .",vNome[CarInfo[i][CarModel]-400],CarInfo[i][CarPrice],i);
CarInfo[i][CarText] = Create3DTextLabel(carstring, -1, 0.0, 0.0, 0.0, 15.0, 0);
CarInfo[i][CarID] = AddStaticVehicleEx(CarInfo[i][CarModel],CarInfo[i][CarX],CarInfo[i][CarY],CarInfo[i][CarZ],CarInfo[i][CarF],CarInfo[i][CarColor],CarInfo[i][CarColor2],1);
Attach3DTextLabelToVehicle(CarInfo[i][CarText], CarInfo[i][CarID], 0.0, 0.0, 0.0);
// SetVehicleVirtualWorld(i,255);
CarInfo[i][DealerShipCar] = 1;
}
else
{
format(carstring,sizeof(carstring),"{7CFC00}Modelo: {FFFFFF}%s\n{7CFC00}Preзo: {32CD32}R$%d\n\n{7CFC00}ID: {FFFFFF}%d{FFAF00}",vNome[CarInfo[i][CarModel]-400],CarInfo[i][CarPrice],i);
CarInfo[i][CarText] = Create3DTextLabel(carstring, -1, 0.0, 0.0, 0.0, 15.0, 0);
CarInfo[i][CarID] = AddStaticVehicleEx(CarInfo[i][CarModel],CarInfo[i][CarX],CarInfo[i][CarY],CarInfo[i][CarZ],CarInfo[i][CarF],CarInfo[i][CarColor],CarInfo[i][CarColor2],1); // Blade ID 56
Attach3DTextLabelToVehicle(CarInfo[i][CarText], CarInfo[i][CarID], 0.0, 0.0, 0.0);
CarInfo[i][DealerShipCar] = 1;
}
SpawnedCars++;
}
}
return 1;
}