Hi,
ich habe ein ein Codesnipsel versucht umzubauen doch irgendwie lädt er kein Auto.
stock LoadCars()
{
for(new i; i<=MAX_CARS; i++)
{
format(Car[i][owner], 24, "%s", mysql_GetStringWithInt("Cars", "owner", "id", i));
print("1");
Car[i][x] = mysql_GetFloatWithInt("Cars", "x", "id", i);
print("2");
Car[i][y] = mysql_GetFloatWithInt("Cars", "y", "id", i);
print("3");
Car[i][z] = mysql_GetFloatWithInt("Cars", "z", "id", i);
print("4");
Car[i][r] = mysql_GetFloatWithInt("Cars", "r", "id", i);
print("5");
Car[i][mod1] = mysql_GetIntWithInt("Cars", "mod1", "id", i);
print("6");
Car[i][mod2] = mysql_GetIntWithInt("Cars", "mod2", "id", i);
print("7");
Car[i][mod3] = mysql_GetIntWithInt("Cars", "mod3", "id", i);
print("8");
Car[i][mod4] = mysql_GetIntWithInt("Cars", "mod4", "id", i);
print("9");
Car[i][mod5] = mysql_GetIntWithInt("Cars", "mod5", "id", i);
print("10");
Car[i][mod6] = mysql_GetIntWithInt("Cars", "mod6", "id", i);
print("11");
Car[i][mod7] = mysql_GetIntWithInt("Cars", "mod7", "id", i);
print("12");
Car[i][mod8] = mysql_GetIntWithInt("Cars", "mod8", "id", i);
print("13");
Car[i][mod9] = mysql_GetIntWithInt("Cars", "mod9", "id", i);
print("14");
Car[i][mod10] = mysql_GetIntWithInt("Cars", "mod10", "id", i);
print("15");
Car[i][mod11] = mysql_GetIntWithInt("Cars", "mod11", "id", i);
print("16");
Car[i][mod12] = mysql_GetIntWithInt("Cars", "mod12", "id", i);
print("17");
Car[i][mod13] = mysql_GetIntWithInt("Cars", "mod13", "id", i);
print("18");
Car[i][mod14] = mysql_GetIntWithInt("Cars", "mod14", "id", i);
print("19");
Car[i][mod15] = mysql_GetIntWithInt("Cars", "mod15", "id", i);
print("20");
Car[i][mod16] = mysql_GetIntWithInt("Cars", "mod16", "id", i);
print("21");
Car[i][mod17] = mysql_GetIntWithInt("Cars", "mod17", "id", i);
print("22");
format(Car[i][plate], 20, "%s", mysql_GetStringWithInt("Cars", "plate", "id", i));
print("23");
Car[i][model] = mysql_GetIntWithInt("Cars", "model", "id", i);
print("24");
Car[i][price] = mysql_GetIntWithInt("Cars", "price", "id", i);
print("25");
Car[i][car] = CreateVehicle(Car[i][model], Car[i][x], Car[i][y], Car[i][z], Car[i][r], Car[i][c1], Car[i][c2], -1);
print("26");
SetVehicleNumberPlate(Car[i][car], Car[i][plate]);
print("27");
}
return 1;
}
aber trotzdem zeigt er mir das hundertmal an
[20:54:14] 1
[20:54:14] 2
[20:54:14] 3
[20:54:14] 4
[20:54:14] 5
[20:54:15] 6
[20:54:15] 7
[20:54:15] 8
[20:54:15] 9
[20:54:15] 10
[20:54:15] 11
[20:54:15] 12
[20:54:15] 13
[20:54:15] 14
[20:54:15] 15
[20:54:15] 16
[20:54:15] 17
[20:54:15] 18
[20:54:15] 19
[20:54:15] 20
[20:54:15] 21
[20:54:15] 22
[20:54:15] 23
[20:54:15] 24
[20:54:15] 25
[20:54:15] 26
[20:54:15] 27
ich definiere meine Autos oben
#define MAX_CARS 2
Ich möchte nur das er auf jeden Slot das Auto lädt und nicht immer und immer und immer wieder.
Ich möchte das er die Zahlen 1 - X durch geht und alle Autos die auf der Zahl X sind geladen werden und das er nur einmal durch geht nur wie ?
MFG
//:E Text change.
//E:Gelöst