Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player_Window = {}
- GUIEditor_Grid = {}
- player_Window[1] = guiCreateWindow(177,52,384,494,"Playerlist",false)
- guiWindowSetMovable(player_Window[1],false)
- guiSetVisible(player_Window[1],false)
- GUIEditor_Grid[1] = guiCreateGridList(10,19,464,401,false,player_Window[1])
- guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
- Spieler_TAB = guiGridListAddColumn( GUIEditor_Grid[1], "Spielername", 0.30 )
- Team_TAB = guiGridListAddColumn( GUIEditor_Grid[1], "Team", 0.20 )
- Ping_TAB = guiGridListAddColumn( GUIEditor_Grid[1], "Ping", 0.20 )
- function RefreshTab()
- guiGridListClear (GUIEditor_Grid[1])
- for index, cPlayer in pairs(getElementsByType( "player" )) do
- row = guiGridListAddRow (GUIEditor_Grid[1])
- guiGridListSetItemText ( GUIEditor_Grid[1], row, Spieler_TAB, getPlayerName(cPlayer), false, false )
- guiGridListSetItemText ( GUIEditor_Grid[1], row, Ping_TAB, tostring(getPlayerPing(cPlayer)) , false, false )
- local playerTeam = getPlayerTeam (cPlayer )
- guiGridListSetItemText ( GUIEditor_Grid[1], row, Team_TAB, tostring(getTeamName(playerTeam)), false, false )
- end
- end
- function toggleTABs(key, state)
- if state == "down" then
- guiSetVisible (player_Window[1],true)
- RefreshTab()
- else
- guiSetVisible (player_Window[1],false)
- end
- end
- bindKey("tab", "both", toggleTABs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement