Hallo Community!
Bei meinen Fahrzeugen läd das Nummernschild nicht.
Ich habe eine Funktion um die Fahrzeuge zu laden:
Code
forward LoadPlayerCars(playerid);
public LoadPlayerCars(playerid)
{
new rows = cache_get_row_count(),str[128];
for(new i=0; i<rows; i++)
{
if(i > sizeof(pCar[])) return 1;
cache_get_field_content(i, "besitzer", pCar[playerid][i][besitzer],db_handle); //Besitzername
pCar[playerid][i][modelid] = cache_get_field_content_int(i, "modelid"); //Modelid
pCar[playerid][i][db_id] = cache_get_field_content_int(i, "id"); //Datenbank ID
cache_get_field_content(i,"numplate",pCar[playerid][i][numplate],db_handle);
pCar[playerid][i][anmeldung] = cache_get_field_content_int(i, "anmeldung"); //AnmeldeStatus
pCar[playerid][i][s_x] = cache_get_field_content_float(i, "s_x"); //Spawnpos x
pCar[playerid][i][s_y] = cache_get_field_content_float(i, "s_y");
pCar[playerid][i][s_z] = cache_get_field_content_float(i, "s_z");
pCar[playerid][i][s_r] = cache_get_field_content_float(i, "s_r"); //Spawnpos rotation
pCar[playerid][i][pc_vID] = CreateVehicle(pCar[playerid][i][modelid], pCar[playerid][i][s_x], pCar[playerid][i][s_y], pCar[playerid][i][s_z], pCar[playerid][i][s_r], -1, -1, -1);
SetVehicleNumberPlate(pCar[playerid][i][pc_vID],pCar[playerid][i][numplate]);
format(str,128,"LPC numplate: %s",pCar[playerid][i][numplate]);
print(str);
SetVehicleParamsEx(pCar[playerid][i][pc_vID],0,0,0,1,0,0,0);
}
return 1;
}
Alles anzeigen
Und das steht im Mysql Log:
Code
[19:55:20] [DEBUG] Calling callback "LoadPlayerCars"..
[19:55:20] [DEBUG] cache_get_row_count - connection: 1
[19:55:20] [DEBUG] cache_get_field_content - row: 0, field_name: "besitzer", connection: 1, max_len: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "besitzer", data: "Carl_Bauer"
[19:55:20] [DEBUG] cache_get_field_content_int - row: 0, field_name: "modelid", connection: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "modelid", data: "419"
[19:55:20] [DEBUG] cache_get_field_content_int - row: 0, field_name: "id", connection: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "id", data: "11"
[19:55:20] [DEBUG] cache_get_field_content - row: 0, field_name: "numplate", connection: 1, max_len: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "numplate", data: ""
[19:55:20] [DEBUG] cache_get_field_content_int - row: 0, field_name: "anmeldung", connection: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "anmeldung", data: "1"
[19:55:20] [DEBUG] cache_get_field_content_float - row: 0, field_name: "s_x", connection: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "s_x", data: "760.5"
[19:55:20] [DEBUG] cache_get_field_content_float - row: 0, field_name: "s_y", connection: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "s_y", data: "-1334.69"
[19:55:20] [DEBUG] cache_get_field_content_float - row: 0, field_name: "s_z", connection: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "s_z", data: "13.338"
[19:55:20] [DEBUG] cache_get_field_content_float - row: 0, field_name: "s_r", connection: 1
[19:55:20] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "s_r", data: "0.671"
[19:55:20] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
Alles anzeigen
Ich habe extra darauf geachtet, dass in der Mysql Datenbank das Nummernschild eingetragen ist. Es ist also kein leeres Feld!