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

Wysłany: 2019-02-13, 13:05


TovuPL

.LUA






Wiek: 25
Na forum: 3482 dni
Posty: 25
Nick w MP: TovU



Respekt: 40

Witam jak w temacie nie dzia?? przecho, nie wy?wietla pojazd?w nie ma b??d?w pod debugscript3


--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]

local mdestroy=createMarker(-2674.63245.974.39-3"cylinder",6,200,25,25,75)
local zone createColSphere(-2683.10237.474.39,5)
createBlipAttachedTo(mdestroy35)

local t=createElement("text")
setElementData(t,"scale",1)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-2674.63245.974.39)


addEvent("onParkingGetRekords"true)
addEventHandler("onParkingGetRekords"root, function()
    local uid=getElementData(source,"veh:owner")
    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,true)
        triggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd wje?dza do przechowywalni...")
        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)
            triggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd zosta? zapisany w przechowywalni.")
        end30001)
    end
end)

addEvent("onParkingVehicleSpawn"true)
addEventHandler("onParkingVehicleSpawn"root, function(id)
    if not id then return end
    if #getElementsWithinColShape(zone,"vehicle") >= 1 then 
    outputChatBox("* Respawn zastawiony!!",source) 
    return
    end
    local spawn=exports["ogrpg-vehicles"]:onRespawnVehicles(_,id,{-2674.20228.174.39,359.5,0.0,2.7})
    if spawn then
    end
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-13, 13:25


TheSebaPL

Mod-team






Wiek: 21
Na forum: 3098 dni
Posty: 964

Piwa: 3102

Respekt: 640,5
Respekt: 640,5Respekt: 640,5

TovuPL, wszystkie kolumny masz dobrze ? Zrestartuj ogrpg-vehicles i zobacz czy nie ma ?adnego b??du.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-13, 15:48


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Jak wygl?da u Ciebie baza danych z pojazdami? Mo?esz wys?a? zrzut ekranu kilku pierwszych wpis?w?

Pod jak? elementDat? zapisujesz dane 'ownedPlayer'?
Domy?lam si?, ?e jest to ID gracza - w zapytaniu korzystasz ze zmiennej UID, kt?r? definiujesz jako
local uid=getElementData(source,"veh:owner")

Ta elementData zgadza si? z tym, co jest w tej kolumnie?

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: działa :: przecho
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Nie działa przecho 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