Hallo,
bei mien Script verbindet der server nicht zur mysql_car.
Aber bei allen anderen verbindet er es.
// Connect to the database.
mysql_connect(dbhost, dbuser, dbpw, dbdb, mysql,1);
mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_save,1);
mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_car,1);
mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_load,1);
dummyQuery();
mysql = mysql_init(LOG_ONLY_ERRORS);
mysql_save = mysql_init(LOG_ONLY_ERRORS);
mysql_car = mysql_init(LOG_ALL);
mysql_load = mysql_init(LOG_ONLY_ERRORS);
new MySQL:mysql;
new MySQL:mysql_save;
new MySQL:mysql_car;
new MySQL:mysql_load;
stock dummyQuery()
{
printf("DummyQuery wurde aufgerufen.");
mysql_query("UPDATE user SET id='1' WHERE id='1'");
mysql_query("UPDATE user SET id='1' WHERE id='1'",-1,0,mysql_save);
mysql_query("UPDATE user SET id='1' WHERE id='1'",-1,0,mysql_car);
mysql_query("UPDATE user SET id='1' WHERE id='1'",-1,0,mysql_load);
return 1;
}
stock loadPlayerAutos(playerid)
{
format(query,sizeof(query),"SELECT * FROM autos WHERE besitzer='%s' AND laden='1'",SpielerName(playerid));
mysql_query(query,777,playerid,mysql_car);
return 1;
}
case 1234:
{
mysql_store_result(mysql_car);
//new spareid=spareid;
new loadvehs=4;
if(SpielerInfo[spareid][pRank]>0){loadvehs=6;}
new x=0;
while(mysql_fetch_row(data,"|",mysql_car))
{
if(x==loadvehs){mysql_free_result(mysql_car);return 1;}
new id=getFreePlayerAuto();
sscanf(data, "p<|>is[40]iffffiiiffffs[64]iiis[10]iiiiiiiiiiiiiiiiiiiiiifiiiis[64]s[64]s[64]s[64]s[64]iiiffff",PlayerAuto[id][d_id],PlayerAuto[id][vkey],PlayerAuto[id][vmodel],PlayerAuto[id][v_xc],PlayerAuto[id][v_yc],PlayerAuto[id][v_zc],PlayerAuto[id][v_ac],PlayerAuto[id][vfarbe1],PlayerAuto[id][vfarbe2],PlayerAuto[id][preis],
PlayerAuto[id][a_x],PlayerAuto[id][a_y],PlayerAuto[id][a_z],PlayerAuto[id][a_a],PlayerAuto[id][car_grund],PlayerAuto[id][benzin],PlayerAuto[id][kaputt],PlayerAuto[id][angemeldet],PlayerAuto[id][kennzeichen],PlayerAuto[id][vmod0],PlayerAuto[id][vmod1],PlayerAuto[id][vmod2],PlayerAuto[id][vmod3],PlayerAuto[id][vmod4],
PlayerAuto[id][vmod5],PlayerAuto[id][vmod6],PlayerAuto[id][vmod7],PlayerAuto[id][vmod8],PlayerAuto[id][vmod9],PlayerAuto[id][vmod10],PlayerAuto[id][vmod11],PlayerAuto[id][vmod12],PlayerAuto[id][vmod13],PlayerAuto[id][paintjob],PlayerAuto[id][car_mats],PlayerAuto[id][car_hanf],PlayerAuto[id][car_lsd],PlayerAuto[id][car_lunch],PlayerAuto[id][car_c4],PlayerAuto[id][car_koks],
PlayerAuto[id][neon],PlayerAuto[id][car_distance],PlayerAuto[id][car_pizza0],PlayerAuto[id][car_pizza1],PlayerAuto[id][car_laden],PlayerAuto[id][lastwechsel],PlayerAuto[id][key1],PlayerAuto[id][key2],PlayerAuto[id][key3],PlayerAuto[id][key4],PlayerAuto[id][key5],PlayerAuto[id][car_abtime],PlayerAuto[id][calarm],PlayerAuto[id][finder],PlayerAuto[id][lastx],PlayerAuto[id][lasty],PlayerAuto[id][lastz],PlayerAuto[id][lastr]);
PlayerAuto[id][id_x] = CreateVehicleEx(PlayerAuto[id][vmodel],PlayerAuto[id][v_xc],PlayerAuto[id][v_yc],PlayerAuto[id][v_zc],PlayerAuto[id][v_ac],PlayerAuto[id][vfarbe1],PlayerAuto[id][vfarbe2],-1);
RespawnVehicle(499,PlayerAuto[id][id_x]);
//Kofferraum
carLSD[PlayerAuto[id][id_x]]=PlayerAuto[id][car_lsd];
carKoks[PlayerAuto[id][id_x]]=PlayerAuto[id][car_koks];
carHanf[PlayerAuto[id][id_x]]=PlayerAuto[id][car_hanf];
carMats[PlayerAuto[id][id_x]]=PlayerAuto[id][car_mats];
carC4[PlayerAuto[id][id_x]]=PlayerAuto[id][car_c4];
carLunch[PlayerAuto[id][id_x]]=PlayerAuto[id][car_lunch];
carPizza[0][PlayerAuto[id][id_x]]=PlayerAuto[id][car_pizza0];
carPizza[1][PlayerAuto[id][id_x]]=PlayerAuto[id][car_pizza1];
istkaputt[PlayerAuto[id][id_x]]=PlayerAuto[id][kaputt];
distanz[PlayerAuto[id][id_x]]=PlayerAuto[id][car_distance];
FahrzeugTunen(PlayerAuto[id][id_x]);
lockVehicle(PlayerAuto[id][id_x]);
format(string,sizeof(string),"%s-%d",PlayerAuto[id][kennzeichen],PlayerAuto[id][id_x]);
if(PlayerAuto[id][angemeldet]==1)
{
SetVehicleNumberPlateEx(PlayerAuto[id][id_x],string);
}
else
{
SetVehicleNumberPlateEx(PlayerAuto[id][id_x],"{FF0000}-NA-");
}
tank[PlayerAuto[id][id_x]]=PlayerAuto[id][benzin];
printf("Fahrzeug : %d (ID:%d) geladen und gefunden. [BESITZER : %s]",id,PlayerAuto[id][id_x],PlayerAuto[id][vkey]);
//zähler erhöhen
x++;
}
mysql_free_result(mysql_car);
return 1;
}
Danke im vorraus für die hilfe!
Mfg