Wysłany: 2016-08-15, 08:37
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Jak wchodz? w marker , nie pokazuje mi si? gui , gdzie le?y problem ?
addEventHandler ( "onClientResourceStart" , root , function()
napad = guiCreateWindow ( 415 , 222 , 543 , 390 , "" , false )
guiWindowSetSizable ( napad , false )
buy = guiCreateButton ( 38 , 108 , 105 , 33 , "Ak47" , false , napad )
end )
local marker = createMarker ( 2295.04639 , - 1686.69812 , 13.62975 , "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 ( napad , 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 == 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 )
Wysłany: 2016-08-15, 12:06
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
Pewnie dlatego, ?e gui pokazuje si? tu? po w??czeniu skryptu, a nie wej?ciu w marker. Po utworzeniu gui schowaj je.
addEventHandler ( "onClientResourceStart" , root , function()
napad = guiCreateWindow ( 415 , 222 , 543 , 390 , "" , false )
guiWindowSetSizable ( napad , false )
buy = guiCreateButton ( 38 , 108 , 105 , 33 , "Ak47" , false , napad )
guiSetVisible ( napad , false )
end )
Kod testowany, nie ma mo?liwo?ci, aby nie dzia?a?.
Wysłany: 2016-08-15, 12:26
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Tagi: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: