28.04.2016, 22:56
criei o servidor praticamente do zero a unica coisa q usei de outra pessoa foi o login/register.
Estou com dois problemas
1) o print(""); nao fuciona no OnGameModeIni , nao aparece nada no console do server.
2) O servidor nao esta fazendo o load dos carros.
Imagens




Codigo
Public OnGameModeInit
Estou com dois problemas
1) o print(""); nao fuciona no OnGameModeIni , nao aparece nada no console do server.
2) O servidor nao esta fazendo o load dos carros.
Imagens




Codigo
Код:
#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];
Код:
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; }