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

Wysłany: 2021-08-15, 01:47


krychaa







Wiek: 27
Na forum: 2029 dni
Posty: 6
Nick w MP: krychaa



Respekt: 50

Witam wie kto? dlaczego na paczce Eclipse RPG po zakupie auta i przy wyciagnieciu auta z przechowywalni auto sie nie respi. I wraca do przecho ?

Ostatnio zmieniony przez krychaa 2021-08-15, 10:43, w całości zmieniany 3 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-08-15, 11:09


krychaa







Wiek: 27
Na forum: 2029 dni
Posty: 6
Nick w MP: krychaa



Respekt: 50

s_parking.lua
Kod:

--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1951.8657226563, 613.52954101563, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]

--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1966.6160888672, 613.84454345703, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]


local marker=createMarker(-2533.05, -15.26, 16.43-1, "cylinder", 3.4, 255,255,255,20)
createBlip(-2535.66, -19.97, 16.43, 35,2,0,0,0,0,0,250)

local mdestroy = createColCuboid(-1951.8657226563, 613.52954101563, 33.78190612793, 14.4, 7.3, 6.2)
setElementData(marker,'marker:text','Odstawienie pojazd?w')

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

addEventHandler("onMarkerHit", marker, 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(timeroddania) then return end
setElementFrozen(veh,true)
outputChatBox("* Trwa zapisywanie pojazdu...", el)
toggleControl(el,"enter_exit",false)
timeroddania=setTimer(function()
setElementFrozen(veh,false)
local id=getElementData(veh,"vehicle:id")
if not id then return end
exports["pystories-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1 WHERE id=?", id)
toggleControl(el,"enter_exit",true)
outputChatBox("* Pomy?lnie zapisano pojazd.", el)
end, 3000, 1)
elseif getElementType(el) == "vehicle" then
local peds= getVehicleOccupants(el)
if #peds > 0 then return end
local id=getElementData(el,"vehicle:id")
if not id then return end
if isTimer(timeroddania) then return end
timeroddania=setTimer(function()
setElementFrozen(el,false)
local id=getElementData(el,"vehicle:id")
if not id then return end
exports["pystories-vehicles"]:onSaveVehicle(el)
destroyElement(el)
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zapisano pojazd.", el, 255, 255 ,255 ,true)
end, 3000, 1)
setElementFrozen(el,true)
setVehicleLocked(el,true)
end
end)

addEvent("onParkingVehicleSpawnss", true)
addEventHandler("onParkingVehicleSpawnss", root, function(id)
if not id then return end
local spawn=exports["pystories-vehicles"]:onRespawnVehicles(_,id,{-2532.98, -22.11, 16.43, -0.7, 0.2, 91.})
if spawn then
--addEventHandler("onClientRender",root,render1)
outputChatBox("* Pomy?lnie wyci?gni?to pojazd z przechowalni.",el)
warpPedIntoVehicle(el,spawn)
end
end)


c_parking.lua
Kod:

--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1951.8657226563, 613.52954101563, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]

--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1966.6160888672, 613.84454345703, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]

local screenW, screenH = guiGetScreenSize()
local marker=createMarker(-2533.54, -28.26, 16.46-0.9, "cylinder", 2, 255,255,255,50)
--local sphere=createColCuboid(-1966.6160888672, 613.84454345703, 33.78190612793, 14.4, 7.3, 6.2)

setElementData(marker,'marker:text','Odbi?r pojazd?w')

local wm={}
wm.window=guiCreateWindow(0.25, 0.26, 0.51, 0.42, "Odbieranie pojazd?w", true)
guiWindowSetSizable(wm.window, false)
guiWindowSetMovable(wm.window, false)
guiSetVisible(wm.window, false)
wm.gridlist=guiCreateGridList(0.04, 0.09, 0.92, 0.65, true, wm.window)
guiGridListAddColumn(wm.gridlist, "ID", 0.2)
guiGridListAddColumn(wm.gridlist, "Model", 0.55)
guiGridListAddColumn(wm.gridlist, "Zarejestrowany", 0.2)
wm.submit=guiCreateButton(0.04, 0.76, 0.47, 0.19, "Wyjmij pojazd", true, wm.window)
wm.close=guiCreateButton(0.57, 0.75, 0.39, 0.20, "Zamknij", true, wm.window)

addEvent("onParkingGetVehicless", true)
addEventHandler("onParkingGetVehicless", root, function(result)
guiGridListClear(wm.gridlist)
if not result then return end
for i,v in pairs(result) do
if v["registered"] == "false" then
v["registered"] = "NIE"
else
v["registered"] = "TAK"
end
local row=guiGridListAddRow(wm.gridlist)
guiGridListSetItemText(wm.gridlist, row, 1, v["id"], false, false)
guiGridListSetItemText(wm.gridlist, row, 2, getVehicleNameFromModel(v["model"]), false, false)
guiGridListSetItemText(wm.gridlist, row, 3, v["registered"], false, false)
end
end)

addEventHandler("onClientMarkerHit", marker, function(el,md)
if el~=localPlayer then return end
if isPedInVehicle(el) then return end
if guiGetVisible(wm.window) == false then
showCursor(true)
guiSetVisible(wm.window,true)
triggerServerEvent("onParkingGetRekord", localPlayer)
--etCameraMatrix(-2056.26, 468.77, 38.49, -2048.08, 467.73, 35.17)
end
end)

addEventHandler("onClientGUIClick", resourceRoot, function()
if source == wm.close then
if guiGetVisible(wm.window) == true then
showCursor(false)
guiSetVisible(wm.window,false)
setCameraTarget(localPlayer, localPlayer)
end
end
if source == wm.submit then
local selectedRow=guiGridListGetSelectedItem(wm.gridlist) or -1
if selectedRow < 0 then return end
local id=guiGridListGetItemText(wm.gridlist, selectedRow, 1)
local register=guiGridListGetItemText(wm.gridlist, selectedRow, 3)
if register == "NIE" then
outputChatBox("* Zarejestruj pojazd w urz?dzie! Jego ID to "..id,255,0,0)
return end
guiGridListRemoveRow(wm.gridlist, selectedRow)
triggerServerEvent("onParkingVehicleSpawnss", localPlayer, tonumber(id))
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-08-15, 22:11


Matikmontana

Modern Stories






Wiek: 22
Na forum: 2473 dni
Posty: 423
Nick w MP: Mazeusz*

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
Daj b??dy z db3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-08-15, 22:13


krychaa







Wiek: 27
Na forum: 2029 dni
Posty: 6
Nick w MP: krychaa



Respekt: 50

"Matikmontana" napisał/a:

Daj b??dy z db3


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-08-15, 22:17


Matikmontana

Modern Stories






Wiek: 22
Na forum: 2473 dni
Posty: 423
Nick w MP: Mazeusz*

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
Przeczytaj co tam pisze... :shock:

Sprawdz czy zas?b pystories-vehicles jest w??czony

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-08-15, 22:20


krychaa







Wiek: 27
Na forum: 2029 dni
Posty: 6
Nick w MP: krychaa



Respekt: 50

"Matikmontana" napisał/a:

Przeczytaj co tam pisze... :shock:

Sprawdz czy zas?b pystories-vehicles jest w??czony


Dzi?ki wielkie hah nie zauwa?y?em tego lol

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-08-19, 22:32


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

[clo]

Postaw piwo autorowi tego posta
 

 
Tagi: przecho :: eclipse
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