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

Wysłany: 2017-05-24, 18:15


BH|LeFeS

DayZ is EPIC!






Wiek: 21
Na forum: 3649 dni
Posty: 82
Nick w MP: LeFeS

Piwa: 7

Respekt: 26,3

Co mam zrobi?? bo nie wiem :P , Bo chce zrobi? 6 miejsc na tunera, a potem jak to robie i chce zamontowa? cz?s?, nie dzia?a montowanie i taki mi w?asnie problem wyskakuje w konsoli...

[2017-05-24 18:09] ERROR: Client (#FCD307LeFeS) triggered serverside event montazElementu, but event is not added serverside

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:26


Emm

***** ***






Wiek: 32
Na forum: 4021 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6171

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Tre?? errora jasno m?wi - nie mo?na wykona? triggera "montazElementu", poniewa? nie istnieje taki event. Podaj kod s-side oraz c-side.

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:26


BH|LeFeS

DayZ is EPIC!






Wiek: 21
Na forum: 3649 dni
Posty: 82
Nick w MP: LeFeS

Piwa: 7

Respekt: 26,3

gdzie moge to znale?? bo nie ogarniam xD

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:27


Emm

***** ***






Wiek: 32
Na forum: 4021 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6171

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
No skoro 'montazElementu' to pewnie skrypt z jakim? tunerem, poszperaj troch? w skryptach i znajdziesz. :P

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:28


BH|LeFeS

DayZ is EPIC!






Wiek: 21
Na forum: 3649 dni
Posty: 82
Nick w MP: LeFeS

Piwa: 7

Respekt: 26,3

addEvent("pokazPanelTuningu", true)
addEventHandler("pokazPanelTuningu", localPlayer, function(veh)
    if not isElement(GUIEditor.window[1]) then
        if getElementData(veh, "vehicle:spawn") then
            showCursor(true)
            veh1 = veh
            setElementData(localPlayer, "tune:car", veh)
            local screenW, screenH = guiGetScreenSize()
            GUIEditor.window[1] = guiCreateWindow((screenW - 888) / 2, (screenH - 546) / 2, 888*width, 546*height, "Panel Tunera", false)
            guiWindowSetSizable(GUIEditor.window[1], false)
            GUIEditor.button[1] = guiCreateButton(445*width, 484*height, 233*width, 52*height, "Montuj\nDemontuj", false, GUIEditor.window[1])
            guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
            GUIEditor.button[2] = guiCreateButton(212*width, 484*height, 233*width, 52*height, "Zamknij\nMax doliczka = 50%", false, GUIEditor.window[1])
            guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
            GUIEditor.gridlist[1] = guiCreateGridList(31*width, 41*height, 827*width, 390*height, false, GUIEditor.window[1])
            guiGridListAddColumn(GUIEditor.gridlist[1], "ID", 0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "Typ", 0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "Akcja", 0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "Koszt", 0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "Nazwa", 0.15)
        --    a=0
            for i=0,16 do
                if getVehicleUpgradeOnSlot(veh, i) ~= 0 then
                    local a = guiGridListAddRow(GUIEditor.gridlist[1])
                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 1, tostring(getVehicleUpgradeOnSlot(veh, i)), false, false)
                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 2, tostring(getVehicleUpgradeSlotName(getVehicleUpgradeOnSlot(veh, i))), false, false)
                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 3, "demtuning", false, false)
                    if cenaCzesci[getVehicleUpgradeOnSlot(veh,i)] then
                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 4, tostring(tonumber(cenaCzesci[getVehicleUpgradeOnSlot(veh,i)]*9/10)) , false, false)
                    else
                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 4, "--" , false, false)
                    end
                    if nazwaCzesci[getVehicleUpgradeOnSlot(veh,i)] then
                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 5, tostring(nazwaCzesci[getVehicleUpgradeOnSlot(veh,i)]), false, false)
                    else
                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 5, "--" , false, false)
                    end
                    --    a=a+1
                else
                    for i2,v2 in ipairs(getVehicleCompatibleUpgrades(veh, i)) do
                        if cenaCzesci[v2] then
                            if not wykluczoneCzesci[v2] then
                                if v2 == 1164 then
                                    if getElementModel(veh) == 558 then
                                        local a=guiGridListAddRow(GUIEditor.gridlist[1])
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a, 1, tostring(v2), false, false)
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a, 2, tostring(getVehicleUpgradeSlotName(v2)), false, false)
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a, 3, "tuning", false, false)
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a, 4, tostring(cenaCzesci[v2]), false, false)
                                        if nazwaCzesci[v2] then
                                            guiGridListSetItemText(GUIEditor.gridlist[1], a, 5, tostring(nazwaCzesci[v2]), false, false)
                                        else
                                            guiGridListSetItemText(GUIEditor.gridlist[1], a, 5, "--" , false, false)
                                        end
                                    end
                                else
                                    local a=guiGridListAddRow(GUIEditor.gridlist[1])
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 1, tostring(v2), false, false)
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 2, tostring(getVehicleUpgradeSlotName(v2)), false, false)
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 3, "tuning", false, false)
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a, 4, tostring(cenaCzesci[v2]), false, false)
                                    if nazwaCzesci[v2] then
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a, 5, tostring(nazwaCzesci[v2]), false, false)
                                    else
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a, 5, "--" , false, false)
                                    end
                                --    a=a+1
                                end
                            end
                        end
                    end
                end
            end
            
            
            GUIEditor.progressbar[1] = guiCreateProgressBar(129*width, 436*height, 631*width, 38*height, false, GUIEditor.window[1])
            guiProgressBarSetProgress(GUIEditor.progressbar[1], 0)
        end
    else 
        setElementData(localPlayer, "tune:car",nil)
    end
    
end)


addEvent("ukryjPanelTuningu",true)
addEventHandler("ukryjPanelTuningu", localPlayer, function()
    if GUIEditor.window[1] and isElement(GUIEditor.window[1]) then
        destroyElement(GUIEditor.window[1])
        setElementData(localPlayer, "tune:car",nil)
        showCursor(false)
    end
end)

time=5000

function onClientGUIClick()
    if GUIEditor.button[2] and isElement(GUIEditor.button[2]) and source == GUIEditor.button[2] then
        if GUIEditor.window[1] and isElement(GUIEditor.window[1]) then
            destroyElement(GUIEditor.window[1])
            showCursor(false)
        end
    elseif GUIEditor.button[1] and isElement(GUIEditor.button[1]) and source == GUIEditor.button[1] then

        if GUIEditor.progressbar[1] and isElement(GUIEditor.progressbar[1]) and GUIEditor.gridlist[1] and isElement(GUIEditor.gridlist[1]) then
            if guiProgressBarGetProgress(GUIEditor.progressbar[1]) == 0 or guiProgressBarGetProgress(GUIEditor.progressbar[1]) == 100 then
            b=0
            local x,y = guiGridListGetSelectedItem(GUIEditor.gridlist[1])
                if y == 1 then 
                    removeEventHandler("onClientGUIClick",resourceRoot, onClientGUIClick)
                    
                    setTimer(function()
                        b=b+1
                        if GUIEditor.progressbar[1] and isElement(GUIEditor.progressbar[1]) then
                            guiProgressBarSetProgress(GUIEditor.progressbar[1], b)
                        end
                    end,time/100,100)
                    
                    setTimer(function()
                        addEventHandler("onClientGUIClick",resourceRoot, onClientGUIClick)
                        local text1 = guiGridListGetItemText(GUIEditor.gridlist[1], x, 1) -- ID
                        local text2 = guiGridListGetItemText(GUIEditor.gridlist[1], x, 2) -- TYP
                        local text3 = guiGridListGetItemText(GUIEditor.gridlist[1], x, 3) -- AKCJA
                        local text4 = guiGridListGetItemText(GUIEditor.gridlist[1], x, 4) -- CENA
                        local text5 = guiGridListGetItemText(GUIEditor.gridlist[1], x, 5) -- nazwa
                        if text1 and tonumber(text1) and text4 and tonumber(text4) and text3 and tostring(text3) then
--                        if not wykluczoneCzesci[tonumber(text1)] then
                                if cenaCzesci[tonumber(text1)] then
                                    if veh1 and isElement(veh1) and getElementType(veh1) == "vehicle" then
                                        triggerServerEvent("montazElementu", root, veh1, text3, text1, text4, text5)
                                    end
                                end
                            end
--                        end
                    end,time*1.14,1)
                end
            end
        end
    end
end

addEventHandler("onClientGUIClick",resourceRoot, onClientGUIClick) 

[size=9][ [i][b]Dodano[/b]: 2017-05-24, 18:29[/i] ][/size]
createBlip(-1963.12, 365.89, 39.45, 27,2,0,0,0,0,0,275)

local stanowiskaSwiatla = {
    j={
    mpos={-1963.12, 365.89, 39.45}, -- marker
    cpos={-1963.61, 373.74, 39.45, 6}, -- cuboid sphere
    job_id="Tuner sf", -- (id) frakcja kt?ra b?dzie mia?a dost?p
    text="Monta? tuningu"
    },
    d={
    mpos={-1958.45, 365.89, 39.45}, -- marker
    cpos={-1959.03, 373.78, 39.45, 6}, -- cuboid sphere
    job_id="Tuner sf", -- (id) frakcja kt?ra b?dzie mia?a dost?p
    text="Monta? tuningu"
    },
    g={
    mpos={-1953.72, 365.76, 39.45}, -- marker
    cpos={-1954.22, 373.76, 39.45, 6}, -- cuboid sphere
    job_id="Tuner sf", -- (id) frakcja kt?ra b?dzie mia?a dost?p
    text="Monta? tuningu"
    },
    x={
    mpos={-1933.05, 366.29, 39.45}, -- marker
    cpos={-1938.66, 372.52, 39.45, 6}, -- cuboid sphere
    job_id="tuner-sf", -- (id) frakcja kt?ra b?dzie mia?a dost?p
    text="Monta? tuningu"
    },
    w={
    mpos={-1938.15, 366.18, 39.45}, -- marker
    cpos={-1933.75, 372.28, 39.50, 6}, -- cuboid sphere
    job_id="tuner-sf", -- (id) frakcja kt?ra b?dzie mia?a dost?p
    text="Monta? tuningu"
    },
    e={
    mpos={-1927.64, 366.39, 39.45}, -- marker
    cpos={-1928.28, 372.46, 39.50, 6}, -- cuboid sphere
    job_id="tuner-sf", -- (id) frakcja kt?ra b?dzie mia?a dost?p
    text="Monta? tuningu"
    },
}
niewspiera_tuningu = {
[503] = true,
}
for i,v in pairs(stanowiskaSwiatla) do
    v.cuboid=createColSphere(v.cpos[1], v.cpos[2], v.cpos[3], v.cpos[4], v.cpos[5], v.cpos[6])
    v.marker=createMarker(v.mpos[1], v.mpos[2], v.mpos[3]-0.80, "cylinder", 1.5, 0, 0, 255, 100)
    setElementData(v.marker,"marker:duty",v.job_id)
    setElementData(v.marker,"marker:cuboid",v.cuboid)

    local t=createElement("text")
    setElementData(t,"name",v.text)
    setElementPosition(t,v.mpos[1], v.mpos[2], v.mpos[3])
    addEventHandler("onMarkerHit", v.marker, function(el,md)
    if getElementType(el)~= "player" then return end
    local cs=getElementData(source, "marker:cuboid")
    if not cs then return end
    local job=getElementData(source,"marker:duty")
    local ljob=getElementData(el,"player:duty")
    if job ~= ljob then
        outputChatBox(" Nie jeste? zatrudniony w tym warsztacie.", el, 255, 0, 0)
        return
    end
    local vehicles=getElementsWithinColShape(cs,"vehicle")
    if #vehicles < 1 then
        outputChatBox(" Na stanowisku monta?u nie ma ?adnego pojazdu.", el,255, 0, 0)
        return
    end
    if #vehicles > 1 then
        outputChatBox(" Na stanowisku monta?u jest zbyt du?o pojazd?w.", el,255, 0, 0)
        return
    end
    if getElementHealth(vehicles[1]) < 969 then
        outputChatBox(" Pojazd jest zbyt bardzo uszkodzony.", el, 255, 0, 0)
        return
    end
    if niewspiera_tuningu[getElementModel(vehicles[1])] then outputChatBox("* Tego pojazdu nie mo?esz tuningowa?!",el) return end
    triggerClientEvent(el,"pokazPanelTuningu", el , vehicles[1])
end)
end 


[ Dodano: 2017-05-24, 18:29 ]
prosze.

Komentarz Emm dodany 2017-05-24, 18:32Stosuj znaczniki lua/code
Ostatnio zmieniony przez Emm 2017-05-24, 18:31, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:30


DylemaT929

Nikt






Wiek: 28
Na forum: 4182 dni
Posty: 340
Nick w MP: dylemat929

Piwa: 3195

Respekt: 165,8
Respekt: 165,8Respekt: 165,8

a w??czy?e? skrypt o nazwie og-monta? co? takiego ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:31


BH|LeFeS

DayZ is EPIC!






Wiek: 21
Na forum: 3649 dni
Posty: 82
Nick w MP: LeFeS

Piwa: 7

Respekt: 26,3

nie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:32


Emm

***** ***






Wiek: 32
Na forum: 4021 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6171

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
No to w??cz. :P

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:32


BH|LeFeS

DayZ is EPIC!






Wiek: 21
Na forum: 3649 dni
Posty: 82
Nick w MP: LeFeS

Piwa: 7

Respekt: 26,3

Dobra Dzi?ki, ju? dzia?a :) Dzi?ki Za pomoc, Dylema i Emm

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-24, 18:32


DylemaT929

Nikt






Wiek: 28
Na forum: 4182 dni
Posty: 340
Nick w MP: dylemat929

Piwa: 3195

Respekt: 165,8
Respekt: 165,8Respekt: 165,8

"BH|LeFeS" napisał/a:

nie.


to w??cz go, bo to sprawia ?e nie mo?esz nic zamontowa? :)

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: wiem :: oco :: chodzi :: tuner :: miejsc. :: nie :: działa.
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 wiem oco chodzi - TUNER ! 6 miejsc. Nie Działa. 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