Ulysses
General => Developers Corner => Topic started by: CheeseSalt on January 09, 2015, 03:06:58 PM
-
I was trying to figure out how to make a command that when you type "!textures" would either copy a link to your clip board and say "Link copied to clipboard" or it would open the page in the steam browser. I have no idea how i would do this, if anybody could help that would be much appreciated!
-
Do you know lua?
-
Bits and peices im not great at it. I do have a friend who could help me.
-
gui.OpenURL() (http://wiki.garrysmod.com/page/gui/OpenURL) is your friend.
You'd probably also want to use the Net library (http://wiki.garrysmod.com/page/Net_Library_Usage), as gui.OpenURL() is a client-side function.
You can check out my ULX command template (http://forums.ulyssesmod.net/index.php/topic,7911.msg40173.html#msg40173) for a base on which to write your code.
-
http://wiki.garrysmod.com/page/Global/SetClipboardText (http://wiki.garrysmod.com/page/Global/SetClipboardText)
You can also use this (clientside) to set a players clipboard.