Ulysses

General => Developers Corner => Topic started by: CheeseSalt on January 09, 2015, 03:06:58 PM

Title: ULX custom command
Post 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!
Title: Re: ULX custom command
Post by: JamminR on January 09, 2015, 03:20:42 PM
Do you know lua?
Title: Re: ULX custom command
Post by: CheeseSalt on January 09, 2015, 03:35:20 PM
Bits and peices im not great at it. I do have a friend who could help me.
Title: Re: ULX custom command
Post by: Bytewave on January 09, 2015, 07:40:03 PM
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.
Title: Re: ULX custom command
Post by: MrPresident on January 09, 2015, 10:06:02 PM
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.