Wysłany: 2013-04-27, 22:45
Ciastkooo
Wiek: 41 Na forum: 4804 dni Posty: 78
Nick w MP: Ciastko
Piwa : 24
Postanowilem zabrac sie za cos bardziej zaawansowanego ( przez takie cos chialbym sie nauczyc lua )
GUIEditor = {
label = {},
button = {},
window = {},
scrollbar = {},
gridlist = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
GUIEditor . window [ 1 ] = guiCreateWindow ( 529 , 255 , 541 , 506 , "Panel Moderatora" , false )
guiWindowSetMovable ( GUIEditor . window [ 1 ], false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
GUIEditor . gridlist [ 1 ] = guiCreateGridList ( 40 , 98 , 186 , 350 , false , GUIEditor . window [ 1 ])
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "Gracz" , 0.9 )
GUIEditor . scrollbar [ 1 ] = guiCreateScrollBar ( 166 , 1 , 20 , 358 , false , false , GUIEditor . gridlist [ 1 ])
GUIEditor . label [ 1 ] = guiCreateLabel ( 46 , 65 , 163 , 23 , "Wybierz Gracza:" , false , GUIEditor . window [ 1 ])
GUIEditor . label [ 2 ] = guiCreateLabel ( 298 , 68 , 167 , 20 , "Wybierz Funkcj? :" , false , GUIEditor . window [ 1 ])
GUIEditor . button [ 1 ] = guiCreateButton ( 293 , 130 , 172 , 54 , "Kick" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 1 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 2 ] = guiCreateButton ( 293 , 212 , 172 , 60 , "Zabierz bronie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 2 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 3 ] = guiCreateButton ( 294 , 305 , 171 , 56 , "Kara ?mierci" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 3 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 4 ] = guiCreateButton ( 293 , 389 , 172 , 55 , "Przywo?aj do Siebie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 4 ], "NormalTextColour" , "FFAAAAAA" )
end
)
Jak zrobic aby w gridliscie byli wszyscy aktywni uzytkownicy serwera?
Wysłany: 2013-04-27, 22:58
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Ciastkooo , tworzysz p?tle taka
GUIEditor = {
label = {},
button = {},
window = {},
scrollbar = {},
gridlist = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
GUIEditor . window [ 1 ] = guiCreateWindow ( 529 , 255 , 541 , 506 , "Panel Moderatora" , false )
guiWindowSetMovable ( GUIEditor . window [ 1 ], false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
GUIEditor . gridlist [ 1 ] = guiCreateGridList ( 40 , 98 , 186 , 350 , false , GUIEditor . window [ 1 ])
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "Gracz" , 0.9 )
GUIEditor . scrollbar [ 1 ] = guiCreateScrollBar ( 166 , 1 , 20 , 358 , false , false , GUIEditor . gridlist [ 1 ])
GUIEditor . label [ 1 ] = guiCreateLabel ( 46 , 65 , 163 , 23 , "Wybierz Gracza:" , false , GUIEditor . window [ 1 ])
GUIEditor . label [ 2 ] = guiCreateLabel ( 298 , 68 , 167 , 20 , "Wybierz Funkcj? :" , false , GUIEditor . window [ 1 ])
GUIEditor . button [ 1 ] = guiCreateButton ( 293 , 130 , 172 , 54 , "Kick" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 1 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 2 ] = guiCreateButton ( 293 , 212 , 172 , 60 , "Zabierz bronie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 2 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 3 ] = guiCreateButton ( 294 , 305 , 171 , 56 , "Kara ?mierci" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 3 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 4 ] = guiCreateButton ( 293 , 389 , 172 , 55 , "Przywo?aj do Siebie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 4 ], "NormalTextColour" , "FFAAAAAA" )
end
)
function gui ()
for id , playeritem in ipairs ( getElementsByType ( "player" )) do
local row = guiGridListAddRow ( GUIEditor . gridlist [ 1 ] )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], row , kolumna , getPlayerName ( playeritem ), false , false )
if ( guiGetVisible ( GUIEditor . window [ 1 ]) == false ) then
guiSetVisible ( GUIEditor . window [ 1 ], true )
showCursor ( true )
else
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
end
end
end
bindKey ( "F3" , "down" , gui )
Sprawd? czy dzia?a
Wysłany: 2013-04-27, 23:34
Ciastkooo
Wiek: 41 Na forum: 4804 dni Posty: 78
Nick w MP: Ciastko
Piwa : 24
no niestety, lista jest pusta.
Wysłany: 2013-04-28, 10:19
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
Jak ju?, to tak:
GUIEditor = {
label = {},
button = {},
window = {},
scrollbar = {},
gridlist = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
GUIEditor . window [ 1 ] = guiCreateWindow ( 529 , 255 , 541 , 506 , "Panel Moderatora" , false )
guiWindowSetMovable ( GUIEditor . window [ 1 ], false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
GUIEditor . gridlist [ 1 ] = guiCreateGridList ( 40 , 98 , 186 , 350 , false , GUIEditor . window [ 1 ])
GUIEditor . gridlist [ 2 ] = guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "Gracz" , 0.9 )
GUIEditor . scrollbar [ 1 ] = guiCreateScrollBar ( 166 , 1 , 20 , 358 , false , false , GUIEditor . gridlist [ 1 ])
GUIEditor . label [ 1 ] = guiCreateLabel ( 46 , 65 , 163 , 23 , "Wybierz Gracza:" , false , GUIEditor . window [ 1 ])
GUIEditor . label [ 2 ] = guiCreateLabel ( 298 , 68 , 167 , 20 , "Wybierz Funkcj? :" , false , GUIEditor . window [ 1 ])
GUIEditor . button [ 1 ] = guiCreateButton ( 293 , 130 , 172 , 54 , "Kick" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 1 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 2 ] = guiCreateButton ( 293 , 212 , 172 , 60 , "Zabierz bronie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 2 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 3 ] = guiCreateButton ( 294 , 305 , 171 , 56 , "Kara ?mierci" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 3 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 4 ] = guiCreateButton ( 293 , 389 , 172 , 55 , "Przywo?aj do Siebie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 4 ], "NormalTextColour" , "FFAAAAAA" )
end
)
function gui ()
if ( guiGetVisible ( GUIEditor . window [ 1 ]) == false ) then
guiSetVisible ( GUIEditor . window [ 1 ], true )
showCursor ( true )
for id , playeritem in ipairs ( getElementsByType ( "player" )) do
local row = guiGridListAddRow ( GUIEditor . gridlist [ 1 ] )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], row , GUIEditor . gridlist [ 2 ], getPlayerName ( playeritem ), false , false )
end
else
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
end
end
bindKey ( "F3" , "down" , gui )
Ten ScrollBar (czyli suwak) jest nie potrzebny. Suwak do przewijania w GridList tworzy si? automatycznie.
Wysłany: 2013-04-28, 10:29
Ciastkooo
Wiek: 41 Na forum: 4804 dni Posty: 78
Nick w MP: Ciastko
Piwa : 24
Problem w tym ze jak otworze i zamkne okno to w gridliscie mam
Ciastko
Ciastko O.o
Wysłany: 2013-04-28, 10:44
Oski
LUA Scripter
Wiek: 30 Na forum: 5246 dni Posty: 428
Nick w MP: Oski
Piwa : 56
Musisz Czy?ci? grdliste i uzupe?nia? j? przy ka?ym otwarciu okna.
Wysłany: 2013-04-28, 10:50
Ciastkooo
Wiek: 41 Na forum: 4804 dni Posty: 78
Nick w MP: Ciastko
Piwa : 24
Faktycznie duzo pomogles.
Wysłany: 2013-04-28, 11:04
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
Pom?g?, bo na gotowcach daleko nie zajedziesz...
GUIEditor = {
label = {},
button = {},
window = {},
scrollbar = {},
gridlist = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
GUIEditor . window [ 1 ] = guiCreateWindow ( 529 , 255 , 541 , 506 , "Panel Moderatora" , false )
guiWindowSetMovable ( GUIEditor . window [ 1 ], false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
GUIEditor . gridlist [ 1 ] = guiCreateGridList ( 40 , 98 , 186 , 350 , false , GUIEditor . window [ 1 ])
GUIEditor . gridlist [ 2 ] = guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "Gracz" , 0.9 )
GUIEditor . scrollbar [ 1 ] = guiCreateScrollBar ( 166 , 1 , 20 , 358 , false , false , GUIEditor . gridlist [ 1 ])
GUIEditor . label [ 1 ] = guiCreateLabel ( 46 , 65 , 163 , 23 , "Wybierz Gracza:" , false , GUIEditor . window [ 1 ])
GUIEditor . label [ 2 ] = guiCreateLabel ( 298 , 68 , 167 , 20 , "Wybierz Funkcj? :" , false , GUIEditor . window [ 1 ])
GUIEditor . button [ 1 ] = guiCreateButton ( 293 , 130 , 172 , 54 , "Kick" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 1 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 2 ] = guiCreateButton ( 293 , 212 , 172 , 60 , "Zabierz bronie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 2 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 3 ] = guiCreateButton ( 294 , 305 , 171 , 56 , "Kara ?mierci" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 3 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 4 ] = guiCreateButton ( 293 , 389 , 172 , 55 , "Przywo?aj do Siebie" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 4 ], "NormalTextColour" , "FFAAAAAA" )
end
)
function gui ()
if ( guiGetVisible ( GUIEditor . window [ 1 ]) == false ) then
guiSetVisible ( GUIEditor . window [ 1 ], true )
showCursor ( true )
guiGridListClear ( GUIEditor . gridlist [ 1 ])
for id , playeritem in ipairs ( getElementsByType ( "player" )) do
local row = guiGridListAddRow ( GUIEditor . gridlist [ 1 ] )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], row , GUIEditor . gridlist [ 2 ], getPlayerName ( playeritem ), false , false )
end
else
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
end
end
bindKey ( "F3" , "down" , gui )
Tagi: panel :: moderatora
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: