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

Wysłany: 2019-03-08, 19:48


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

witam mam problem z panelem poniewa? gdy matuj? mk 1 wszystko ?adnie dzia?a lecz gdy zam?tuj? mk2 to montuj? mi mk 1 i mk2

C

local guis false

local screenWscreenH guiGetScreenSize()

    function gui()
        dxDrawText("Panel M?towanie MK"screenW 0.4380screenH 0.2593, (screenW 0.4380) + 332, ( screenH 0.2593) + 52tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawRectangle(screenW 0.4323screenH 0.3074347473tocolor(372199155), false)
        dxDrawRectangle(screenW 0.4688screenH 0.351919983tocolor(102160254), false)
        dxDrawRectangle(screenW 0.4688screenH 0.4787screenW 0.1036screenH 0.0769tocolor(102160254), false)
        dxDrawRectangle(screenW 0.4688screenH 0.6056screenW 0.1036screenH 0.0769tocolor(102160254), false)
        dxDrawText("Zam?tuj MK 1 - X $"screenW 0.4714screenH 0.3556screenW 0.5724screenH 0.4287tocolor(255255255255), 1.00"default""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Zam?tuj MK 2 - X $"screenW 0.4698screenH 0.4824screenW 0.5703screenH 0.5519tocolor(255255255255), 1.00"default""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Zam?tuj MK 3 - X $"screenW 0.4703screenH 0.6120screenW 0.5703screenH 0.6778tocolor(255255255255), 1.00"default""center""center"falsefalsefalsefalsefalse)
        dxDrawRectangle(screenW 0.5036screenH 0.7093screenW 0.0333screenH 0.0361tocolor(102199155), false)
        dxDrawText("X"screenW 0.5047screenH 0.7139screenW 0.5349screenH 0.7407tocolor(255255255255), 1.00"default""center""center"falsefalsefalsefalsefalse)
    end

function myszxywidthheight )
    if ( not isCursorShowing( ) ) then
        return false
    end
    local sxsy guiGetScreenSize ( )
    local cxcy getCursorPosition ( )
    local cxcy = ( cx sx ), ( cy sy )
    if ( cx >= and cx <= width ) and ( cy >= and cy <= height then
        return true
    else
        return false
    end
end

marker createMarker( -1902.83909.3535.02-0.9'cylinder'45515512585)


addEventHandler("onClientMarkerHit"marker, function(plr)
local pojazd getPedOccupiedVehicle(plr)
if not pojazd then return end
if plr ~= localPlayer then return end
if guis == true then
        guis false
        showCursor(false)
        removeEventHandler("onClientPreRender"rootgui)
    else
        guis true
        showCursor(true)
        addEventHandler("onClientPreRender"rootgui)
    end
end)


function mk1(buttonstate)
            if guis and button == "left" and state == "down" then
                if mysz(screenW 0.4714screenH 0.3556screenW 0.5724screenH 0.4287then
                triggerServerEvent("mk1xd"localPlayer)
                 end
            end
        end
    addEventHandler("onClientClick"rootmk1)

function mk2(buttonstate)
            if guis and button == "left" and state == "down" then
                if mysz(screenW 0.4698screenH 0.4824screenW 0.5703screenH 0.5519then
                triggerServerEvent("mk2xdd"localPlayer)
                 end
            end
        end
        addEventHandler("onClientClick"rootmk2)

function mk3(buttonstate)
            if guis and button == "left" and state == "down" then
                if mysz(screenW 0.4703screenH 0.6120screenW 0.5703screenH 0.6778then
                triggerServerEvent("mk3xddd"localPlayer)
                 end
            end
        end
        addEventHandler("onClientClick"rootmk3)

        function close(buttonstate)
            if guis and button == "left" and state == "down" then
                if mysz(screenW 0.5047screenH 0.7139screenW 0.5349screenH 0.7407then
                guis false
                showCursor(false)
                removeEventHandler("onClientPreRender"rootgui)
                 end
            end
        end
        addEventHandler("onClientClick"rootclose)


S

cmk1 1
cmk2 2
cmk3 3

local t=createElement("text")
setElementData(t"name""Monta? Neon?w.")
setElementPosition(t, -1902.83909.3535.02)

local licz = {}
addEvent("mk1xd"true)
addEventHandler("mk1xd"root, function(plr)
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(cmk1)) then
    setElementData(pojazd"mk1"1)
    setElementData(pojazd"vehicle:upgrades", {turbo=trueals=true})
    takePlayerMoneysourcecmk1 )
    outputChatBox("* Pomy?lnie zamontowano MK1. Oddaj pojazd do przecho by by?o wida? efekt dzia?ania"source,true)
    else
     outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)

addEvent("mk2xdd"true)
addEventHandler("mk2xdd"root, function(plr)
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(cmk2)) then
    setElementData(pojazd"mk2"1)
    setElementData(pojazd"vehicle:upgrades", {turbo=trueals=true})
    takePlayerMoneysourcecmk2 )
    outputChatBox("* Pomy?lnie zamontowano MK2. Oddaj pojazd do przecho by by?o wida? efekt dzia?ania"source,true)
    else
     outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)

addEvent("mk3xddd"true)
addEventHandler("mk3xddd"root, function(plr)
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(cmk3)) then
    setElementData(pojazd"mk3"1)
    setElementData(pojazd"vehicle:upgrades", {turbo=trueals=true})
    takePlayerMoneysourcecmk3 )
    outputChatBox("* Pomy?lnie zamontowano MK3. Oddaj pojazd do przecho by by?o wida? efekt dzia?ania"source,true)
    else
     outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)


Postaw piwo autorowi tego posta
 

 
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » mk Odpowiedz do tematu

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