Hey kann mir jemand sagen wo ich einen Fehler habe?
public OnPlayerCarsLoad(playerid)
{
new num_rows;
if(!num_rows)return 1;
for(new i=0; i<num_rows; i++)
{
new id=getFreeCarID();
cInfo[id][carmodel] = mysql_GetIntByInt("Autos","model","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[id][besitzer] = mysql_GetIntByInt("Autos","besitzer","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[id][c_x] = mysql_GetFloatByInt("Autos","x","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[id][c_y] = mysql_GetFloatByInt("Autos","y","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[id][c_z] = mysql_GetFloatByInt("Autos","z","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[id][c_r] = mysql_GetFloatByInt("Autos","r","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[id][db_id] = mysql_GetIntByInt("Autos","id","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[id][id_x]=CreateVehicle(cInfo[id][carmodel],cInfo[id][c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],-1,-1,-1);
}
return 1;
}
loadPlayerCars(playerid)
{
new query[128];
format(query,sizeof(query),"SELECT * FROM autos WHERE besitzer='%i'",PlayerInfo[playerid][pMySQLID]);
mysql_function_query(dbhandle,query,true,"OnPlayerCarsLoad","i",playerid);
return 1;
}
Sie werden gespeichert aber nicht aus der DB geladen