Sollte so eigentlich klappen.
Kannst du den Code nochmal posten?
Gibt dir der MySQL Log etwas aus?
ich habe zwar mysql_log(); drinne allerdings erstellt der keine mysql log^^
forwards (hab ich ganz oben im script)
Code
//FORWARDS
forward OnUserCheck(playerid);
forward OnUserRegister(playerid);
forward OnUserLogin(playerid);
forward KickTimer(playerid);
forward OnLoadCars();
forward checkVehHealth(vehicleid);
Enum und new vInfo
Code
enum vehData{
vehID,
vehMID,
vehOwner[64],
vehFuel[64],
Float:vehTank,
vehLocked,
vehColor1,
vehColor2,
Float:vehKMStand,
Float:vehVoltage,
Float:vehHealth,
Float:vehLPKM,
vehLoad,
Float:vehX,
Float:vehY,
Float:vehZ,
Float:vehA
}
new vInfo[50][vehData];
Alles anzeigen
OnGameModeInit
Code
//LADEN
new query[256];
mysql_format(handle, query, sizeof(query), "SELECT * FROM cars WHERE laden = '1'");
mysql_pquery(handle, query, "OnLoadCars");
public OnloadCars():
Code
public OnLoadCars(){
new rows;
cache_get_row_count(rows);
for(new i = 0; i < sizeof(rows); i++)
{
cache_get_value_name_int(i, "id", vInfo[i][vehID]);
cache_get_value_name_int(i, "vehicleid", vInfo[i][vehMID]);
cache_get_value_name_float(i, "posx", vInfo[i][vehX]);
cache_get_value_name_float(i, "posy", vInfo[i][vehY]);
cache_get_value_name_float(i, "posz", vInfo[i][vehZ]);
cache_get_value_name_float(i, "posa", vInfo[i][vehA]);
cache_get_value_name_int(i, "color1", vInfo[i][vehColor1]);
cache_get_value_name_int(i, "color2", vInfo[i][vehColor1]);
vInfo[i][vehID] = CreateVehicle(vInfo[i][vehMID], vInfo[i][vehX], vInfo[i][vehY], vInfo[i][vehZ], vInfo[i][vehA], vInfo[i][vehColor1], vInfo[i][vehColor2], -1);
}
return 1;
}
Alles anzeigen