Gerne würde ich den Tankinhalt aus meiner Datenbank auselsen habe hierbei aber noch ein paar kleine Probleme. Es wird nicht Richtig ausgelesen.
Laden der Daten:
for(new i=0; i<cache_num_rows(); i++)
{
new id = getFreeCarID();
cache_get_value_name_int(i, "id", cInfo[id][db_id] );//Integer
cache_get_value_name_int(i, "model", cInfo[id][model]);//Integer
cache_get_value_name_int(i, "besitzer", cInfo[id][besitzer]);//Integer
cache_get_value_name_float(i, "x", cInfo[id][c_x]); //Float
cache_get_value_name_float(i, "y", cInfo[id][c_y]);//Float
cache_get_value_name_float(i, "z", cInfo[id][c_z]);//Float
cache_get_value_name_float(i, "r", cInfo[id][c_r]);//Float
cache_get_value_name_int(i, "c1", cInfo[id][color1]);//Integer
cache_get_value_name_int(i, "c2", cInfo[id][color2]);//Integer
cache_get_value_name_int(i, "c3", cInfo[id][color3]);//Integer
cache_get_value_name_int(i, "key", cInfo[id][key]);//Integer
cache_get_value_name_int(i, "c_gesperrt", cInfo[id][c_gespeert] );//Integer
cache_get_value_name_int(i, "tank", cInfo[id][tankinhalt]);//Integer
if(cInfo[id][c_gespeert] == 0)
{
cInfo[id][id_x] = CreateVehicle(cInfo[id][model],cInfo[id][c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],cInfo[id][color1],cInfo[id][color2],cInfo[id][color3]);
}
}
Abfrage welche Zahl angezeigt werden soll
if(newstate==PLAYER_STATE_ONFOOT)
{
for(new i=0; i<sizeof(autosOhneMotor); i++)
{
new vID=GetPlayerVehicleID(playerid);
new vModel=GetVehicleModel(vID);
if(autosOhneMotor[i]!=vModel)continue;
new tmp_engine,
tmp_lights,
tmp_alarm,
tmp_doors,
tmp_bonnet,
tmp_boot,
tmp_objective;
//Motor an/ausschalten
GetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
SetVehicleParamsEx(vID, 1, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
}
PlayerTextDrawHide(playerid, tankLabel[playerid]);
for(new i=0; i<sizeof(tank); i++)
{
tank[i]=cInfo[i][tankinhalt];
}