11.08.2016, 07:02
Hello there, now I changed my DB a little bit, but it is still not working,
- this is my new code, it is still printing just "1" in the console, nothing else.
Код:
SaveCar(vehicleid) { new Query[5024], Float:Pos[4], neni, doors, Float:vhp, panels, doors1, lights, tires,ts[14]; printf("1"); GetVehicleDamageStatus(vehicleid, panels, doors1, lights, tires); printf("2"); GetVehicleParamsEx(vehicleid, neni, neni, neni, doors, neni, neni, neni); printf("3"); GetVehicleHealth(vehicleid, vhp); printf("4"); GetVehiclePos(vehicleid, Pos[0], Pos[1], Pos[2]); GetVehicleZAngle(vehicleid, Pos[3]); for(new i; i < 13; i++) ts[i] = GetVehicleComponentInSlot(vehicleid, i); printf("5"); format(Query,5024,"UPDATE `cars` SET `x` = '%f', `y` = '%f', `z` = '%f', `a` = '%f', `vw` = '%d', `inter` = '%d', `far1` = '%d', `far2` = '%d',",Pos[0],Pos[1],Pos[2],Pos[3],GetVehicleVirtualWorld(vehicleid), 0, vehicle[vehicleid][FARBA1],vehicle[vehicleid][FARBA2]); printf("6"); new Query1[5024]; strcat(Query1, Query); format(Query,5024,"`km` = '%f', `fuel` = '%d', `battery` = '%d', `vlock` = '%d', vhp = '%f', panels = '%d', doors = '%d', lights = '%d', tires = '%d', ts0 = '%d', ts1 = '%d', ts2 = '%d', ts3 = '%d', ts4 = '%d', ts5 = '%d', ts6 = '%d', ts7 = '%d', ts8 = '%d', ts9 = '%d', ts10 = '%d', ts11 = '%d', ts12 = '%d', ts13 = '%d', paintjob = '%d', tanked = '%d',tovar='%d',tovartyp='%d',radio='%d' WHERE spz = '%s'", vehicle[vehicleid][KILOMETER],vehicle[vehicleid][FUEL],vehicle[vehicleid][BATTERY],doors,vhp,panels,doors1,lights,tires,ts[0],ts[1],ts[2],ts[3],ts[4],ts[5],ts[6],ts[7],ts[8],ts[9],ts[10],ts[11],ts[12],ts[13],vehicle[vehicleid][PAINTJOB], vehicle[vehicleid][TANKED], vehicle[vehicleid][TOVAR],vehicle[vehicleid][TOVARTYPE],vehicle[vehicleid][RADIO],vehicle[vehicleid][SPZ]); strcat(Query1, Query); printf("7"); mysql_query(Query1); printf("8"); mysql_free_result(); printf("9"); SetTimerEx("DestroyCar", 2000, false, "i", vehicleid); return 1; }