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

Wysłany: 2018-03-03, 11:55


killercycDDS

Migacz






Wiek: 26
Na forum: 4653 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1667

Respekt: 22

Witam pr?buj? przerobi? panel z kupnem nitra i pj na panel neon?w lecz mam pewien b??d
[2018-03-03 11:51:32] ERROR: Client (#5c5600killer_cyc[DDS]) triggered serverside event neoncze, but event is not added serverside
[2018-03-03 11:51:24] kupnoneonow restarted successfully
[2018-03-03 11:51:24] ERROR: Loading script failed: [tuning]/kupnoneonow/neony_s.lua:24: 'end' expected (to close 'function' at line 14) near 'else'


Client

--[[
@author Mikael <mikael.mta@wp.pl>
Skrypt wykonany dla Your Story 2016
]]

GUIEditor = {
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(330, 200, 405, 460, "Panel Monta?u Neon?w.", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 0.83)

        GUIEditor.button[1] = guiCreateButton(23, 37, 115, 58, "Czerwone Neony\n Cena:xxx", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")

        GUIEditor.button[2] = guiCreateButton(145, 37, 115, 58, "Niebieskie Neony\n Cena:xxx", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")

        GUIEditor.button[3] = guiCreateButton(267, 37, 115, 58, "Zielone Neony\n Cena:xxx", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")

        GUIEditor.button[4] = guiCreateButton(23, 107, 115, 58, "Zolte Neony\n Cena:xxx", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")

        GUIEditor.button[5] = guiCreateButton(23, 168, 115, 58, "rozowe Neony\n Cena:xxx", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")

        GUIEditor.button[6] = guiCreateButton(267, 107, 115, 58, "biale Neony\n Cena:xxx", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA")
        
        GUIEditor.button[7] = guiCreateButton(11, 369, 383, 81, "Zamknij okno", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")    
    end
)


addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)

marker = createMarker(2522.18, -1519.47, 23.94-0.9, 'cylinder', 4, 179, 255, 0, 85)

function hit(plr,md)
if plr ~= localPlayer then return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
end
addEventHandler("onClientMarkerHit", marker, hit)



function neoncze()
if source ~= GUIEditor.button[1] then return end
    triggerServerEvent("neoncze", localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end
addEventHandler ( "onClientGUIClick", root, neoncze)

function zamknij()
if source ~= GUIEditor.button[9] then return end
   guiSetVisible(GUIEditor.window[1], localPlayer)
end
addEventHandler ( "onClientGUIClick", root, zamknij)


function zamykamy()
if source ~= GUIEditor.button[9] then return end
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end

addEventHandler ( "onClientGUIClick", root, zamykamy)


Server


--[[
@author Mikael <mikael.mta@wp.pl>
Skrypt wykonany dla New World 2016
]]

cenaneoncz = 45000

local licz = {}
local t=createElement('text')
setElementData(t,'name','Monta?\n Neon?w.')
setElementPosition(t,2522.18, -1519.47, 23.94)

addEvent("neoncze", true)
addEventHandler("neoncze", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(cenaneoncz)) then
        outputChatBox("Nie jeste? w poje?dzie!", source, 255, 255, 255)
        return
    end
    exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET neon=1 WHERE id=? AND ownedPlayer=?", getElementData(getPedOccupiedVehicle(source), pojazd, "vehicle:id"), getElementData(source, "player:uid"))
    setElementData(getPedOccupiedVehicle(source), pojazd, "neony", 1)
    outputChatBox("* Pomy?lnie zamontowano czerwone neony.", source,true)
    else
    outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)


[ Dodano: 2018-03-03, 13:42 ]
poradzi?em sobie do zamkni?cia

Postaw piwo autorowi tego posta
 

 
Tagi: panel :: neonów
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