Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-08-10, 13:46


Nezzi







Wiek: 32
Na forum: 3888 dni
Posty: 43
Nick w MP: Nezzi



Respekt: 50

Witam mam problem gdy? jak auto jest zepsute i daje je do przecho potem wyjme je yo jest naprawione , gdy zrobie tuning pomaluje go itp dam go do przecho i wyjme to tak samo usuwa wszystko. Za pomoc daje :piwo: R*

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-10, 15:40


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Poka? kod.
Korzystasz z zapisu w bazie danych MySQL czy SQLite?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-11, 17:47


Nezzi







Wiek: 32
Na forum: 3888 dni
Posty: 43
Nick w MP: Nezzi



Respekt: 50

Kalizman,
local mdestroy=createMarker(-2051.15,340.29,35.17"cylinder"5255,255,255,50)

local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Pozostawianie pojazdĂłw")
setElementPosition(t,-1764.32,957.57,24.88)

addEvent("onParkingGetRekords"true)
addEventHandler("onParkingGetRekords"root, function()
    local uid=getElementData(source,"player:uid")
    if not uid then return end
    local org getElementData(source,"player:organization")
    local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",uid,org or "Brak")
    if #result > 0 then
        triggerClientEvent(source"onParkingGetVehicles"sourceresult)
    end
end)

addEventHandler("onMarkerHit"mdestroy, function(el,md)
    if getElementType(el) == "player" then
        local veh=getPedOccupiedVehicle(el)
        if not veh then return end
        if getVehicleController(veh) ~= el then return end
        local id=getElementData(veh,"vehicle:id")
        if not id then return end
        if isTimer(timeroddaniathen return end
        setElementFrozen(veh,false)
        --outputChatBox("Trwa oddawanie  pojazdu."el,255,255,255,true)
        toggleControl(el,"enter_exit",false)
        timeroddania=setTimer(function()
            exports["ogrpg-vehicles"]:onSaveVehicle(veh)
            destroyElement(veh)
            exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1 WHERE id=?"id)
            toggleControl(el,"enter_exit",true)
            --outputChatBox("* Pomy?›lnie zapisano pojazd."el255255 ,255 ,true)
        end10001)
    end
end)

addEvent("onParkingVehicleSpawn"true)
addEventHandler("onParkingVehicleSpawn"root, function(id)
    if not id then return end
    local spawn=exports["ogrpg-vehicles"]:onRespawnVehicles(_,id,{-1743.54,955.78,24.48,0,0,180})
    if spawn then
    addEventHandler("onClientRender",root,render1)  
    
    end
end)



function render1()
dxDrawText("Zrespiono pojazd"screenW 0.3656screenH 0.1553screenW 0.6273screenH 0.3193tocolor(255255255255), 2.50"pricedown""center""center"falsefalsefalsefalsefalse)
end


function renderstop1()
removeEventHandler("onClientRender",root,render1)
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-11, 18:12


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Zr?b now? kolumn? w bazie danych o jakie? nazwie, np. "stan".
Do odczytu i zapisu aut wczytuj/zapisuj dane w tej kolumnie dla danego auta za pomoc? getElementHealth.

Postaw piwo autorowi tego posta
 

 
Tagi: przechowywalnia :: nie :: zapisuje :: tuningu :: itp
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku