Ulysses

General => Developers Corner => Topic started by: (TG) PotLuck on July 29, 2016, 10:37:51 AM

Title: Help with command
Post by: (TG) PotLuck on July 29, 2016, 10:37:51 AM
I am trying to figure out how to make a player run a console command when they use a certain ULX command. I recently got a server hopper addon so players can switch between servers in my community, but it only has a console command to open the GUI. I need them to be able to type !servers and it makes them run the console command "serverhopper". Please help. I have no clue how to setup this code.
Title: Re: Help with command
Post by: MrPresident on July 29, 2016, 10:40:18 AM
http://wiki.garrysmod.com/page/Player/ConCommand

if you're doing it in an ULX command structure, it would likely be this:

target_ply:ConCommand("serverhopper")

But target_ply could be whatever the player object in your command code is.

Feel free to post what you come up with here and we'll help you out.