Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- towar = guiCreateWindow(689,372,152,195,"Towary",false)
- guiWindowSetMovable(towar,false)
- guiWindowSetSizable(towar,false)
- sprzet = guiCreateButton(9,19,134,19,"Sprzęt elektroniczny",false,towar)
- spozywcze = guiCreateButton(9,41,134,19,"Spożywcze",false,towar)
- zywe = guiCreateButton(9,63,134,19,"Żywe",false,towar)
- metal = guiCreateButton(9,86,134,19,"Metale",false,towar)
- budowa = guiCreateButton(9,109,134,19,"Materiały budowlane",false,towar)
- drewno = guiCreateButton(9,132,134,19,"Drewniane",false,towar)
- anuluj = guiCreateButton(36,172,81,15,"Anuluj",false,towar)
- loaduj = guiCreateWindow(689,372,302,83,"Załaduj/rozładuj",false)
- guiWindowSetMovable(loaduj,false)
- guiWindowSetSizable(loaduj,false)
- zaladuj = guiCreateButton(9,20,137,34,"Załaduj",false,loaduj)
- rozladuj = guiCreateButton(155,20,137,34,"Rozładuj",false,loaduj)
- zamknij = guiCreateButton(114,57,72,18,"Zamknij",false,loaduj)
- guiSetVisible(towar, false)
- guiSetVisible(loaduj, false)
- function laduj(button, state, absoluteX, absoluteY)
- local towarData = getElementData(source, "towar")
- if (source == zaladuj) then
- if (towarData == "0") then
- guiSetVisible(loaduj, false)
- guiSetVisible(towar, true)
- else
- outputChatBox("Aby to zrobic musisz zaladowac towar", player)
- end
- end
- if (source == rozladuj) then
- if (towarData == "1") then
- guiSetVisible(oknoLadujTrwa, false)
- guiSetVisible(loaduj, true)
- local progress = guiProgressBarGetProgress(trwa)
- guiProgressBarSetProgress(trwa, 0)
- triggerEvent("rozladuj", player)
- else
- outputChatBox("Aby to zrobic musisz zaladowac towar", player)
- end
- end
- if (source == zamknij) then
- guiSetVisible(loaduj, false)
- showCursor(false)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), laduj)
Add Comment
Please, Sign In to add comment