Wysłany: 2017-06-02, 00:40
BH|LeFeS
DayZ is EPIC!
Wiek: 21 Na forum: 3508 dni Posty: 82
Nick w MP: LeFeS
Piwa : 7
Nie dzia?a naprawa, gdy ustawiam cuboid gdzie ma si? znajdowa?, a w debugscript wyskakuje mi
Kod: ERROR: CL-naprawa\naprawa_c.lua:154: exports: call to non-running server resource (q) [string "?"]
kod skryptu naprawy:
Kod: --createBlip(1372.43, 713.67, 10.82, 27,2,255,0,0,255,0,100)
local t = createElement('text')
setElementPosition(t,-109.45, 1043.49, 19.93-0.5)
setElementData(t,"name","Naprawa pojazdu\nSamoobs?uga")
local t = createElement('text')
setElementPosition(t,-109.23, 1051.13, 19.93-0.5)
setElementData(t,"name","Naprawa pojazdu\nSamoobs?uga")
local strefyNapraw={
-- SF
warsztatIdlewoodStanowsko11={
cuboid={-111.18, 1045.20, 19.59, 360.0, 360.0, 91.2},-- cuboid w ktorym musi znalezc sie pojazd
mpos={-109.45, 1043.49, 19.93-1}, -- pozycja markera w ktorym gracz bedzie stal aby naprawiac
faction_id=3, -- id frakcji ktora ma do tego dostep
},
warsztatIdlewoodStanowsko12={
cuboid={-110.94, 1053.95, 19.59, 360.0, 360.0, 89.9},
mpos={-109.23, 1051.13, 19.93-1},
faction_id=3,
},
}
for i,v in pairs(strefyNapraw) do
v.cs=createColCuboid(v.cuboid[1], v.cuboid[2], v.cuboid[3], v.cuboid[4], v.cuboid[5], v.cuboid[6])
v.marker=createMarker(v.mpos[1], v.mpos[2], v.mpos[3], "cylinder", 1, 0,255,255,50)
setElementData(v.marker,"cs",v.cs)
setElementData(v.marker,"faction_id",v.faction_id)
end
addEvent("naprawaElementu", true)
addEventHandler("naprawaElementu", resourceRoot, function(pojazd, czesc, koszt)
outputDebugString("Naprawa elementu " .. czesc .. " za " .. koszt)
takePlayerMoney( client, koszt )
if koszt>getPlayerMoney(client) then
return
end
if (czesc==-1) then
local vps={}
local vds={}
local vls={}
for i=0,6 do vps[i]=getVehiclePanelState(pojazd,i) end
for i=0,3 do vds[i]=getVehicleDoorState(pojazd,i) end
for i=0,3 do vls[i]=getVehicleLightState(pojazd,i) end
fixVehicle(pojazd)
for i=0,6 do setVehiclePanelState(pojazd, i, vps[i]) end
for i=0,3 do setVehicleDoorState(pojazd, i, vds[i]) end
for i=0,3 do setVehicleLightState(pojazd, i, vls[i]) end
triggerClientEvent(client, "refreshVehicleData", resourceRoot, pojazd)
elseif czesc>=0 and czesc<=6 then
setVehiclePanelState(pojazd, czesc, 0)
triggerClientEvent(client, "refreshVehicleData", resourceRoot, pojazd)
elseif czesc>=10 and czesc<20 then
local drzwi=czesc-10
setVehicleDoorState(pojazd, drzwi, 0)
triggerClientEvent(client, "refreshVehicleData", resourceRoot, pojazd)
elseif czesc>=20 then
local swiatlo=czesc-20
setVehicleLightState(pojazd, swiatlo, 0)
triggerClientEvent(client, "refreshVehicleData", resourceRoot, pojazd)
end
end)
local warsztatyid = {
[3]=true,
}
for i,v in ipairs(punkty_brania_kol) do
v.marker=createMarker(v[1],v[2],v[3],"cylinder", v[4], 0,0,0,100)
setElementData(v.marker, "braniekola", true)
setElementData(v.marker, "faction:id", v.faction_id)
end
local function czyPracownikWarsztatu(gracz)
local lfid=getElementData(gracz,"faction:id") or -1
if not warsztatyid[lfid] then return false end
return true
end
local function najblizszeKolo(gracz,pojazd)
-- easy peasy
local xg,yg,zg=getElementPosition(gracz)
local najblizszeKolo=nil
local najblizszeDist=1000
local x,y,z=getElementPosition(pojazd)
local _,_,rz=getElementRotation(pojazd)
for i=1,4 do
local rrz=math.rad(rz+45+(i-1)*90)
local x= x + (1 * math.sin(-rrz))
local y= y + (1 * math.cos(-rrz))
if not najblizszeKolo or getDistanceBetweenPoints2D(x,y,xg,yg)<najblizszeDist then
najblizszeDist=getDistanceBetweenPoints2D(x,y,xg,yg)
najblizszeKolo=i
end
end
-- ugly
if not najblizszeKolo then return nil end
if najblizszeKolo==4 then return 3
elseif najblizszeKolo==3 then return 4 end
return najblizszeKolo
end
local function zalozKolo(plr)
local x,y,z=getElementPosition(plr)
local _,_,rz=getElementRotation(plr)
local rrz=math.rad(rz)
local x= x + (1.5 * math.sin(-rrz))
local y= y + (1.5 * math.cos(-rrz))
local cs=createColSphere(x,y,z,2.5)
local pojazdy=getElementsWithinColShape(cs,"vehicle")
destroyElement(cs)
if (#pojazdy~=1) then
return false
end
-- okreslamy, kolo ktorego kola jest gracz
local k1,k2,k3,k4=getVehicleWheelStates(pojazdy[1])
if (k1==0) and (k2==0) and (k3==0) and (k4==0) then return end
local kolo=najblizszeKolo(plr,pojazdy[1])
if not kolo then return end
setPedAnimation(plr, "MISC", "pickup_box", 1, false, false, true, true)
toggleControl(plr, "forward", false)
setTimer(setPedAnimationProgress, 600, 1, plr, "pickup_box", 0.5)
setElementData(plr, "blockSettingAnimation", true) --blokujemy ENTER
if kolo==1 then
k1=0
elseif kolo==2 then
k2=0
elseif kolo==3 then
k3=0
elseif kolo==4 then
k4=0
end
setTimer(setPedAnimation, 9000, 1, plr, "ped", "phone_in")
setTimer(setPedAnimation, 9300, 1, plr)
setTimer(setVehicleWheelStates, 9000, 1, pojazdy[1], k1, k2, k3, k4)
setTimer(setElementData, 9000, 1, plr, "blockSettingAnimation", true)
setTimer(toggleControl, 9000, 1, plr, "forward", true)
zabierzKolo(plr,9000)
end
function zabierzKolo(el,delay)
local niesionyObiekt=getElementData(el,"niesioneKolo")
if niesionyObiekt then
if isElement(niesionyObiekt) then
if delay then
setTimer(destroyElement, delay, 1, niesionyObiekt)
else
destroyElement(niesionyObiekt)
end
end
removeElementData(el,"niesioneKolo")
setPedWalkingStyle(el,0)
unbindKey(el, "fire", "down", zalozKolo)
return true
end
return false
end
addEventHandler("onMarkerHit", resourceRoot, function(el,md)
if not md or getElementType(el)~="player" then return end
if not getElementData(source, "braniekola") then return end
if zabierzKolo(el) then return end
local kolo=createObject(1098,0,0,0)
setObjectScale(kolo, 0.7)
setElementData(el,"niesioneKolo", kolo,false)
-- attachElements(kolo, el, 0,0.4,-0.2,0,0,90)
bindKey(el, "fire", "down", zalozKolo)
exports["bone_attach"]:attachElementToBone(kolo, el, 11, 0.1,-0.1,0)
setPedWalkingStyle(el,66)
end)
addEventHandler ( "onPickupHit", pickup, function(element)
local result = exports.MNSDB:dbGet("SELECT * FROM konta WHERE tuner=? and login=?", 1, getPlayerName(element))
if #result > 0 then
if getElementData(element, "tunerfc") then
exports.notyfikacje:outputNotificationBox(element, "Zwolniles sie z pracy tunera.", 255,255, 255)
setElementData(element, "tunerfc", false)
else
exports.notyfikacje:outputNotificationBox(element, "Zatrudniles sie na prace tunera.", 255,255, 255)
setElementData(element, "tunerfc", true)
end
else
exports.notyfikacje:outputNotificationBox(element, "Nie jestes zatrudniony jako Tuner SF w urzedzie!", 255, 0, 0)
end
end)--POGO!!!
--[[
myMarker3 = createMarker( -2039.64,174.76,28.84-0.9, 'cylinder', 1, 0, 0, 0)
bra3 = createObject ( 11416, -2038.88,178.76,29.84, 0, 0, 0 )
function MarkerHit3 (hitPlayer, matchingDimension)
local playera = hitPlayer
local easing = "OutBounce"
local time = 5000
if getElementType( playera ) == "player" then
if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( playera ) ), aclGetGroup( "Mechanik" ) ) then
moveObject ( bra3, time, -2038.88,178.76,29.84-5.5, 0, 0, 0, easing)
end
end
end
function MarkerLeave3 ()
local easing2 = "OutBounce"
local time = 5000
moveObject ( bra3, time, -2038.88,178.76,29.84, 0, 0, 0, easing2)
end
addEventHandler ( "onMarkerHit", myMarker3, MarkerHit3 )
addEventHandler ( "onMarkerLeave", myMarker3, MarkerLeave3 )
--]]
addEventHandler("onVehicleEnter", resourceRoot, function(plr, seat)
if seat == 0 then
setElementFrozen(source, false)
setElementData(source, "pojazd_paliwo", 100)
end
end)
@EDIT
- Prosz? o szybk? odpowied? bo musze mie? jutro start serwera.
Wysłany: 2017-06-02, 06:57
neku^
Wiek: 24 Na forum: 3522 dni Posty: 461
Nick w MP: neku^
Piwa : 1186
Call to non-running server resource m?wi samo za siebie. W??cz skrypt 'q'
Wysłany: 2017-06-02, 11:46
BH|LeFeS
DayZ is EPIC!
Wiek: 21 Na forum: 3508 dni Posty: 82
Nick w MP: LeFeS
Piwa : 7
U MNIE takiego skryptu nie ma
Wysłany: 2017-06-02, 12:44
Kalizman
Wiek: 23 Na forum: 3652 dni Posty: 1394
Piwa : 4619
to usun linijke ktora odpowiada za ten 'q'
Wysłany: 2017-06-02, 21:08
BH|LeFeS
DayZ is EPIC!
Wiek: 21 Na forum: 3508 dni Posty: 82
Nick w MP: LeFeS
Piwa : 7
to we to znajd? bo ja nie moge znale?? a ju? szukam, 1,5h xD
XD nwm XD
Wysłany: 2017-06-02, 21:29
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
CL-naprawa\naprawa_c.lua:154: - db3 oznaczy? linijk? 154.
Wysłany: 2017-06-02, 22:24
BH|LeFeS
DayZ is EPIC!
Wiek: 21 Na forum: 3508 dni Posty: 82
Nick w MP: LeFeS
Piwa : 7
db3 nie posiadam! posiadam
, db2
@EDIT:
exports["1"]:outputNotificationBox ("#cc0000B??d")
tak mi pisze w 154 linijce.
Wysłany: 2017-06-02, 22:49
dida102
LUA To moja Pasja
Wiek: 25 Na forum: 3613 dni Posty: 86
Nick w MP: Remi
Piwa : 642
ale mu chodzi o debugscirpt 3
Podpis
Witaj na Moim Profilu.
Chętnie Pomogę Skype Pazdaix.
Szukam Mapera,Web Mastera,Modelarza Na Serwer Autorski Pod SQL .
Co Potrafię ,XML,LUA,Mapować,CSS,gui editor,siren editor.
[you]
!Pomogłem?Zostaw Respekt Oraz Piwo.
Wysłany: 2017-06-03, 00:17
Hemoglobina
Tylko Hema
Wiek: 29 Na forum: 3397 dni Posty: 89
Nick w MP: Answer
Piwa : 1386
Zaloguj si? na serwer i w konsoli wpisz debugscript 3, to poka?e prawdopodobnie gdzie dok?adnie jest b??d.
A to
Cytat:
ERROR: CL-naprawa\naprawa_c.lua:154: exports: call to non-running server resource (q) [string "?"]
chyba m?wi o tym, ?e nie uda?o si? wyeksportowa? funkcji z innego skryptu lub jest jaki? b??d lub z?a warto??. Podaj skrypt, w kt?rym wyst?puje literka "q", mo?e to by? folder db3 lub mo?e to by? te? plik w twoim skrypcie z napraw?. Prawdopodobnie kto? robi? operacje na bazie danych i co? nie chce dzia?a? lub ?le co? edytowa?e?.
Wysłany: 2017-06-03, 01:32
BH|LeFeS
DayZ is EPIC!
Wiek: 21 Na forum: 3508 dni Posty: 82
Nick w MP: LeFeS
Piwa : 7
Dobra naprawione, dzi?ki!. D
Problem by? w tym ?e nie czyta?o funkcji naprawElement, po resecie serwa wszystko dzia?a.
DO ZAMKNI?CIA [/b]
Tagi: naprawa
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: