Wysłany: 2016-08-09, 18:04
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
nie widz? buttona , pomuszcie , widz? 2 ale nie widze 3 .
pierw caly kod :
addEventHandler ( "onClientResourceStart" , root , function()
napad = guiCreateWindow ( 438 , 185 , 467 , 306 , "Potwied? Napad na Bank" , false )
guiSetVisible ( napad , false )
guiWindowSetSizable ( napad , false )
guiSetAlpha ( napad , 0.58 )
guiSetProperty ( napad , "CaptionColour" , "FFFEFEFE" )
buttak = guiCreateButton ( 568 , 321 , 77 , 30 , "Ak 47" , false , napad )
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 )
end )
local marker = createMarker ( 1821.38318 , - 1683.33215 , 13.38281 , "cylinder" , 1 , 255 , 0 , 0 )
addEventHandler ( "onClientMarkerHit" , marker ,
function( hitElement , md )
if hitElement ~= 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
function accept ()
if source == buttonAccept then
local element = getElementsWithinMarker ( marker )
for i , v in ipairs ( element ) do
local poz = setElementPosition ( v , 355.66522 , 199.38464 , 23.20708 )
local gp = getElementPosition ( v )
end
if gp == poz then
if guiGetVisible ( napad ) == true then
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end
end
addEventHandler ( "onClientGUIClick" , root , accept )
function podmien ()
if source == buttak then
if isElementWithinMarker ( localPlayer , marker ) then
dff = engineLoadDFF ( "ak47.dff" , 355 )
engineReplaceModel ( dff , 355 )
txd = engineLoadTXD ( "ak47.txd" )
engineImportTXD ( txd , 355 )
if guiGetVisible ( napad ) == true then
guiSetVisible ( napad , false )
showCursor ( false )
end
end
end
end
addEventHandler ( "onClientGUIClick" , root , podmien )
teraz o jaki button mi chodzi wlasnie o ten
buttak = guiCreateButton ( 568 , 321 , 77 , 30 , "Ak 47" , false , napad )
Gdy wchodze w marker wyswietla mi si? gui i wszystkie inne buttony opr?cz jednego , prosze o pomoc .
Wysłany: 2016-08-09, 18:51
.RiV
Wiek: 25 Na forum: 3588 dni Posty: 554
Nick w MP: Split
Piwa : 2596
Sprawd? czy na pewno masz ustawione prawid?owe wymiary w buttonie.
PS. Polecam Tobie zainstalowa? skrypt "guieditor"
Pozdrawiam
Podpis
Autor OGRPG, na scenie MTA od 2012 roku.
Użytkownik: 08.08.2016
GTAO Member: 06.02.2017
Support-Team: 17.06.2017 & 01.06.2019 - 18.11.2019
Moderator: 14.01.2018 - 09.08.2018
Wysłany: 2016-08-09, 20:06
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
.WhiteBlue , robi?em to przy u?yciu gui editor , a co do wymiar?w , o co ci chodzi . bo jestem zielony , wyj?snij m ito bardziej
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-08-09, 20:31
mtm
</3
Wiek: 26 Na forum: 3716 dni Posty: 181
Piwa : 252
buttak = guiCreateButton(568, 321, 77, 30 , "Ak 47", false, napad)
to s? wymiary ( to co jest pogrubione, te pierwsze 2 czyli 568 i 321 to po?o?enie
Wysłany: 2016-08-10, 08:45
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
pomog?o wielkie dzi?ki
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Tagi: nie :: widze :: buttona
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: