LoadVehicles(){mysql_query(\"SELECT * FROM `vehicles`\");mysql_store_result();new i=1, linee2[1024];while(mysql_fetch_row_format(linee2, \"|\")){ sscanf(linee2, \"p<|>iiffffiifiiiiiiis[25]s[25]is[25]iiiiiiifiiiif\", vInfo[sqlid], vInfo[Model], vInfo[xspawn], vInfo[yspawn], vInfo[zspawn], vInfo[anglespawn], vInfo[Col1], vInfo[Col2], vInfo[health], vInfo[panels], vInfo[doors], vInfo[lights], vInfo[tires], vInfo[Fuel], vInfo[eng], vInfo[job], vInfo[utoljara], vInfo[owner], vInfo[radio], vInfo[rendszam], vInfo[ajtok], vInfo[wheels], vInfo[hidraulic], vInfo[kerekbilincs], vInfo[zarszint], vInfo[riasztoszint], vInfo[immoszint], lighta, vInfo[gps], vInfo[taxitabla], vInfo[virtualworld]);CreateVehicle(vInfo[Model], vInfo[xspawn], vInfo[yspawn], vInfo[zspawn], vInfo[anglespawn], vInfo[Col1], vInfo[Col2], 0);UpdateVehicleDamageStatus(i, vInfo[panels], vInfo[doors], vInfo[lights], vInfo[tires]);AddVehicleComponent(i, vInfo[wheels]);AddVehicleComponent(i, vInfo[hidraulic]);if(vInfo[health] < 260) vInfo[health] = 260;SetVehicleHealth(i, vInfo[health]);SetVehicleNumberPlate(i, vInfo[rendszam]); SetVehicleVirtualWorld(i, vInfo[virtualworld]);
p<|>i vInfo[sqlid]i vInfo[Model]f vInfo[xspawn]f vInfo[yspawn]f vInfo[zspawn]f vInfo[anglespawn]i vInfo[Col1]i vInfo[Col2]f vInfo[health]i vInfo[panels]i vInfo[doors]i vInfo[lights]i vInfo[tires]i vInfo[Fuel]i vInfo[eng]i vInfo[job]s[25] vInfo[utoljara]s[25] vInfo[owner]i vInfo[radio]s[25] vInfo[rendszam]i vInfo[ajtok]i vInfo[wheels]i vInfo[hidraulic]i vInfo[kerekbilincs]i vInfo[zarszint]i vInfo[riasztoszint]i vInfo[immoszint]f lighta // Ez miért float?i vInfo[gps]i vInfo[taxitabla]i vInfo[virtualworld]i ?f ?
enum Vehicles{sqlid,Model,Float:xspawn,Float:yspawn,Float:zspawn,Float:anglespawn,Col1,Col2,Float:health,panels,doors,lights,tires,Fuel,eng,job,utoljara[25],owner[25],radio,rendszam[25],ajtok,wheels,hidraulic,kerekbilincs,zarszint,riasztoszint,immoszint,gps,taxitabla,virtualworld,};
LoadVehicles(){mysql_query(\"SELECT * FROM `vehicles`\");mysql_store_result();new i=1, linee2[1024];while(mysql_fetch_row_format(linee2, \"|\")){ sscanf(linee2, \"p<|>iiffffiifiiiiiiis[25]s[25]is[25]iiiiiiifiiiif\", vInfo[sqlid], vInfo[Model], vInfo[xspawn], vInfo[yspawn], vInfo[zspawn], vInfo[anglespawn], vInfo[Col1], vInfo[Col2], vInfo[health], vInfo[panels], vInfo[doors], vInfo[lights], vInfo[tires], vInfo[Fuel], vInfo[eng], vInfo[job], vInfo[utoljara], vInfo[owner], vInfo[radio], vInfo[rendszam], vInfo[ajtok], vInfo[wheels], vInfo[hidraulic], vInfo[kerekbilincs], vInfo[zarszint], vInfo[riasztoszint], vInfo[immoszint], lighta, vInfo[gps], vInfo[taxitabla], vInfo[virtualworld]);CreateVehicle(vInfo[Model], vInfo[xspawn], vInfo[yspawn], vInfo[zspawn], vInfo[anglespawn], vInfo[Col1], vInfo[Col2], 0);UpdateVehicleDamageStatus(i, vInfo[panels], vInfo[doors], vInfo[lights], vInfo[tires]);AddVehicleComponent(i, vInfo[wheels]);AddVehicleComponent(i, vInfo[hidraulic]);if(vInfo[health] < 260) vInfo[health] = 260;SetVehicleHealth(i, vInfo[health]);SetVehicleNumberPlate(i, vInfo[rendszam]); SetVehicleVirtualWorld(i, vInfo[virtualworld]);//printf(\"%s\", linee2);//printf(\"%d, %d\", vInfo[virtualworld], GetVehicleVirtualWorld(i));new engg, lll, alarr, doorr, bonnt, boott, objj;GetVehicleParamsEx(i, engg, lll, alarr, doorr, bonnt, boott, objj);SetVehicleParamsEx(i, vInfo[eng], lighta, alarr, doorr, bonnt, boott, objj);if(vInfo[taxitabla] > 0){ format(query, sizeof(query), \"SELECT `x`, `y`, `z`, `rx`, `ry`, `rz` FROM `taxiobjects` WHERE `modelid`=%d\", vInfo[Model]); mysql_query(query); mysql_store_result(); new Float:taxipos[6]; new wasd[128]; if(mysql_fetch_row_format(wasd, \"|\")) { sscanf(wasd, \"p<|>ffffff\", taxipos[0], taxipos[1], taxipos[2], taxipos[3], taxipos[4], taxipos[5]); } taxiobject = CreateDynamicObject(vInfo[taxitabla], taxipos[0], taxipos[1], taxipos[2], taxipos[3], taxipos[4], taxipos[5], vInfo[virtualworld], -1, -1); AttachDynamicObjectToVehicle(taxiobject, i, taxipos[0], taxipos[1], taxipos[2], taxipos[3], taxipos[4], taxipos[5]);}i++;}//printf(\"%d\", i);return 1;}