14.06.2015, 11:28
This?
Код:
strdel(query, 0, strlen(query)); strcat(query, "INSERT INTO `vehicles` (`CarID`, `Model`, `Color1`, `Color2`, `Price`, `Owner`, `vPosX`, `vPosY`, `vPosZ`, `vPosA`, `Plate`, `PaintJ`, `Locked`,`Carcode`,`OreC`,`KM`,`Towed`,`Weapon1`,"); strcat(query, " `Weapon2`,`Weapon3`,`Weapon4`,`Weapon5`,`Weapon6`,`Ammo1`,`Ammo2`,`Ammo3`,`Ammo4`,`Ammo5`,`Ammo6`,`FirstAid`,`Variabila`,`Component0`,`Component1`,`Component2`,`Component3`,`Component4`,`Component5`,`Component6`,`Component7`,`Component8`,`Component9`,`Component10`,`Component11`,`Component12`,`Component13`)"); strcat(query, " VALUES VALUES (%d, %d, %d, %d, %d, '%s', '%f', '%f', '%f', '%f', '%s', %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)"); format(query, sizeof(query), query, Total_Veh_Created, ivModel, ivColors[0], ivColors[1], ivPrice, vInfo[Total_Veh_Created][vOwner], Pos[0], Pos[1], Pos[2], Pos[3], vInfo[Total_Veh_Created][vPlate], vInfo[Total_Veh_Created][vPaintJ], vInfo[Total_Veh_Created][vLocked], vInfo[Total_Veh_Created][vCarCode], vInfo[Total_Veh_Created][vOre], vInfo[Total_Veh_Created][vVodo], vInfo[Total_Veh_Created][vTowed], vInfo[Total_Veh_Created][trWeapon1], vInfo[Total_Veh_Created][trWeapon2], vInfo[Total_Veh_Created][trWeapon3], vInfo[Total_Veh_Created][trWeapon4], vInfo[Total_Veh_Created][trWeapon5], vInfo[Total_Veh_Created][trWeapon6], vInfo[Total_Veh_Created][trAmmo1], vInfo[Total_Veh_Created][trAmmo2], vInfo[Total_Veh_Created][trAmmo3], vInfo[Total_Veh_Created][trAmmo4], vInfo[Total_Veh_Created][trAmmo5], vInfo[Total_Veh_Created][trAmmo6], vInfo[Total_Veh_Created][tMedkit], vInfo[Total_Veh_Created][vVariabila], vInfo[Total_Veh_Created][vComponent0], vInfo[Total_Veh_Created][vComponent1], vInfo[Total_Veh_Created][vComponent2], vInfo[Total_Veh_Created][vComponent3], vInfo[Total_Veh_Created][vComponent4], vInfo[Total_Veh_Created][vComponent5], vInfo[Total_Veh_Created][vComponent6], vInfo[Total_Veh_Created][vComponent7], vInfo[Total_Veh_Created][vComponent8], vInfo[Total_Veh_Created][vComponent9], vInfo[Total_Veh_Created][vComponent10], vInfo[Total_Veh_Created][vComponent11], vInfo[Total_Veh_Created][vComponent12], vInfo[Total_Veh_Created][vComponent13]); mysql_query(query);