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

Wysłany: 2021-01-23, 19:46


NekeYT







Wiek: 23
Na forum: 2528 dni
Posty: 58
Nick w MP: Cytrus

Piwa: 6

Respekt: 50

tak jak w temacie mam jasn? po?wiat?
zdj

kod:

local screenWscreenH guiGetScreenSize()
local marker=createMarker(1570.51, -1392.7214.02-1"cylinder"1.35255,255,255,0)
        setElementData(marker"markery3"true)
local sphere=createColSphere(1560.52, -1392.6814.02-15)

local wm={} 
wm.gridlist=guiCreateGridList(0.340.390.3330.24true)
guiGridListAddColumn(wm.gridlist"ID Pojazdu"0.3)
guiGridListAddColumn(wm.gridlist"Model"0.3guiGridListAddColumn(wm.gridlist"Kierowca"0.3)
guiSetVisible(wm.gridlistfalse)

panel false

function PrzechoGUI()
local AlphaAlpha2 interpolateBetween(0002551800, ((getTickCount() - czas) / 2500), "Linear"local r2,g2,b2=interpolateBetween(255,255,255,20,250,0,(getTickCount()-czas)/1100,"SineCurve")
local r,g,b=interpolateBetween(255,255,255,255,0,0,(getTickCount()-czas)/1100,"SineCurve"dxDrawImage(screenW 0.3016screenH 0.2786screenW 0.4092screenH 0.4805"okn.png"000tocolor(255255255255), false)
if not cursorPosition(screenW 0.3367screenH 0.6406screenW 0.1054screenH 0.0469then --Wyjmij
dxDrawImage(screenW 0.3053screenH 0.5768screenW 0.1794screenH 0.1693"przycisk.png"000tocolor(255255255255), false)
dxDrawText("Wyjmij pojazd", (screenW 0.3382) + 1, (screenH 0.6419) + 1, (screenW 0.4422) + 1, (screenH 0.6875) + 1tocolor(255255255Alpha), 1.0"normalFont""center""center"falsefalsefalsefalsefalse)
  
else 
dxDrawImage(screenW 0.3053screenH 0.5768screenW 0.1794screenH 0.1693"przycisk.png"000tocolor(255,255,255255), false)
dxDrawText("Wyjmij pojazd", (screenW 0.3382) + 1, (screenH 0.6419) + 1, (screenW 0.4422) + 1, (screenH 0.6875) + 1tocolor(180180180255), 1.00"normalFont""center""center"falsefalsefalsefalsefalse)
  
end 

if not cursorPosition(screenW 0.5688screenH 0.6432screenW 0.1054screenH 0.0469then --Wyjmij
dxDrawImage(screenW 0.5351screenH 0.5768screenW 0.1794screenH 0.1693"przycisk.png"000tocolor(255255255255), false)
dxDrawText("Zamknij okno", (screenW 0.5688) + 1, (screenH 0.6432) + 1, (screenW 0.6728) + 1, (screenH 0.6888) + 1tocolor(255255255Alpha), 1.00"normalFont""center""center"falsefalsefalsefalsefalse)
else 
dxDrawImage(screenW 0.5351screenH 0.5768screenW 0.1794screenH 0.1693"przycisk.png"000tocolor(255,255,255255), false)
dxDrawText("Zamknij okno", (screenW 0.5688) + 1, (screenH 0.6432) + 1, (screenW 0.6728) + 1, (screenH 0.6888) + 1tocolor(180180180255), 1.00"normalFont""center""center"falsefalsefalsefalsefalse)
end 

dxDrawText("Przechowalnia Pojazd?w!", (screenW 0.3375) + 1, (screenH 0.3503) + 1, (screenW 0.6728) + 1, (screenH 0.3893) + 1tocolor(000Alpha), 1.50"normalFont""center""center"falsefalsefalsefalsefalse)
dxDrawText("Przechowalnia Pojazd?w!"screenW 0.3375screenH 0.3503screenW 0.6728screenH 0.3893tocolor(255,255,255Alpha), 1.50"normalFont""center""center"falsefalsefalsefalsefalse)
       
end

addEvent("onParkingGetVehicles"true)
addEventHandler("onParkingGetVehicles"root, function(result)
    guiGridListClear(wm.gridlist)
    if not result then return end
    for i,v in pairs(result) do
        local row=guiGridListAddRow(wm.gridlist)
        guiGridListSetItemText(wm.gridlistrow1v["id"], falsefalse)
        guiGridListSetItemText(wm.gridlistrow2getVehicleNameFromModel(v["model"]), falsefalse)
        guiGridListSetItemText(wm.gridlistrow3v["driver"]:gsub("#%x%x%x%x%x%x",""), falsefalse)
    end
end)

addEventHandler("onClientMarkerHit"marker, function(el,md)
    if el~=localPlayer then return end
    if isPedInVehicle(elthen return end
    if guiGetVisible(wm.gridlist) == false then
                if panel == false then
                  addEventHandler("onClientRender",root,PrzechoGUI)
                  czas getTickCount()
        panel true
        showCursor(true)
        guiSetVisible(wm.gridlist,true)
        triggerServerEvent("onParkingGetRekords"localPlayer)
        --etCameraMatrix(-2056.26468.7738.49, -2048.08467.7335.17)
    end
       end
end)

function Przechowyjmij(buttonstate)
if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.3367screenH 0.6406screenW 0.1054screenH 0.0469then
        local selectedRow=guiGridListGetSelectedItem(wm.gridlist) or -1
        if selectedRow 0 then return end
                        local vehicles=getElementsWithinColShape(sphere,"vehicle")
        if #vehicles > 0 then
                                                 outputChatBox("* Nie ma miejsca aby wyciagnac pojazd!"25500)
            return
        end
        local id=guiGridListGetItemText(wm.gridlistselectedRow1)
        guiGridListRemoveRow(wm.gridlistselectedRow)
        triggerServerEvent("onParkingVehicleSpawn"localPlayertonumber(id))
    end
   end
end
addEventHandler("onClientClick"getRootElement(), Przechowyjmij)

function Zamknij(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.5688screenH 0.6432screenW 0.1054screenH 0.0469then
                panel false 
                removeEventHandler ("onClientRender"rootPrzechoGUI)
                showCursor(false)
                guiSetVisible(wm.gridlistfalse)
         end
    end
end
addEventHandler("onClientClick"getRootElement(), Zamknij)

function cursorPosition(xywh)
    if (not isCursorShowing()) then
        return false
    end
    local mxmy getCursorPosition()
    local fullxfully guiGetScreenSize()
    cursorxcursory mx*fullxmy*fully
    if cursorx and cursorx and cursory and cursory h then
        return true
    else
        return false
    end
end

function filedelet ()
if fileExists("c_parking.lua"then
   fileDelete("c_parking.lua")
 end
end
addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()), filedelet)
addEventHandler("onClientPlayerQuit"getRootElement(), filedelet)
addEventHandler("onClientPlayerJoin"getRootElement(), filedelet)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-23, 21:58


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

Wydaje mi si?, ?e to mo?e by? wina grafiki, na pewno tej po?wiaty nie masz w grafice?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-24, 00:11


NekeYT







Wiek: 23
Na forum: 2528 dni
Posty: 58
Nick w MP: Cytrus

Piwa: 6

Respekt: 50

"satan_" napisał/a:

Wydaje mi si?, ?e to mo?e by? wina grafiki, na pewno tej po?wiaty nie masz w grafice?

w grafice nie ma

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-24, 00:58


dioR







Wiek: 21
Na forum: 2047 dni
Posty: 18
Nick w MP: dioR

Piwa: 753

Respekt: 50

usun to z kodu
--etCameraMatrix(-2056.26, 468.77, 38.49, -2048.08, 467.73, 35.17)
i sprawdz

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-24, 01:01


MrVip615

witam






Wiek: 22
Na forum: 4307 dni
Posty: 167
Nick w MP: ramzes

Piwa: 207

Respekt: 85,3

"dioR" napisał/a:

usun to z kodu
--etCameraMatrix(-2056.26, 468.77, 38.49, -2048.08, 467.73, 35.17)
i sprawdz


Co to ma zmienic? To jest w komentarzu i do tego funkcja setCameraMatrix nie ma nic wspolnego z tym, co chce osiagnac autor.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-24, 07:49


Mikołajj







Wiek: 22
Na forum: 2885 dni
Posty: 303
Nick w MP: Mikołaj

Piwa: 132

Respekt: 91

Stw?rz texture tych obrazk?w i ustaw w niej parametry 'argb', true i edge na 'clamp'

Postaw piwo autorowi tego posta
 

 
Tagi: poświata :: gui
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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