• Concommand and connect workaround
    4 replies, posted
I am trying to make a simple ulx command so that when you type, let's say !prophunt, it redirects you from the server you're on to the IP address of that prop hunt server. This is the code that I have so far. [CODE] CATEGORY_NAME = "Servers" function ulx.prophunt(ply) --connect ip command here end local prophunt = ulx.command( CATEGORY_NAME, "ulx prophunt", ulx.prophunt, "!prophunt" ) prophunt:defaultAccess( ULib.ACCESS_ALL ) prophunt:help( "Connect directly to our prop hunt server" ) [/CODE] The only thing is, is that the connect command is blocked in the way that I want to use it. Is there a possible work around for this?
Oh my god, ULX plugins look so horrible and awkward As far as I know, the command isn't blocked and should work fine. I know we wrote a command a while back, I'll see if I can find it for you.
[QUOTE=NiandraLades;45599909]Oh my god, ULX plugins look so horrible and awkward As far as I know, the command isn't blocked and should work fine. I know we wrote a command a while back, I'll see if I can find it for you.[/QUOTE] It is blocked :)
Are you sure? I've seen seen plenty of server hoppers on Coderhire. Unless I'm being a big dummy and not getting something
Don't worry. I've found a work around. Updated code below [CODE]CATEGORY_NAME = "Servers" function ulx.prophunt(ply) ply:SendLua("LocalPlayer():ConCommand('connect IP Here')") end local prophunt = ulx.command( CATEGORY_NAME, "ulx prophunt", ulx.prophunt, "!prophunt" ) prophunt:defaultAccess( ULib.ACCESS_ALL ) prophunt:help( "Connect directly to our prop hunt server" ) [/CODE]
Sorry, you need to Log In to post a reply to this thread.