Nabend,
ich hab ein Autohaus-System in mein Script eingebaut, jedoch kann man jetzt nicht mehr auf den Server connecten.
Wenn ich die Zeile in OnPlayerGameModeInit "LoadCars();" rausnahme, funktioniert alles wieder.
LoadFahrzeug Stock:
stock LoadCars()
{
new i;
new xx,tinstring[6];
for(; i<=MAX_CARS; i++) {
format(Car[i][owner], 24, "%s", mysql_GetStringWithInt("Cars", "owner", "id", i));
Car[i][x] = mysql_GetFloatWithInt("Cars", "x", "id", i);
Car[i][y] = mysql_GetFloatWithInt("Cars", "y", "id", i);
Car[i][z] = mysql_GetFloatWithInt("Cars", "z", "id", i);
Car[i][r] = mysql_GetFloatWithInt("Cars", "r", "id", i);
Car[i][c1] = mysql_GetIntWithInt("Cars", "c1", "id", i);
Car[i][c2] = mysql_GetIntWithInt("Cars", "c2", "id", i);
format(Car[i][plate], 20, "%s", mysql_GetStringWithInt("Cars", "plate", "id", i));
Car[i][model] = mysql_GetIntWithInt("Cars", "model", "id", i);
Car[i][price] = mysql_GetIntWithInt("Cars", "price", "id", i);
Car[i][car] = AddStaticVehicleEx(Car[i][model], Car[i][x], Car[i][y], Car[i][z], Car[i][r], Car[i][c1], Car[i][c2], -1);
SetVehicleNumberPlate(Car[i][car], Car[i][plate]);
//printf("i = %d, owner = %s, x = %f, y = %f, z = %f, r = %f, c1 = %d, c2 = %d, plate = %s, model = %d, price = %d, car = %d", i, Car[i][owner], Car[i][x], Car[i][y], Car[i][z], Car[i][r], Car[i][c1], Car[i][c2], Car[i][plate], Car[i][model], Car[i][price], Car[i][car]);
xx=1;
for(;xx!=18;xx++) format(tinstring,6,"mod%d",xx), Car[i][mod][xx] = mysql_GetIntWithInt("Cars", tinstring, "id", i);
AddTuning(i);
}
return 1;
}
//edit LoadFahrzeuge zu LoadCars geändert