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

Wysłany: 2018-05-17, 15:31


Ivanpojara







Wiek: 29
Na forum: 4388 dni
Posty: 21

Piwa: 1

Respekt: 50

Witam , jak podpia? skrypt np Premium , mk pod mysql ?

p.s Nie wysylajcie mi o tym dbconnect bo i tak tego nie rozumiem

prosz? tylko o napisanie gdzie co wpisa? (ogrpg)


za pomoc bronek

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-17, 15:34


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

"Ivanpojara" napisał/a:

Witam , jak podpia? skrypt np Premium , mk pod mysql ?


Opisz dok?adniej problem i daj kod :)

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-17, 15:40


Ivanpojara







Wiek: 29
Na forum: 4388 dni
Posty: 21

Piwa: 1

Respekt: 50

MK posiadam skrypt lecz nie zapisuje si? po wyjeciu z przechowalni . dok?adniej to o jaki kod chodzi skryptu ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-17, 16:37


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

"Ivanpojara" napisał/a:

MK posiadam skrypt lecz nie zapisuje si? po wyjeciu z przechowalni . dok?adniej to o jaki kod chodzi skryptu ?


Czy w samym skrypcie jest zapis i czy podczas chowania / wyci?gania r?wnie? jest zapis / odczyt? Je?eli b?dzie potrzeba wykonam i udost?pni? takowy skrypt. Na t? chwil? poka? kod z mk i przechowywalni pod stronie servera.

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-17, 16:48


Ivanpojara







Wiek: 29
Na forum: 4388 dni
Posty: 21

Piwa: 1

Respekt: 50


GUIEditor = {
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(339, 179, 499, 460, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 0.83)

        GUIEditor.button[1] = guiCreateButton(25, 37, 115, 58, "MK-1 Przy?pieszenie", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[2] = guiCreateButton(140, 37, 113, 58, "MK-1 Pr?dko??", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[3] = guiCreateButton(261, 38, 220, 57, "Demont", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[4] = guiCreateButton(25, 103, 115, 51, "MK-2 Przy?pieszenie", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[5] = guiCreateButton(138, 103, 115, 51, "MK-2 Pr?dko??", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[6] = guiCreateButton(260, 103, 221, 51, "Demont", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[7] = guiCreateButton(25, 161, 115, 50, "MK-3 Przy?pieszenie", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[8] = guiCreateButton(141, 160, 112, 51, "MK-3 Pr?dko??", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[9] = guiCreateButton(261, 162, 220, 49, "Demont", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFAAAAAA")
        GUIEditor.button[10] = guiCreateButton(62, 369, 383, 81, "Zamknij okno", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFAAAAAA")    
    end
)


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

marker = createMarker(2482.35718, -1658.45166, 13.33557, 'cylinder', 2.0, 255, 170, 0, 150)

function hit()
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
end
addEventHandler("onClientMarkerHit", marker, hit)



function mk1()
if source ~= GUIEditor.button[1] then return end
    triggerServerEvent("ZmienHandling", localPlayer)--MK1 przy?pieszenie
end

addEventHandler ( "onClientGUIClick", root, mk1)


function mk2()
if source ~= GUIEditor.button[2] then return end
    triggerServerEvent("ZmienHandling2", localPlayer)--MK1 predko?c
end

addEventHandler ( "onClientGUIClick", root, mk2)

function mk3()
if source ~= GUIEditor.button[4] then return end
    triggerServerEvent("ZmienHandling4", localPlayer)--MK2 przy?pieszenie
end

addEventHandler ( "onClientGUIClick", root, mk3)


function mk4()
if source ~= GUIEditor.button[5] then return end
    triggerServerEvent("ZmienHandling5", localPlayer)--MK2 pr?dko??
end

addEventHandler ( "onClientGUIClick", root, mk4)


function mk5()
if source ~= GUIEditor.button[7] then return end
    triggerServerEvent("ZmienHandling12", localPlayer)--MK3 przy?pieszenie
end

addEventHandler ( "onClientGUIClick", root, mk5)


function mk6()
if source ~= GUIEditor.button[8] then return end
    triggerServerEvent("ZmienHandling11", localPlayer)--MK3 pr?dko??
end
addEventHandler ( "onClientGUIClick", root, mk6)



function zamknij()
if source ~= GUIEditor.button[10] then return end
   guiSetVisible(GUIEditor.window[1], localPlayer)--MK3 pr?dko??
end
addEventHandler ( "onClientGUIClick", root, zamknij)


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

addEventHandler ( "onClientGUIClick", root, zamykamy) 

[size=9][ [i][b]Dodano[/b]: 2018-05-17, 16:49[/i] ][/size]
local screenW, screenH = guiGetScreenSize()
local marker=createMarker(-1753.99,962.57,23.95, "cylinder", 2, 255,255,255,50)
local sphere=createColSphere(-1743.54,955.78,24.48,5)

local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Odbi?r pojazd?w")
setElementPosition(t,-1753.99,962.57,24.88)

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("onParkingGetVehicles", true)
addEventHandler("onParkingGetVehicles", 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("onParkingGetRekords", 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 vehicles=getElementsWithinColShape(sphere,"vehicle")
        if #vehicles > 0 then
            addEventHandler("onClientRender",root,render1)
            setTimer(renderstop1,4500,1)
            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("onParkingVehicleSpawn", localPlayer, tonumber(id))
    end
end)


function render1()
dxDrawText(" Nie ma miejsca aby wyci?gn?? pojazd", screenW * 0.3656, screenH * 0.1553, screenW * 0.6273, screenH * 0.3193, tocolor(255, 0, 0, 255), 1.50, "pricedown", "center", "center", false, false, false, false, false)
end

function renderstop1()
removeEventHandler("onClientRender",root,render1)
end


Komentarz Atroth dodany 2018-05-17, 17:11Stosuj znaczniki [lua][/lua].
Ostatnio zmieniony przez Atroth 2018-05-17, 17:11, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-17, 16:50


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

Dobra. Jak wida? jest triggerowanie wi?c daj po stronie clienta i kod dawaj w znacznikach [lua] [/ lua]

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Tagi: podpinanie :: pod :: mysql
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Podpinanie pod mysql 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