Wysłany: 2016-09-11, 08:04
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
jak naciskam button , nie znika mi gui .
addEventHandler ( "onClientResourceStart" , root , function()
punkt3 = guiCreateTabPanel ( 254 , 92 , 1106 , 650 , false )
guiSetVisible ( punkt3 , false )
glock = guiCreateTab ( "Glock i inne" , punkt3 )
guiWindowSetSizable ( punkt3 , false )
Lastrike = guiCreateButton ( 10 , 66 , 99 , 35 , "" , false , punkt3 )
guiSetVisible ( punkt3 , false )
end
)
local marker = createMarker ( 1658.44641 , - 1691.38037 , 15.60938 , "cylinder" )
addEventHandler ( "onClientMarkerHit" , marker ,
function( hitElement , md )
if hitElement ~= localPlayer then return end
if not md then return end
if source ~= marker then return end
guiSetVisible ( punkt3 , true )
showCursor ( true , false )
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 podmien ()
if source == Lastrike then
if isElementWithinMarker ( localPlayer , marker ) then
triggerServerEvent ( "serverSide" , localPlayer )
outputChatBox ( "Zakup" .. #ff0000.. "Udany")
dff = engineLoadDFF ( "colt45.dff" , 346 )
engineReplaceModel ( dff , 346 )
txd = engineLoadTXD ( "colt45.txd" )
engineImportTXD ( txd , 346 )
guiSetVisible ( punkt3 , false )
showCursor ( false )
end
end
end
addEventHandler ( "onClientGUIClick" , root , podmien )
Wysłany: 2016-09-11, 08:32
MIKAELmta
Wiek: 24 Na forum: 3979 dni Posty: 311
Piwa : 10617
Zapoznaj si? z funkcj? i b?dziesz wiedzia?, co masz ?le.
Wysłany: 2016-09-11, 09:05
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
MIKAELmta , nie rozumiem przecie? da?em
addEventHandler ( "onClientGUIClick" , root , podmien )
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-09-11, 18:53
_Haze
Peace Yo!
Wiek: 24 Na forum: 4185 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
"MIKAELmta" napisał/a :Zapoznaj si? z funkcj? i b?dziesz wiedzia?, co masz ?le.
nie umiesz to sie nie wypowiadaj. Argument Lastrike czy jako? tak da?e? w evencie to teraz ?eby dzia?a?o to musisz da? bez eventu na pocz?tku skryptu Lastrike = nil albo da? tworzenie tego bez eventu tzn usuna? event onClientResourceStart
Wysłany: 2016-09-11, 19:19
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
czyli m?wisz , ?e wystarczy usun?? tylko z pocz?tku
addEventHandler ( "onClientResourceStart" , root , function()
[ Dodano : 2016-09-11, 19:53 ]
teraz t oznikno mi marker
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-09-11, 20:40
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
Pokaz jak Twoj kod wyglada teraz po tych wszystkich modyfikacjach.
Podpis
Jedyny kontakt ze mną to PW forum
Kod:
local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Wysłany: 2016-09-11, 20:47
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
punkt3 = guiCreateTabPanel ( 254 , 92 , 1106 , 650 , false )
guiSetVisible ( punkt3 , false )
glock = guiCreateTab ( "Glock i inne" , punkt3 )
guiWindowSetSizable ( punkt3 , false )
Lastrike = guiCreateButton ( 10 , 66 , 99 , 35 , "" , false , punkt3 )
guiSetVisible ( punkt3 , false )
end
)
local marker = createMarker ( 1658.44641 , - 1691.38037 , 15.60938 , "cylinder" )
addEventHandler ( "onClientMarkerHit" , marker ,
function( hitElement , md )
if hitElement ~= localPlayer then return end
if not md then return end
if source ~= marker then return end
guiSetVisible ( punkt3 , true )
showCursor ( true , false )
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 podmien ()
if source == Lastrike then
if isElementWithinMarker ( localPlayer , marker ) then
triggerServerEvent ( "serverSide" , localPlayer )
outputChatBox ( "Zakup" .. #ff0000.. "Udany")
dff = engineLoadDFF ( "colt45.dff" , 346 )
engineReplaceModel ( dff , 346 )
txd = engineLoadTXD ( "colt45.txd" )
engineImportTXD ( txd , 346 )
guiSetVisible ( punkt3 , false )
showCursor ( false )
end
end
end
addEventHandler ( "onClientGUIClick" , root , podmien )
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-09-11, 20:50
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
punkt3 = guiCreateTabPanel ( 254 , 92 , 1106 , 650 , false )
guiSetVisible ( punkt3 , false )
glock = guiCreateTab ( "Glock i inne" , punkt3 )
guiWindowSetSizable ( punkt3 , false )
Lastrike = guiCreateButton ( 10 , 66 , 99 , 35 , "" , false , punkt3 )
guiSetVisible ( punkt3 , false )
local marker = createMarker ( 1658.44641 , - 1691.38037 , 15.60938 , "cylinder" )
addEventHandler ( "onClientMarkerHit" , marker ,
function( hitElement , md )
if hitElement ~= localPlayer then return end
if not md then return end
if source ~= marker then return end
guiSetVisible ( punkt3 , true )
showCursor ( true , false )
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 podmien ()
if source == Lastrike then
if isElementWithinMarker ( localPlayer , marker ) then
triggerServerEvent ( "serverSide" , localPlayer )
outputChatBox ( "Zakup" .. #ff0000.. "Udany")
dff = engineLoadDFF ( "colt45.dff" , 346 )
engineReplaceModel ( dff , 346 )
txd = engineLoadTXD ( "colt45.txd" )
engineImportTXD ( txd , 346 )
guiSetVisible ( punkt3 , false )
showCursor ( false )
end
end
end
addEventHandler ( "onClientGUIClick" , root , podmien )
Podpis
Jedyny kontakt ze mną to PW forum
Kod:
local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Wysłany: 2016-09-13, 18:12
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Jurandovsky , nadal nic , w sensie klikam i nie znika mi gui
[ Dodano : 2016-09-13, 18:15 ]
Aha i jeszcze za?awa?y?em ,?e
button zamiast by? w
glock = guiCreateTab ( "Glock i inne" , punkt3 )
jest w innym bez nazwy , a wcze?niej by? w tym co poda?em czyli "Glock i inne"
[ Dodano : 2016-09-14, 15:16 ]
mo?e to wp?ywa ,?e nie chce dzia?a? przycisk ?
outputChatBox ( "Zakup" .. #ff0000.. "Udany")
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2016-09-14, 19:55
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4150 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
outputChatBox ( "Zakup #ff0000 Udany" , 255 , 255 , 255 , true )
Nie potrzebnie umieszczasz kod koloru w "" bo jest to zb?dne. Co do samego problemu to,
function podmien ()
if source ~= Lastrike then return end
if isElementWithinMarker ( localPlayer , marker ) then
triggerServerEvent ( "serverSide" , localPlayer )
outputChatBox ( "Zakup#ff0000Udany" , 255 , 255 , 255 , true )
dff = engineLoadDFF ( "colt45.dff" , 346 )
engineReplaceModel ( dff , 346 )
txd = engineLoadTXD ( "colt45.txd" )
engineImportTXD ( txd , 346 )
if guiGetVisible ( punkt3 ) == true then
guiSetVisible ( punkt3 , false )
showCursor ( false )
end
end
end
addEventHandler ( "onClientGUIClick" , root , podmien )
Wysłany: 2016-09-15, 15:21
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3729 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
marcin778 ,
?wietnie se z tym zadaniem poradzi?e? , bardzo mi pomog?e? , dzi?ki
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Tagi: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: