Sjoerdva97

Untitled

Jan 10th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1.  
  2. -- Add into :item-texture/c_vehtex.lua
  3. function copyToClipboard()
  4.     if source == gui.list then
  5.         local url = guiGridListGetItemText ( gui.list, guiGridListGetSelectedItem ( gui.list ), 2 )
  6.         if url then
  7.             outputChatBox("URL copied to clipboard.")
  8.             setClipboard(url)
  9.         end
  10.     end
  11. end
  12. addEventHandler("onClientGUIDoubleClick", root, copyToClipboard)
  13.  
  14. -- Add into :texture-system/frames_gui.lua
  15. function copyToClipboard()
  16.     if source == gui.list then
  17.         local url = guiGridListGetItemText ( gui.list, guiGridListGetSelectedItem ( gui.list ), 3 )
  18.         if url then
  19.             outputChatBox("URL copied to clipboard.")
  20.             setClipboard(url)
  21.         end
  22.     end
  23. end
  24. addEventHandler("onClientGUIDoubleClick", root, copyToClipboard)
Advertisement
Add Comment
Please, Sign In to add comment