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: 28
Na forum: 4247 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ś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

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
Truck soon...
Postaw piwo autorowi tego posta
 

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


Ivanpojara







Wiek: 28
Na forum: 4247 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ś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

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
Truck soon...
Postaw piwo autorowi tego posta
 

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


Ivanpojara







Wiek: 28
Na forum: 4247 dni
Posty: 21

Piwa: 1

Respekt: 50


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

        GUIEditor.button[1] = guiCreateButton(253711558"MK-1 Przy?pieszenie"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[2] = guiCreateButton(1403711358"MK-1 Pr?dko??"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[3] = guiCreateButton(2613822057"Demont"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[4] = guiCreateButton(2510311551"MK-2 Przy?pieszenie"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[5] = guiCreateButton(13810311551"MK-2 Pr?dko??"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[6] = guiCreateButton(26010322151"Demont"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[7] = guiCreateButton(2516111550"MK-3 Przy?pieszenie"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[8] = guiCreateButton(14116011251"MK-3 Pr?dko??"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[9] = guiCreateButton(26116222049"Demont"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[10] = guiCreateButton(6236938381"Zamknij okno"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[10], "NormalTextColour""FFAAAAAA")    
    end
)


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

marker createMarker(2482.35718, -1658.4516613.33557'cylinder'2.02551700150)

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



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

addEventHandler "onClientGUIClick"rootmk1)


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

addEventHandler "onClientGUIClick"rootmk2)

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

addEventHandler "onClientGUIClick"rootmk3)


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

addEventHandler "onClientGUIClick"rootmk4)


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

addEventHandler "onClientGUIClick"rootmk5)


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



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


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

addEventHandler "onClientGUIClick"rootzamykamy) 

[size=9][ [i][b]Dodano[/b]: 2018-05-1716:49[/i] ][/size]
local screenWscreenH guiGetScreenSize()
local marker=createMarker(-1753.99,962.57,23.95"cylinder"2255,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.250.260.510.42"Odbieranie pojazd?w"true)
guiWindowSetSizable(wm.windowfalse)
guiWindowSetMovable(wm.windowfalse)
guiSetVisible(wm.windowfalse)
wm.gridlist=guiCreateGridList(0.040.090.920.65truewm.window)
guiGridListAddColumn(wm.gridlist"ID"0.2)
guiGridListAddColumn(wm.gridlist"Model"0.55)
guiGridListAddColumn(wm.gridlist"Zarejestrowany"0.2)
wm.submit=guiCreateButton(0.040.760.470.19"Wyjmij pojazd"truewm.window)
wm.close=guiCreateButton(0.570.750.390.20"Zamknij"truewm.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.gridlistrow1v["id"], falsefalse)
        guiGridListSetItemText(wm.gridlistrow2getVehicleNameFromModel(v["model"]), falsefalse)
        guiGridListSetItemText(wm.gridlistrow3v["registered"], falsefalse)
    end
end)

addEventHandler("onClientMarkerHit"marker, function(el,md)
    if el~=localPlayer then return end
    if isPedInVehicle(elthen return end
    if guiGetVisible(wm.window) == false then
        showCursor(true)
        guiSetVisible(wm.window,true)
        triggerServerEvent("onParkingGetRekords"localPlayer)
        --etCameraMatrix(-2056.26468.7738.49, -2048.08467.7335.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(localPlayerlocalPlayer)
        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.gridlistselectedRow1)
        local register=guiGridListGetItemText(wm.gridlistselectedRow3)
        if register == "NIE" then
        outputChatBox("*Zarejestruj pojazd w urz?dzie! Jego ID to "..id,255,0,0)
        return end
        guiGridListRemoveRow(wm.gridlistselectedRow)
        triggerServerEvent("onParkingVehicleSpawn"localPlayertonumber(id))
    end
end)


function render1()
dxDrawText(" Nie ma miejsca aby wyci?gn?? pojazd"screenW 0.3656screenH 0.1553screenW 0.6273screenH 0.3193tocolor(25500255), 1.50"pricedown""center""center"falsefalsefalsefalsefalse)
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ś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

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

Podpis
Truck soon...
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 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