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

Wysłany: 2018-07-29, 18:31


SzoPPP







Wiek: 25
Na forum: 3561 dni
Posty: 3
Nick w MP: SzoPPP



Respekt: 50

Witam,
chodzi o to ?e je?eli pr?buje zacz?? prac? to w DB3 wyskakuje ?wy b??d(SS ni?ej) a praca si? nie rozpoczyna. Prosz? o pomoc!


SS b??du DB3:







Kod:

Kod:

--[[
autor: Asper & Payro
for: Own World
All rights reserved!
]]

local screenW, screenH = guiGetScreenSize()
local sx, sy = guiGetScreenSize()

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end

local showed = false
local showed2 = false

addEvent("onPlayerStartJob", true)
addEvent("onPlayerResign", true)
addEvent("onClientPlayerPayday", true)

local top = {}

addEvent("createJobsWindow", true)
addEventHandler("createJobsWindow", root, function(det)
details = det
addEventHandler("onClientRender", root, guiPrace)
showCursor(true)
showed = true
end)

addEvent("destroyJobsWindow", true)
addEventHandler("destroyJobsWindow", root, function()
removeEventHandler("onClientRender", root, guiPrace)
removeEventHandler("onClientRender", root, guiLevels)
showCursor(false)
showed = false
end)

local r,g,b = 50,50,50

local lvl_text = ""

function guiPrace()
local b = "Zatrudnij si?"
if getElementData(localPlayer, "user:job") == details[2] then
b = "Zwolnij si?"
end
exports["buttons"]:createCustomWindow("Panel pracy", screenW * 0.3599, screenH * 0.2417, screenW * 0.2802, screenH * 0.5176, tocolor(255, 255, 255, 255), false)
-- exports["buttons"]:createCustomText("Ranking pracy:\n"..table.concat(details[3], "\n"), screenW * 0.3510, screenH * 0.2489, screenW * 0.6490, screenH * 0.5815, tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, true, false, false, false)
exports["buttons"]:createCustomButton(b, screenW * 0.4130, screenH * 0.61, screenW * 0.1740, screenH * 0.0565, tocolor(255, 255, 255, 255), false)
exports["buttons"]:createCustomButton("Anuluj", screenW * 0.4130, screenH * 0.67, screenW * 0.1740, screenH * 0.0565, tocolor(255, 255, 255, 255), false)
end

function guiLevels()
exports["buttons"]:createCustomWindow("Wybierz poziom", screenW * 0.3599, screenH * 0.2417, screenW * 0.2802, screenH * 0.5176, tocolor(255, 255, 255, 255), false)
--texty leveli
if isMouseIn(screenW * 0.4323, screenH * 0.4796, screenW * 0.1354, screenH * 0.0426) then
lvl_text = details[4]
elseif isMouseIn(screenW * 0.4323, screenH * 0.5269, screenW * 0.1354, screenH * 0.0426) then
lvl_text = details[5]
elseif isMouseIn(screenW * 0.4323, screenH * 0.5741, screenW * 0.1354, screenH * 0.0426) then
lvl_text = details[6]
end
--
exports["buttons"]:createCustomText("Opis poziomu:\n"..lvl_text, screenW * 0.3510, screenH * 0.1989, screenW * 0.6490, screenH * 0.5815, tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, true, false, false, false)
--3 levele
exports["buttons"]:createCustomButton("Poziom 1", screenW * 0.4323, screenH * 0.4796, screenW * 0.1354, screenH * 0.0426, tocolor(255, 255, 255, 255), tocolor(r,g,b))
exports["buttons"]:createCustomButton("Poziom 2", screenW * 0.4323, screenH * 0.5269, screenW * 0.1354, screenH * 0.0426, tocolor(255, 255, 255, 255), tocolor(r,g,b))
exports["buttons"]:createCustomButton("Poziom 3", screenW * 0.4323, screenH * 0.5741, screenW * 0.1354, screenH * 0.0426, tocolor(255, 255, 255, 255), tocolor(r,g,b))
--
exports["buttons"]:createCustomButton("Anuluj", screenW * 0.4130, screenH * 0.67, screenW * 0.1740, screenH * 0.0565, tocolor(255, 255, 255, 255), false)
end

addEventHandler("onClientClick", root, function(btn, state)
if btn == "left" and state == "down" then
if isMouseIn(screenW * 0.4130, screenH * 0.61, screenW * 0.1740, screenH * 0.0565) and showed then
if getElementData(localPlayer, "user:job") and getElementData(localPlayer, "user:job") == details[2] then
endJob()
else
acceptJob()
end
elseif isMouseIn(screenW * 0.4130, screenH * 0.67, screenW * 0.1740, screenH * 0.0565) and showed2 then
removeEventHandler("onClientRender", root, guiLevels)
showed2 = false
showCursor(false)
elseif isMouseIn(screenW * 0.4130, screenH * 0.67, screenW * 0.1740, screenH * 0.0565) and showed then
removeEventHandler("onClientRender", root, guiPrace)
showed = false
showCursor(false)
elseif isMouseIn(screenW * 0.4323, screenH * 0.4796, screenW * 0.1354, screenH * 0.0426) and showed2 then
startJob(1)
elseif isMouseIn(screenW * 0.4323, screenH * 0.5269, screenW * 0.1354, screenH * 0.0426) and showed2 then
startJob(2)
elseif isMouseIn(screenW * 0.4323, screenH * 0.5741, screenW * 0.1354, screenH * 0.0426) and showed2 then
startJob(3)
end
end
end)

function startJob(lvl)
if lvl == 1 then
if details[10] ~= true then
if getElementData(localPlayer, "user:pj"..details[10]) and getElementData(localPlayer, "user:pj"..details[10]) ~= 1 then
exports["rpg_noti"]:createNotification("error", "Aby pracowa? na tej pracy potrzebujesz prawo jazdy kat. "..details[10])
return
end
end
if getElementData(localPlayer, details[13]) < details[7] then
exports["rpg_noti"]:createNotification("error", "Aby pracowa? na tej pracy potrzebujesz "..details[7].." punkt?w")
return
end
elseif lvl == 2 then
if details[11] ~= true then
if getElementData(localPlayer, "user:pj"..details[11]) and getElementData(localPlayer, "user:pj"..details[11]) ~= 1 then
exports["rpg_noti"]:createNotification("error", "Aby pracowa? na tej pracy potrzebujesz prawo jazdy kat. "..details[11])
return
end
end
if getElementData(localPlayer, details[13]) < details[8] then
exports["rpg_noti"]:createNotification("error", "Aby pracowa? na tej pracy potrzebujesz "..details[8].." punkt?w")
return
end
elseif lvl == 3 then
if details[12] ~= true then
if getElementData(localPlayer, "user:pj"..details[12]) and getElementData(localPlayer, "user:pj"..details[12]) ~= 1 then
exports["rpg_noti"]:createNotification("error", "Aby pracowa? na tej pracy potrzebujesz prawo jazdy kat. "..details[12])
return
end
end
if getElementData(localPlayer, details[13]) < details[9] then
exports["rpg_noti"]:createNotification("error", "Aby pracowa? na tej pracy potrzebujesz "..details[9].." punkt?w")
return
end
end
setElementData(localPlayer, "user:job", details[2])
triggerEvent("onPlayerStartJob", localPlayer, details[2], lvl)
triggerServerEvent("onPlayerStartJob", localPlayer, details[2], lvl)
removeEventHandler("onClientRender", root, guiLevels)
showed2 = false
showCursor(false)
end

function acceptJob()
removeEventHandler("onClientRender", root, guiPrace)
showCursor(false)
showed = false
if not getElementData(localPlayer, "user:job") or getElementData(localPlayer, "user:job") == 0 then
showCursor(true)
showed2 = true
addEventHandler("onClientRender", root, guiLevels)
else
exports.rpg_noti:createNotification("error", "Posiadasz ju? inn? prac?, aby si? z niej zwolnij wpisz /zrezygnuj")
end
end
addEvent("acceptJob", true)
addEventHandler("acceptJob", root, acceptJob)

function endJob()
triggerServerEvent("playerResign", localPlayer, localPlayer, true)
end
addEvent("jobResign", true)
addEventHandler("jobResign", root, endJob)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-29, 19:19


_jvneczek







Wiek: 22
Na forum: 4325 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

Lepiej we? prace z ogka i to przer?b bo te prace to masakra, niby prace spoko ale bug za bugiem.

Podpis

Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-29, 19:22


Mezo.

Mod-Team






Wiek: 24
Na forum: 3211 dni
Posty: 548
Nick w MP: Mezo

Piwa: 6070

Respekt: 517
Respekt: 517

Spr?buj

--[[ 
autorAsper Payro 
for: Own World 
All rights reserved! 
]] 

local screenWscreenH guiGetScreenSize() 
local sxsy guiGetScreenSize() 

function isMouseIn(psx,psy,pssx,pssy,abx,aby) 
if not isCursorShowing() then return end 
cx,cy=getCursorPosition() 
cx,cy=cx*sx,cy*sy 
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then 
return true,cx,cy 
else 
return false 
end 
end 

local showed false 
local showed2 false 

addEvent("onPlayerStartJob"trueaddEvent("onPlayerResign"trueaddEvent("onClientPlayerPayday"truelocal top = {} 

addEvent("createJobsWindow"trueaddEventHandler("createJobsWindow"root, function(detdetails det 
addEventHandler("onClientRender"rootguiPraceshowCursor(trueshowed true 
endaddEvent("destroyJobsWindow"trueaddEventHandler("destroyJobsWindow"root, function() 
removeEventHandler("onClientRender"rootguiPraceremoveEventHandler("onClientRender"rootguiLevelsshowCursor(falseshowed false 
endlocal r,g,50,50,50 

local lvl_text "" 

function guiPrace() 
local b "Zatrudnij si?" 
if getElementData(localPlayer"user:job") == details[2then 
b "Zwolnij si?" 
end 
exports["buttons"]:createCustomWindow("Panel pracy"screenW 0.3599screenH 0.2417screenW 0.2802screenH 0.5176tocolor(255255255255), false) 
-- exports["buttons"]:createCustomText("Ranking pracy:\n"..table.concat(details[3], "\n"), screenW 0.3510screenH 0.2489screenW 0.6490screenH 0.5815tocolor(255255255255), 1.00font"center""center"falsetruefalsefalsefalseexports["buttons"]:createCustomButton(bscreenW 0.4130screenH 0.61screenW 0.1740screenH 0.0565tocolor(255255255255), falseexports["buttons"]:createCustomButton("Anuluj"screenW 0.4130screenH 0.67screenW 0.1740screenH 0.0565tocolor(255255255255), falseend 

function guiLevels() 
exports["buttons"]:createCustomWindow("Wybierz poziom"screenW 0.3599screenH 0.2417screenW 0.2802screenH 0.5176tocolor(255255255255), false) 
--texty leveli 
if isMouseIn(screenW 0.4323screenH 0.4796screenW 0.1354screenH 0.0426then 
lvl_text details[4] 
elseif isMouseIn(screenW 0.4323screenH 0.5269screenW 0.1354screenH 0.0426then 
lvl_text details[5] 
elseif isMouseIn(screenW 0.4323screenH 0.5741screenW 0.1354screenH 0.0426then 
lvl_text details[6end 
-- 
exports["buttons"]:createCustomText("Opis poziomu:\n"..lvl_textscreenW 0.3510screenH 0.1989screenW 0.6490screenH 0.5815tocolor(255255255255), 1.00font"center""center"falsetruefalsefalsefalse) 
--3 levele 
exports["buttons"]:createCustomButton("Poziom 1"screenW 0.4323screenH 0.4796screenW 0.1354screenH 0.0426tocolor(255255255255), tocolor(r,g,b)) 
exports["buttons"]:createCustomButton("Poziom 2"screenW 0.4323screenH 0.5269screenW 0.1354screenH 0.0426tocolor(255255255255), tocolor(r,g,b)) 
exports["buttons"]:createCustomButton("Poziom 3"screenW 0.4323screenH 0.5741screenW 0.1354screenH 0.0426tocolor(255255255255), tocolor(r,g,b)) 
-- 
exports["buttons"]:createCustomButton("Anuluj"screenW 0.4130screenH 0.67screenW 0.1740screenH 0.0565tocolor(255255255255), falseend 

addEventHandler("onClientClick"root, function(btnstate) 
if btn == "left" and state == "down" then 
if isMouseIn(screenW 0.4130screenH 0.61screenW 0.1740screenH 0.0565) and showed then 
if getElementData(localPlayer"user:job") and getElementData(localPlayer"user:job") == details[2then 
endJob() 
else 
acceptJob() 
end 
elseif isMouseIn(screenW 0.4130screenH 0.67screenW 0.1740screenH 0.0565) and showed2 then 
removeEventHandler("onClientRender"rootguiLevelsshowed2 false 
showCursor(false) 
elseif isMouseIn(screenW 0.4130screenH 0.67screenW 0.1740screenH 0.0565) and showed then 
removeEventHandler("onClientRender"rootguiPraceshowed false 
showCursor(false) 
elseif isMouseIn(screenW 0.4323screenH 0.4796screenW 0.1354screenH 0.0426) and showed2 then 
startJob(1) 
elseif isMouseIn(screenW 0.4323screenH 0.5269screenW 0.1354screenH 0.0426) and showed2 then 
startJob(2) 
elseif isMouseIn(screenW 0.4323screenH 0.5741screenW 0.1354screenH 0.0426) and showed2 then 
startJob(3end 
end 
end) 

function startJob(lvl) 
if lvl == 1 then 
if details[10] ~= true then 
if getElementData(localPlayer"user:pj"..details[10]) and getElementData(localPlayer"user:pj"..details[10]) ~= 1 then 
exports["rpg_noti"]:createNotification("error""Aby pracowa? na tej pracy potrzebujesz prawo jazdy kat. "..details[10]) 
return 
end 
end 
if getElementData(localPlayerdetails[10]) < details[7then 
exports["rpg_noti"]:createNotification("error""Aby pracowa? na tej pracy potrzebujesz "..details[7].." punkt?w") 
return 
end 
elseif lvl == 2 then 
if details[11] ~= true then 
if getElementData(localPlayer"user:pj"..details[10]) and getElementData(localPlayer"user:pj"..details[9]) ~= 1 then 
exports["rpg_noti"]:createNotification("error""Aby pracowa? na tej pracy potrzebujesz prawo jazdy kat. "..details[11]) 
return 
end 
end 
if getElementData(localPlayerdetails[10]) < details[8then 
exports["rpg_noti"]:createNotification("error""Aby pracowa? na tej pracy potrzebujesz "..details[8].." punkt?w") 
return 
end 
elseif lvl == 3 then 
if details[12] ~= true then 
if getElementData(localPlayer"user:pj"..details[10]) and getElementData(localPlayer"user:pj"..details[7]) ~= 1 then 
exports["rpg_noti"]:createNotification("error""Aby pracowa? na tej pracy potrzebujesz prawo jazdy kat. "..details[12]) 
return 
end 
end 
if getElementData(localPlayerdetails[10]) < details[4then 
exports["rpg_noti"]:createNotification("error""Aby pracowa? na tej pracy potrzebujesz "..details[9].." punkt?w") 
return 
end 
end 
setElementData(localPlayer"user:job"details[2]) 
triggerEvent("onPlayerStartJob"localPlayerdetails[2], lvltriggerServerEvent("onPlayerStartJob"localPlayerdetails[2], lvlremoveEventHandler("onClientRender"rootguiLevelsshowed2 false 
showCursor(falseend 

function acceptJob() 
removeEventHandler("onClientRender"rootguiPraceshowCursor(falseshowed false 
if not getElementData(localPlayer"user:job") or getElementData(localPlayer"user:job") == 0 then 
showCursor(trueshowed2 true 
addEventHandler("onClientRender"rootguiLevels) 
else 
exports.rpg_noti:createNotification("error""Posiadasz ju? inn? prac?, aby si? z niej zwolnij wpisz /zrezygnuj"end 
end 
addEvent("acceptJob"trueaddEventHandler("acceptJob"rootacceptJob) 

function endJob() 
triggerServerEvent("playerResign"localPlayerlocalPlayertrueend 
addEvent("jobResign"trueaddEventHandler("jobResign"rootendJob


Podpis
- Na forum pomagam na miarę swoich możliwości, oraz bezpłatnie.
- Jeżeli potrzebujesz pomocy, pisz do mnie w prywatnej wiadomości, pomoc uzyskasz szybciej.
Współpraca - [email protected]


Użytkownik - 19.08.2017
GTAO MEMBER - 29.03.2019
Support-Team - 03.02.2019 - 07.05.2019
Moderator - 07.05.2019 - 02.08.2020
Mod-Team - 02.08.2020 - 25.03.2022

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-29, 23:13


SzoPPP







Wiek: 25
Na forum: 3561 dni
Posty: 3
Nick w MP: SzoPPP



Respekt: 50

Teraz w DB3 pojawiaj? si? takie b??dy:




Praca nadal si? nie rozpoczyna.

Postaw piwo autorowi tego posta
 

 
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