Wysłany: 2016-03-26, 17:13
nox
Wiek: 33 Na forum: 3766 dni Posty: 51
Nick w MP: nox
mam taki kod na panel i nie chce sie on zamknac, czemu ?
GUIEditor = {
gridlist = {},
staticimage = {},
button = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
local screenW , screenH = guiGetScreenSize ()
GUIEditor . staticimage [ 1 ] = guiCreateStaticImage (( screenW - 640 ) / 2 , ( screenH - 400 ) / 2 , 640 , 400 , ":obrazki5/images/1.png" , false )
GUIEditor . label [ 1 ] = guiCreateLabel ( 10 , 304 , 217 , 65 , " ---- " , false , GUIEditor . staticimage [ 1 ])
GUIEditor . button [ 2 ] = guiCreateButton ( 10 , 154 , 217 , 65 , "" , false , GUIEditor . staticimage [ 1 ])
GUIEditor . button [ 3 ] = guiCreateButton ( 10 , 229 , 217 , 65 , "" , false , GUIEditor . staticimage [ 1 ])
GUIEditor . button [ 4 ] = guiCreateButton ( 10 , 304 , 217 , 65 , "" , false , GUIEditor . staticimage [ 1 ])
GUIEditor . gridlist [ 1 ] = guiCreateGridList ( 360 , 47 , 270 , 343 , false , GUIEditor . staticimage [ 1 ])
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "Gracz" , 0.9 )
guiSetAlpha ( GUIEditor . gridlist [ 1 ], 0.72 )
end
)
function openPanel ()
guiSetVisible ( GUIEditor . staticimage [ 1 ], true )
showCursor ( true )
end
addCommandHandler ( "pdp" , openPanel )
function zamykamy ()
if source == GUIEditor . label [ 1 ] then
guiSetVisible ( GUIEditor . staticimage [ 1 ], false )
showCursor ( false )
end
end
addEventHandler ( "onClientGUIClick" , root , zamykamy )
w db3 mam cos takiego :
http://i.imgur.com/kszdmXp.png
co robic ?
#2
M?g?by mi ktos poda? przyk?adowy kod na lokalne dzia?anie funkcji ( leczenie ), wiem ze do tego s?uzy co? takie : getDistanceBetweenPoints, ale nie wiem jak wyglada przyk?adowy kod...
Wysłany: 2016-03-26, 17:20
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
GUIEditor = {
gridlist = {},
staticimage = {},
button = {},
label = {}
}
Co do leczenia
local x , y , z = getElementPosition ( graczktoryleczy )
local x2 , y2 , z2 = getElementPosition ( leczonygracz )
if getDistanceBetweenPoints3D ( x , y , z , x2 , y2 , z2 ) < 5 then
-- lecz
end
Tagi: czemu :: nie :: działa
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: