I have 2 problems, print and load car -
loukofire - 28.04.2016
1) the print(""); don`t work in the OnGameModeIni , don`t show nothing at the console of the server.
2) The server is not making the load of the cars.
Images

Code
Код:
#define carros "Carros/%d.ini"
#define MAX_CARS 46
Код:
enum cInfo{
cModelo,
cGM,
cDono[128],
cVenda,
cPreco,
cCor1,
cCor2,
cMala1,
cMala2,
cMala3,
cMala4,
Float:cX,
Float:cY,
Float:cZ,
Float:cA,
cI,
cSeguro,
cSeguradora,
bool:Cadastrado
}
new CarroInfo[MAX_CARS][cInfo];
Public OnGameModeInit
Код:
print("ola");
AddStaticVehicleEx(400,1694.61608886,-1747.89501953,13.54687500,220.19537353,0,0,0);
for(new i = 0;i<= MAX_CARS;i++){
CarregarCarro(i);
vehicles[i] = AddStaticVehicleEx(CarroInfo[i][cModelo],CarroInfo[i][cX],CarroInfo[i][cY],CarroInfo[i][cZ],CarroInfo[i][cA],CarroInfo[i][cCor1],CarroInfo[i][cCor2], 15);
}
Код:
stock CarregarCarro(i)
{
CarroInfo[i][cModelo] = DOF2_GetInt(GetarCarro(i), "Modelo");
CarroInfo[i][cGM] = DOF2_GetInt(GetarCarro(i), "GM");
CarroInfo[i][cDono] = DOF2_GetString(GetarCarro(i), "Dono");
CarroInfo[i][cVenda] = DOF2_GetInt(GetarCarro(i), "Venda");
CarroInfo[i][cPreco] = DOF2_GetInt(GetarCarro(i), "Preco");
CarroInfo[i][cCor1] = DOF2_GetInt(GetarCarro(i), "Cor1");
CarroInfo[i][cCor2] = DOF2_GetInt(GetarCarro(i), "Cor2");
CarroInfo[i][cMala1] = DOF2_GetInt(GetarCarro(i), "Mala1");
CarroInfo[i][cMala2] = DOF2_GetInt(GetarCarro(i), "Mala2");
CarroInfo[i][cMala3] = DOF2_GetInt(GetarCarro(i), "Mala3");
CarroInfo[i][cMala4] = DOF2_GetInt(GetarCarro(i), "Mala4");
CarroInfo[i][cX] = DOF2_GetFloat(GetarCarro(i), "X");
CarroInfo[i][cY] = DOF2_GetFloat(GetarCarro(i), "Y");
CarroInfo[i][cZ] = DOF2_GetFloat(GetarCarro(i), "Z");
CarroInfo[i][cA] = DOF2_GetFloat(GetarCarro(i), "A");
CarroInfo[i][cI] = DOF2_GetInt(GetarCarro(i), "I");
CarroInfo[i][cSeguro] = DOF2_GetInt(GetarCarro(i), "Seguro");
CarroInfo[i][cSeguradora] = DOF2_GetInt(GetarCarro(i), "Seguradora");
CarroInfo[i][Cadastrado] = DOF2_GetBool(GetarCarro(i), "Cadastrado");
print("[SCRIPT]: Carros Carregados");
return 1;
}
Re: I have 2 problems, print and load car -
Stinged - 29.04.2016
I tried the exact same code you posted, and everything worked fine.
So the problem is what's above that in your OnGameModeInit (Probably).
Re: I have 2 problems, print and load car -
Crayder - 29.04.2016
1. Get crashdetect, it'll tell you if OnGameModeInit terminated early and why. You should always have crashdetect running anyways.
2. Make sure you are running the right gamemode.
3. An include may have an invalid hook stopping the last OnGameModeInit from being called.