Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: aktualizacją
1. Aktualizacją bazy danych SQLite
Witam. Pisz? skrypt na system pojazd?w z zapisem w pliku bazy danych na sqlite. Problem polega na tym, ?e wszystko fajnie pi?knie, zapisuje co powinien, wczytuje co powinien, ale jak ju? co? si? zmieni w poje?dzie (pozycja, stan ?wiate?, tuning) to po ponownym wczytaniu jest stan, w jakim na pocz?tku zapisa?o te pojazdy. Kto? wie o co mo?e chodzi?? Stawiam :piwo: i R*


[lua]baza = dbConnect ("sqlite", "przechowalnia.db")

if baza then
outputDebugString ("* Baza danych przechowalni za?adowana pomy?lnie.")
else
outputDebugString ("* Wyst?pi? problem z baz? danych przechowalni!")
end


function pobierzHandling (element, wartosc)
if isElement (element) and getElementType (element) == "vehicle" and type (wartosc) == "string" then
local handlingTable = getVehicleHandling (element)
local value = handlingTable[wartosc]
if value then
return value
end
end
end

-- tune_sprezarka TEXT, tune_naped TEXT, tune_hamulce TEXT, tune_niskienadwozie TEXT, tune_wysokienadwozie TEXT

-- t0 int, t1 int, t2 int, t3 int, t4 int, t5 int, t6 int, t7 int, t8 int, t9 int, t10 int, t11 int, t12 int, t13 int, t14 int, t15 int, t16 int

function bbaza ()
local usuwanie = dbQuery ( baza, "CREATE TABLE IF NOT EXISTS POJAZDY ( id int, model int, owner TEXT, x FLOAT, y FLOAT, z FLOAT, rotx FLOAT, roty FLOAT, rotz FLOAT, color1 FLOAT, color2 ...