Advertisement
Guest User

Untitled

a guest
Apr 17th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.01 KB | None | 0 0
  1.  changeGridListItemToPlayersName = function ( grid, col )
  2.         if grid and col then
  3.              if getElementType ( grid ) == "gui-gridlist" then
  4.                if guiGridListClear ( grid ) then
  5.                   for i, v in next, getElementsByType ( "player" ) do
  6.                         local Row = guiGridListAddRow ( grid )
  7.                         guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false )
  8.                     end
  9.                  end
  10.               end
  11.            end
  12.         end
  13.  
  14. GUIEditor_Window = {}
  15. GUIEditor_TabPanel = {}
  16. GUIEditor_Tab = {}
  17. GUIEditor_Button = {}
  18. GUIEditor_Label = {}
  19. GUIEditor_Grid = {}
  20.  
  21. GUIEditor_Window[1] = guiCreateWindow(243,67,334,468,"Admin Panel   -   v 1.0",false)
  22. guiSetVisible(GUIEditor_Window[1],false)
  23. GUIEditor_TabPanel[1] = guiCreateTabPanel(9,22,313,432,false,GUIEditor_Window[1])
  24. GUIEditor_Tab[1] = guiCreateTab("Player",GUIEditor_TabPanel[1])
  25. GUIEditor_Grid[1] = guiCreateGridList(5,30,167,369,false,GUIEditor_Tab[1])
  26. guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
  27. guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.8)                                            
  28. GUIEditor_Button[1] = guiCreateButton(277,8,28,16,"X",false,GUIEditor_Tab[1])
  29. GUIEditor_Button[2] = guiCreateButton(197,66,91,22,"Fix",false,GUIEditor_Tab[1])
  30. guiSetFont(GUIEditor_Button[2],"default-bold-small")
  31. GUIEditor_Button[3] = guiCreateButton(198,106,91,22,"Heal Players",false,GUIEditor_Tab[1])
  32. guiSetFont(GUIEditor_Button[3],"default-bold-small")
  33. GUIEditor_Button[4] = guiCreateButton(198,145,91,22,"Heal",false,GUIEditor_Tab[1])
  34. guiSetFont(GUIEditor_Button[4],"default-bold-small")
  35. GUIEditor_Button[5] = guiCreateButton(198,187,91,22,"Kick",false,GUIEditor_Tab[1])
  36. guiSetFont(GUIEditor_Button[5],"default-bold-small")
  37. GUIEditor_Button[6] = guiCreateButton(199,227,91,22,"ban 1 hour",false,GUIEditor_Tab[1])
  38. guiSetFont(GUIEditor_Button[6],"default-bold-small")
  39. GUIEditor_Button[7] = guiCreateButton(199,266,91,22,"Mute",false,GUIEditor_Tab[1])
  40. guiSetFont(GUIEditor_Button[7],"default-bold-small")
  41. GUIEditor_Button[8] = guiCreateButton(199,303,91,22,"Armour",false,GUIEditor_Tab[1])
  42. guiSetFont(GUIEditor_Button[8],"default-bold-small")
  43. GUIEditor_Button[9] = guiCreateButton(199,341,91,22,"remove",false,GUIEditor_Tab[1])
  44. guiSetFont(GUIEditor_Button[9],"default-bold-small")
  45. GUIEditor_Button[10] = guiCreateButton(200,377,91,22,"Add",false,GUIEditor_Tab[1])
  46. guiSetFont(GUIEditor_Button[10],"default-bold-small")
  47. GUIEditor_Label[1] = guiCreateLabel(177,35,129,20,"IP :",false,GUIEditor_Tab[1])
  48. guiSetFont(GUIEditor_Label[1],"default-bold-small")
  49. GUIEditor_Tab[2] = guiCreateTab("About",GUIEditor_TabPanel[1])
  50.  
  51.  
  52. bindKey ( "F2" , "down" ,
  53. function()
  54.     guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1]))
  55.     showCursor(guiGetVisible(GUIEditor_Window[1]))
  56.         if ( guiGetVisible(GUIEditor_Window[1]) == true ) then
  57.             playSound("open.wav")
  58.             changeGridListItemToPlayersName(GUIEditor_Grid[1],1)
  59.         end
  60.     end
  61. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement