Wysłany: 2016-07-31, 15:19
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
elo mam problem gui wyskakuje mi po wejsciu na serwer + nie wykonuje swoich fukcji
gdy klikam , nie teleportuje i nie ga?nie gui i kursor . oto kod.
addEventHandler ( "onClientGUIClick" , root , function( btn , state )
if btn == "left" and state == "up" then
if source == buttonAccept then
setElementPosition ( elementy , 2143.23804 , 1547.52258 , 10.82031 )
guiSetVisible ( napad , false )
showCursor ( false )
end
Wysłany: 2016-07-31, 16:19
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Co do otwierania po wej?ciu to
a co do b??d?w.
addEventHandler ( "onClientGUIClick" , root , function( btn , state )
if btn == "left" and state == "up" then
if source == buttonAccept then
setElementPosition ( elementy , 2143.23804 , 1547.52258 , 10.82031 )
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end )
Wysłany: 2016-07-31, 21:48
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
nadal button , nie wykonuje swojej funkcji . Daje ci ca?y kod .
napad = guiCreateWindow ( 438 , 185 , 467 , 306 , "Potwied? Napad na Bank" , false )
guiWindowSetSizable ( napad , false )
guiSetAlpha ( napad , 0.58 )
guiSetProperty ( napad , "CaptionColour" , "FFFEFEFE" )
buttonEmpty = guiCreateButton ( 194 , 129 , 15 , 15 , "" , false , napad )
buttonAccept = guiCreateButton ( 20 , 233 , 119 , 52 , "Akceptuj?" , false , napad )
buttonRefuse = guiCreateButton ( 317 , 234 , 140 , 61 , "Odrzu?" , false , napad )
local marker = createMarker ( 1821.38318 , - 1683.33215 , 13.38281 , "cylinder" )
addEventHandler ( "onClientMarkerHit" , marker , function( el , md )
if el ~= localPlayer then return end
if not md then return end
guiSetVisible ( napad , true )
showCursor ( true , false )
end )
addEventHandler ( "onClientGUIClick" , root , function( btn , state )
if btn == "left" and state == "up" then
if source == buttonRefuse then
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end )
addEventHandler ( "onClientGUIClick" , root , function( btn , state )
if btn == "left" and state == "up" then
if source == buttonAccept then
setElementPosition ( elementy , 2143.23804 , 1547.52258 , 10.82031 )
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end )
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-08-02, 09:37
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
A spr?buj tak:
addEventHandler ( "onClientGUIClick" , root , function( btn , state )
if btn == "left" and state == "up" then
if source == buttonAccept then
setElementPosition ( elementy , 2143.23804 , 1547.52258 , 10.820 )
guiSetVisible ( napad , false )
showCursor ( false )
if source == buttonRefuse then
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end
end )
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Wysłany: 2016-08-02, 12:33
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Rookspack , Poprawka
addEventHandler ( "onClientGUIClick" , root , function( btn , state )
if btn == "left" and state == "up" then
if source == buttonAccept then
setElementPosition ( elementy , 2143.23804 , 1547.52258 , 10.820 )
guiSetVisible ( napad , false )
showCursor ( false )
elseif source == buttonRefuse then
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end
end )
Wysłany: 2016-08-02, 13:20
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Rookspack , nadal nie dzia?a
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-08-02, 13:31
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
function tak ()
if source == buttonAccept then
setElementPosition ( elementy , 2143.23804 , 1547.52258 , 10.820 )
guiSetVisible ( napad , false )
showCursor ( false )
end
end
addEventHandler ( "onClientGUIClick" , root , tak )
function nie ()
if source == buttonRefuse then
guiSetVisible ( napad , false )
showCursor ( false )
end
end
addEventHandler ( "onClientGUIClick" , root , nie )
Wysłany: 2016-08-02, 16:59
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Rookspack , Pr?bowa?em na wszystkie sposoby i nic , to samo , nie dzia?a tylko button ,
je?li chodzi o meta.xml bo chcia?e? zobaczy? prosz? .
< meta >
< script type = "client" src = "gui.lua" />
< meta >
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-08-02, 17:03
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
< meta >
< script src = "gui.lua" type = "client" />
</ meta >
Wysłany: 2016-08-02, 17:12
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-08-02, 17:22
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Wysłany: 2016-08-02, 19:09
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
zobacz tak:
napad = guiCreateWindow ( 438 , 185 , 467 , 306 , "Potwied? Napad na Bank" , false )
guiWindowSetSizable ( napad , false )
guiSetAlpha ( napad , 0.58 )
guiSetProperty ( napad , "CaptionColour" , "FFFEFEFE" )
buttonEmpty = guiCreateButton ( 194 , 129 , 15 , 15 , "" , false , napad )
buttonAccept = guiCreateButton ( 20 , 233 , 119 , 52 , "Akceptuj?" , false , napad )
buttonRefuse = guiCreateButton ( 317 , 234 , 140 , 61 , "Odrzu?" , false , napad )
local marker = createMarker ( 1821.38318 , - 1683.33215 , 13.38281 , "cylinder" )
addEventHandler ( "onClientMarkerHit" , marker , function( el , md )
if el ~= localPlayer then return end
if not md then return end
guiSetVisible ( napad , true )
showCursor ( true , false )
end )
addEventHandler ( "onClientGUIClick" , root , function( btn , state )
if btn == "left" and state == "up" then
if source == buttonRefuse then
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end )
function getElementsWithinMarker ( marker )
if ( not isElement ( marker ) or getElementType ( marker ) ~= "marker" ) then
return false
end
local markerColShape = getElementColShape ( marker )
local elements = getElementsWithinColShape ( markerColShape )
return elements
end
addEventHandler ( "onClientGUIClick" , buttonAccept ,
function ( btn , state )
if source == buttonAccept then
if btn == "left" and state == "up" then
local element = getElementsWithinMarker ( marker )
for i , v in ipairs ( element ) do
setElementPosition ( v , 2143.23804 , 1547.52258 , 10.82031 )
end
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end
)
Wysłany: 2016-08-03, 09:12
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
dzia?a , thx luki123luki123 ,
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Tagi: trzecie :: spotkanie :: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: