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

Wysłany: 2018-07-01, 09:59


guciopl5







Wiek: 23
Na forum: 3146 dni
Posty: 86
Nick w MP: Whit3

Piwa: 8

Respekt: 45,3

witajcie mam problem bo zrobi?em gui dzia?ajace i doda?em butony no i one s? w innej pozycji ni? ca?e gui ca?y panel .. i chcia?bym aby kto? pom?g? mi to zrobi? poprawnie tutaj udost?pniam kod i ss

kod
 local marker createMarker 1034.4647216797,-1338.8609619141,13.7265625-"cylinder" 0.8,255,255,0)


Panel guiCreateWindow(600300336207"Automat z napojami"falseguiWindowSetSizable(PanelfalseAddKamizelka guiCreateButton(93113767"Cola + 5 HP "falseAddUSPs guiCreateButton(2073611962"Lipton + 7 HP"falseAddM4A1S guiCreateButton(912113776"Mountain Dew + 10 HP "falseAddAK47 guiCreateButton(20311612381"Red Bull + 12 HP"falseguiSetVisible(Panelfalse)
guiSetVisible(Panelfalse)
guiSetVisible(AddKamizelkafalse)
guiSetVisible(AddUSPsfalse)
guiSetVisible(AddM4A1S,false)
guiSetVisible(AddAK47,false)

addEventHandler("onClientGUIClick",root,function ()
   if source == AddKamizelka  then 
     setElementHealth localPlayergetElementHealth(localPlayer) + ) 
     triggerServerEvent ("Cash"localPlayer"take"3)
outputChatBox (" Z maszyny wylatuje puszka napoju * Cola *")
outputChatBox (" Wypi?e? * Cola * zap?aci?e? 3$")
   elseif source == AddUSPs then 
    setElementHealth localPlayergetElementHealth(localPlayer) + ) 
     triggerServerEvent ("Cash"localPlayer"take"5)
outputChatBox (" Z maszyny wylatuje puszka napoju * Lipton *")
outputChatBox (" Wypi?e? * Lipton * zap?aci?e? 5$")
    elseif source ==  AddM4A1S  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 10 ) 
     triggerServerEvent ("Cash"localPlayer"take"6)
outputChatBox (" Z maszyny wylatuje puszka  * Mountain Dew *")
outputChatBox (" Wypi?e? * Mountain Dew * zap?aci?e? 6$")
    elseif source ==  AddAK47  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 12 ) 
     triggerServerEvent ("Cash"localPlayer"take"8)
outputChatBox (" Z maszyny wylatuje puszka z * Red Bull *")
outputChatBox (" Wypi?e? * Red Bull * zap?aci?e? 8$")

  end
end)

function Open_panel (el) 
if el~=localPlayer then return end
    guiSetVisible(Paneltrue)
guiSetVisible(AddKamizelkatrue)
guiSetVisible(AddUSPstrue)
guiSetVisible(AddM4A1S,true)
guiSetVisible(AddAK47,true)
showCursor(true,false)
end 
addEventHandler ("onClientMarkerHit"markerOpen_panel) 

function Close_panel(el) 
if el~=localPlayer then return end
    guiSetVisible(Panelfalse)
guiSetVisible(AddKamizelkafalse)
guiSetVisible(AddUSPsfalse)
guiSetVisible(AddM4A1S,false)
guiSetVisible(AddAK47,false)
    showCursor (false,falseend 
addEventHandler ("onClientMarkerLeave",markerClose_panel



i ss https://imgur.com/a/xLZXOsA

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-01, 11:33


santex







Wiek: 30
Na forum: 2987 dni
Posty: 21
Nick w MP: santex

Piwa: 186

Respekt: 50


 local sx,sy guiGetScreenSize()

local baseX 1920
local zoom 1.0
local minZoom if sx baseX then 
    zoom math.min(minZoombaseX/sx)
end

local x,y,=  1034.4647216797,-1338.8609619141,13.7265625
local marker createMarker(xyz-1"cylinder" 0.8,255,255,0)
local panel_xpanel_y_panel_wpanel_h 746/zoom372/zoom429/zoom238/zoom
local addKamizelka_xaddKamizelka_yaddKamizelka_waddKamizelka_h 9/zoom31/zoom155/zoom63/zoom
local addUSPs_xaddUSPs_yaddUSPs_waddUSPs_h 261/zoom31/zoom155/zoom63/zoom
local addM4A1S_xaddM4A1S_yaddM4A1S_waddM4A1S_h 9/zoom150/zoom155/zoom63/zoom
local AddAK47_xAddAK47_yAddAK47_wAddAK47_h 261/zoom150/zoom155/zoom63/zoom

panel guiCreateWindow(panel_xpanel_y_panel_wpanel_h"Automat z napojami"false)
addKamizelka guiCreateButton(addKamizelka_xaddKamizelka_yaddKamizelka_waddKamizelka_h"Cola + 5 HP"falsepanel)
addUSPs guiCreateButton(addUSPs_xaddUSPs_yaddUSPs_waddUSPs_h"Lipton + 7 HP"falsepanel)
addM4A1S guiCreateButton(addM4A1S_xaddM4A1S_yaddM4A1S_waddM4A1S_h"Mountain Dew + 10 HP"falsepanel)
addAK47 guiCreateButton(AddAK47_xAddAK47_yAddAK47_wAddAK47_h"Red Bull + 12 HP"falsepanel)  
guiSetVisible(panelfalse)
guiSetVisible(addKamizelkafalse)
guiSetVisible(addUSPsfalse)
guiSetVisible(addM4A1S,false)
guiSetVisible(addAK47,false)

addEventHandler("onClientGUIClick",root,function ()
    if source == addKamizelka then 
    setElementHealth localPlayergetElementHealth(localPlayer) + ) 
    triggerServerEvent ("Cash"localPlayer"take"3)
    outputChatBox (" Z maszyny wylatuje puszka napoju * Cola *")
    outputChatBox (" Wypi?e? * Cola * zap?aci?e? 3$")
   elseif source == addUSPs then 
    setElementHealth localPlayergetElementHealth(localPlayer) + ) 
    triggerServerEvent ("Cash"localPlayer"take"5)
    outputChatBox (" Z maszyny wylatuje puszka napoju * Lipton *")
    outputChatBox (" Wypi?e? * Lipton * zap?aci?e? 5$")
    elseif source ==  addM4A1S  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 10 ) 
    triggerServerEvent ("Cash"localPlayer"take"6)
    outputChatBox (" Z maszyny wylatuje puszka  * Mountain Dew *")
    outputChatBox (" Wypi?e? * Mountain Dew * zap?aci?e? 6$")
    elseif source ==  addAK47  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 12 ) 
    triggerServerEvent ("Cash"localPlayer"take"8)
    outputChatBox (" Z maszyny wylatuje puszka z * Red Bull *")
    outputChatBox (" Wypi?e? * Red Bull * zap?aci?e? 8$")
    end
end)

function Open_panel (el) 
    if el~=localPlayer then return end
    guiSetVisible(paneltrue)
    guiSetVisible(addKamizelkatrue)
    guiSetVisible(addUSPstrue)
    guiSetVisible(addM4A1S,true)
    guiSetVisible(addAK47,true)
    showCursor(true,false)
end 
addEventHandler ("onClientMarkerHit"markerOpen_panel) 

function Close_panel(el) 
if el~=localPlayer then return end
    guiSetVisible(panelfalse)
    guiSetVisible(addKamizelkafalse)
    guiSetVisible(addUSPsfalse)
    guiSetVisible(addM4A1S,false)
    guiSetVisible(addAK47,false)
    showCursor (false,falseend 
addEventHandler ("onClientMarkerLeave",markerClose_panel


sprawdz.

Podpis

:-)

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
guciopl5
Wysłany: 2018-07-01, 12:00


guciopl5







Wiek: 23
Na forum: 3146 dni
Posty: 86
Nick w MP: Whit3

Piwa: 8

Respekt: 45,3

dzi?ki ,, dzia?? a jeszcze chcia? bym zrobic takie co? bo teraz jak gracz nie ma np 5$ to daje mu -5$ a chce aby pokazywa?o ?e nie masz pieniedzy jak zrobi? takie sprawdzenie ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-01, 12:04


santex







Wiek: 30
Na forum: 2987 dni
Posty: 21
Nick w MP: santex

Piwa: 186

Respekt: 50



local money getPlayerMoney(localPlayer)
if money >= 5 then
-- informacja ze kupi?e?
else
outputChatBox("nie posiadasz funduszy")
end


Podpis

:-)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-01, 12:49


guciopl5







Wiek: 23
Na forum: 3146 dni
Posty: 86
Nick w MP: Whit3

Piwa: 8

Respekt: 45,3

nie dzia?a poka?esz gdzie mam to wkleic bo robie tak jak pokaza?e? i mam errory w DB3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-01, 12:50


santex







Wiek: 30
Na forum: 2987 dni
Posty: 21
Nick w MP: santex

Piwa: 186

Respekt: 50

poka? kod i b??dy z DB3

Podpis

:-)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-01, 13:04


guciopl5







Wiek: 23
Na forum: 3146 dni
Posty: 86
Nick w MP: Whit3

Piwa: 8

Respekt: 45,3

 local sx,sy guiGetScreenSize()

local baseX 1920
local zoom 1.0
local minZoom if sx baseX then 
    zoom math.min(minZoombaseX/sx)
end

local x,y,=  1034.4647216797,-1338.8609619141,13.7265625
local marker createMarker(xyz-1"cylinder" 0.8,255,255,0)
local panel_xpanel_y_panel_wpanel_h 746/zoom372/zoom429/zoom238/zoom
local addKamizelka_xaddKamizelka_yaddKamizelka_waddKamizelka_h 9/zoom31/zoom155/zoom63/zoom
local addUSPs_xaddUSPs_yaddUSPs_waddUSPs_h 261/zoom31/zoom155/zoom63/zoom
local addM4A1S_xaddM4A1S_yaddM4A1S_waddM4A1S_h 9/zoom150/zoom155/zoom63/zoom
local AddAK47_xAddAK47_yAddAK47_wAddAK47_h 261/zoom150/zoom155/zoom63/zoom

panel guiCreateWindow(panel_xpanel_y_panel_wpanel_h"Automat z napojami"false)
addKamizelka guiCreateButton(addKamizelka_xaddKamizelka_yaddKamizelka_waddKamizelka_h"Cola + 5 HP"falsepanel)
addUSPs guiCreateButton(addUSPs_xaddUSPs_yaddUSPs_waddUSPs_h"Lipton + 7 HP"falsepanel)
addM4A1S guiCreateButton(addM4A1S_xaddM4A1S_yaddM4A1S_waddM4A1S_h"Mountain Dew + 10 HP"falsepanel)
addAK47 guiCreateButton(AddAK47_xAddAK47_yAddAK47_wAddAK47_h"Red Bull + 12 HP"falsepanel)  
guiSetVisible(panelfalse)
guiSetVisible(addKamizelkafalse)
guiSetVisible(addUSPsfalse)
guiSetVisible(addM4A1S,false)
guiSetVisible(addAK47,false)

addEventHandler("onClientGUIClick",root,function ()
    if source == addKamizelka then 
    setElementHealth localPlayergetElementHealth(localPlayer) + ) 
    local money takePlayerMoney(localPlayer)
    if money >= 3 then
    outputChatBox (" Z maszyny wylatuje puszka napoju * Cola *")
    outputChatBox (" Wypi?e? * Cola * zap?aci?e? 3$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
   elseif source == addUSPs then  
    setElementHealth localPlayergetElementHealth(localPlayer) + )
    local money takePlayerMoney(localPlayer)
    if money >= 5 then
    outputChatBox (" Z maszyny wylatuje puszka napoju * Lipton *")
    outputChatBox (" Wypi?e? * Lipton * zap?aci?e? 5$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
    elseif source ==  addM4A1S  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 10 ) 
    local money takePlayerMoney(localPlayer)
    if money >= 6 then
    outputChatBox (" Z maszyny wylatuje puszka  * Mountain Dew *")
    outputChatBox (" Wypi?e? * Mountain Dew * zap?aci?e? 6$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
    elseif source ==  addAK47  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 12 ) 
    local money takePlayerMoney(localPlayer)
    if money >= 8 then
    outputChatBox (" Z maszyny wylatuje puszka z * Red Bull *")
    outputChatBox (" Wypi?e? * Red Bull * zap?aci?e? 8$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
    end
end)

function Open_panel (el) 
    if el~=localPlayer then return end
    guiSetVisible(paneltrue)
    guiSetVisible(addKamizelkatrue)
    guiSetVisible(addUSPstrue)
    guiSetVisible(addM4A1S,true)
    guiSetVisible(addAK47,true)
    showCursor(true,false)
end 
addEventHandler ("onClientMarkerHit"markerOpen_panel) 

function Close_panel(el) 
if el~=localPlayer then return end
    guiSetVisible(panelfalse)
    guiSetVisible(addKamizelkafalse)
    guiSetVisible(addUSPsfalse)
    guiSetVisible(addM4A1S,false)
    guiSetVisible(addAK47,false)
    showCursor (false,falseend 
addEventHandler ("onClientMarkerLeave",markerClose_panel



a wyskakuje to https://imgur.com/a/fakB4Az

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-01, 13:25


OchIAch







Wiek: 26
Na forum: 3114 dni
Posty: 144
Nick w MP: OchIAch

Piwa: 1311

Respekt: 105,3
Respekt: 105,3

Ostrzeżeń: 100%
 local sx,sy guiGetScreenSize()

local baseX 1920
local zoom 1.0
local minZoom if sx baseX then 
    zoom math.min(minZoombaseX/sx)
end

local x,y,=  1034.4647216797,-1338.8609619141,13.7265625
local marker createMarker(xyz-1"cylinder" 0.8,255,255,0)
local panel_xpanel_y_panel_wpanel_h 746/zoom372/zoom429/zoom238/zoom
local addKamizelka_xaddKamizelka_yaddKamizelka_waddKamizelka_h 9/zoom31/zoom155/zoom63/zoom
local addUSPs_xaddUSPs_yaddUSPs_waddUSPs_h 261/zoom31/zoom155/zoom63/zoom
local addM4A1S_xaddM4A1S_yaddM4A1S_waddM4A1S_h 9/zoom150/zoom155/zoom63/zoom
local AddAK47_xAddAK47_yAddAK47_wAddAK47_h 261/zoom150/zoom155/zoom63/zoom

panel guiCreateWindow(panel_xpanel_y_panel_wpanel_h"Automat z napojami"false)
addKamizelka guiCreateButton(addKamizelka_xaddKamizelka_yaddKamizelka_waddKamizelka_h"Cola + 5 HP"falsepanel)
addUSPs guiCreateButton(addUSPs_xaddUSPs_yaddUSPs_waddUSPs_h"Lipton + 7 HP"falsepanel)
addM4A1S guiCreateButton(addM4A1S_xaddM4A1S_yaddM4A1S_waddM4A1S_h"Mountain Dew + 10 HP"falsepanel)
addAK47 guiCreateButton(AddAK47_xAddAK47_yAddAK47_wAddAK47_h"Red Bull + 12 HP"falsepanel)  
guiSetVisible(panelfalse)
guiSetVisible(addKamizelkafalse)
guiSetVisible(addUSPsfalse)
guiSetVisible(addM4A1S,false)
guiSetVisible(addAK47,false)

addEventHandler("onClientGUIClick",root,function ()
    if source == addKamizelka then 
    setElementHealth localPlayergetElementHealth(localPlayer) + ) 
    local money getPlayerMoney(localPlayer)
    if money >= 3 then
    takePlayerMoney(3)
    outputChatBox (" Z maszyny wylatuje puszka napoju * Cola *")
    outputChatBox (" Wypi?e? * Cola * zap?aci?e? 3$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
   elseif source == addUSPs then  
    setElementHealth localPlayergetElementHealth(localPlayer) + )
    local money getPlayerMoney(localPlayer)
    if money >= 5 then
    takePlayerMoney(localPlayer5)
    outputChatBox (" Z maszyny wylatuje puszka napoju * Lipton *")
    outputChatBox (" Wypi?e? * Lipton * zap?aci?e? 5$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
    elseif source ==  addM4A1S  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 10 ) 
    local money getPlayerMoney(localPlayer)
    if money >= 6 then
    takePlayerMoney(localPlayer6)
    outputChatBox (" Z maszyny wylatuje puszka  * Mountain Dew *")
    outputChatBox (" Wypi?e? * Mountain Dew * zap?aci?e? 6$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
    elseif source ==  addAK47  then 
    setElementHealth localPlayergetElementHealth(localPlayer) + 12 ) 
    local money getPlayerMoney(localPlayer)
    if money >= 8 then
    takePlayerMoney(localPlayer8)
    outputChatBox (" Z maszyny wylatuje puszka z * Red Bull *")
    outputChatBox (" Wypi?e? * Red Bull * zap?aci?e? 8$")
    else
    outputChatBox("nie posiadasz funduszy")
    end
    end
end)

function Open_panel (el) 
    if el~=localPlayer then return end
    guiSetVisible(paneltrue)
    guiSetVisible(addKamizelkatrue)
    guiSetVisible(addUSPstrue)
    guiSetVisible(addM4A1S,true)
    guiSetVisible(addAK47,true)
    showCursor(true,false)
end 
addEventHandler ("onClientMarkerHit"markerOpen_panel) 

function Close_panel(el) 
if el~=localPlayer then return end
    guiSetVisible(panelfalse)
    guiSetVisible(addKamizelkafalse)
    guiSetVisible(addUSPsfalse)
    guiSetVisible(addM4A1S,false)
    guiSetVisible(addAK47,false)
    showCursor (false,falseend 
addEventHandler ("onClientMarkerLeave",markerClose_panel


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
guciopl5
Tagi: 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 » GUI 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