Hey Leute ich habe ein Problem mit mein Car Tuning. Und zwar wird das Tuning nicht gespeichert ich habe es mir auch ausschreiben lassen was in die ints kommt, jedoch geht es nicht.
hier der Code
//hier die query
Code
for(new i=0; i<MAX_PCARS; i++)
{
if(cInfo[i][besitzer]==sInfo[playerid][s_id])continue;
new query[700];
format(query,sizeof(query),"UPDATE autos SET x='%f',y='%f',z='%f',a='%f',vmod0='%i',vmod1='%i',vmod2='%i',vmod3='%i',vmod4='%i',vmod5='%i',vmod6='%i',vmod7='%i',vmod8='%i',vmod9='%i',vmod10='%i',vmod11='%i',vmod12='%i',vmod13='%i',paintjob='%i' WHERE id='%i'",
cInfo[i][c_X],cInfo[i][c_Y],cInfo[i][c_Z],cInfo[i][c_R],cInfo[i][vmod0],cInfo[i][vmod1],cInfo[i][vmod2],cInfo[i][vmod3],cInfo[i][vmod4],cInfo[i][vmod5],cInfo[i][vmod6],cInfo[i][vmod7],
cInfo[i][vmod8],cInfo[i][vmod9],cInfo[i][vmod10],cInfo[i][vmod11],cInfo[i][vmod12],cInfo[i][vmod13],cInfo[i][paintjob],cInfo[i][db_id]);
mysql_function_query(dbhandle,query,false,"","");
DestroyVehicle(cInfo[i][id_x]);
printf("Auto: %i %i get save paintjob: %i",i,sInfo[playerid][s_id],cInfo[i][paintjob]);
cInfo[i][id_x]=0;
}
Alles anzeigen
//Die abfrage
Code
public OnVehicleMod(playerid, vehicleid, componentid)
{
new string[123];
for(new i=0; i<MAX_PCARS; i++)
{
if(cInfo[i][id_x]==vehicleid)
{
new type = GetVehicleComponentType(componentid);
switch(type)
{
case 0: {
cInfo[i][vmod0] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 1: {
cInfo[i][vmod1] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 2: {
cInfo[i][vmod2] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 3: {
cInfo[i][vmod3] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 4: {
cInfo[i][vmod4] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 5: {
cInfo[i][vmod5] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 6: {
cInfo[i][vmod6] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 7: {
cInfo[i][vmod7] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 8: {
cInfo[i][vmod8] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 9: {
cInfo[i][vmod9] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 10: {
cInfo[i][vmod10] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 11: {
cInfo[i][vmod11] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 12: {
cInfo[i][vmod12] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
case 13: {
cInfo[i][vmod13] = componentid;
format(string,123,"componente: %i",componentid);
SendClientMessage(playerid,COLOR_RED,string);
}
}
}
}
return 1;
}
Alles anzeigen
hoffe ihr könnt mir helfen