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

Wysłany: 2018-08-15, 18:37


czlowiekjaja







Wiek: 20
Na forum: 2991 dni
Posty: 76
Nick w MP: czlowiekjaja

Piwa: 324

Respekt: 50

server:

addEvent("ZmienHandling2", true)
addEventHandler("ZmienHandling2", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
        takePlayerMoney ( source, 1500)
        outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)
        
setVehicleHandling(pojazd, "maxVelocity", 200.0 )--MK1 Pr?dko??
setVehicleHandling(pojazd, "maxVelocity", velocity)
end
)


addEvent("ZmienHandling", true)
addEventHandler("ZmienHandling", root, function()
pojazd = getPedOccupiedVehicle(source)--MK 1 Przy?pieszenie
if not pojazd then return end
        takePlayerMoney ( source, 3000 )
                outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)
        
local acceleration = 15.0
setVehicleHandling(pojazd, "engineAcceleration", acceleration )
end
)


addEvent("ZmienHandling5", true)
addEventHandler("ZmienHandling5", root, function()--MK2 Pr?dko??
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
                takePlayerMoney ( source, 10000 )
                outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)
        
setVehicleHandling(pojazd, "maxVelocity", 250.0 )
setVehicleHandling(pojazd, "maxVelocity", velocity)
end
)

addEvent("ZmienHandling4", true)
addEventHandler("ZmienHandling4", root, function()--MK2 Przy?pieszenie
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
                takePlayerMoney ( source, 15000 )
                outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)
        
local acceleration = 19.0
setVehicleHandling(pojazd, "engineAcceleration", acceleration )
end
)


addEvent("ZmienHandling5", true)
addEventHandler("ZmienHandling5", root, function()--MK2 Pr?dko??
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
                takePlayerMoney ( source, 20000 )
                outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)
local acceleration = 30.0
setVehicleHandling(pojazd, "engineAcceleration", acceleration )
end
)

addEvent("ZmienHandling11", true)
addEventHandler("ZmienHandling11", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
                takePlayerMoney ( source, 22000 )
                outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)
setVehicleHandling(pojazd, "maxVelocity", 5000.0 )-- MK3 Pr?dko??
setVehicleHandling(pojazd, "maxVelocity", velocity)
end
)


addEvent("ZmienHandling12", true)
addEventHandler("ZmienHandling12", root, function()--MK3 Przy?pieszenie
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
                takePlayerMoney ( source, 25000 )
                outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)
local acceleration = 30.0
setVehicleHandling(pojazd, "engineAcceleration", acceleration )
end
)



client:


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(1950.08020, -1589.18799, 12`.56780, '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)


Komentarz Atroth dodany 2018-08-15, 18:46Stosuj znaczniki [lua][/lua]
Ostatnio zmieniony przez Atroth 2018-08-15, 18:47, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-15, 18:49


Atroth







Wiek: 24
Na forum: 3818 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4813

Respekt: 540
Respekt: 540



--zmie?:
marker = createMarker(1950.08020, -1589.18799, 12.56780, 'cylinder', 2.0, 255, 170, 0, 150)

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")   
 guiSetVisible(GUIEditor.window[1],false)
end)


To jest zb?dne:


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


Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-17, 19:45


czlowiekjaja







Wiek: 20
Na forum: 2991 dni
Posty: 76
Nick w MP: czlowiekjaja

Piwa: 324

Respekt: 50

dzia?a dzieki

Postaw piwo autorowi tego posta
 

 
Tagi: gui :: wyskakuje :: wszystkim
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