• ulx force through RunConsoleCommand?
    6 replies, posted
I know that this could've been posted on the ulysses forums so please forgive me on this. I have a script that uses ulx force with RunConsoleCommand and for some reason it's just not working. Part of the code: [CODE]RunConsoleCommand( "ulx", "force", '"', v:Nick(), '"', "traitor" ) print( "ulx", "force", '"', v:Nick(), '"', "traitor" )[/CODE] I used print to see what the console command exactly is, and this is what I got [CODE]ulx force " Bot01 " traitor Invalid command entered. If you need help, please type "ulx help" in your console.[/CODE] I typed in [CODE]ulx force " Bot01 " traitor[/CODE] manually into the server console and it worked just fine. Why is it not working through RunConsoleCommand?
[code]RunConsoleCommand( "ulx", "force", v:Nick(), "traitor" )[/code]
[QUOTE=Xaotic;48163921][code]RunConsoleCommand( "ulx", "force", v:Nick(), "traitor" )[/code][/QUOTE] That would not work with names that have a space inside them. Besides it still doesn't work
[QUOTE=JasonMan34;48163947]That would not work with names that have a space inside them. Besides it still doesn't work[/QUOTE] Why it wouldn't? You insert an argument, you cant have space if i am right, but it seems that you havent got that command? What does "ulx force" in console return?
[QUOTE=SteppuFIN;48163959]Why it wouldn't? You insert an argument, you cant have space if i am right, but it seems that you havent got that command? What does "ulx force" in console return?[/QUOTE] ulx force is a TTT Admin command (ulx ofc) that forces a player to become a certain role. As I said I've typed it in manually into the console and it worked just fine
[QUOTE=JasonMan34;48163947]That would not work with names that have a space inside them. Besides it still doesn't work[/QUOTE] It would work with players with spaces in their names as it is an argument itself and spaces arent splitting arguments in RunConsoleCommand. Maybe try calling it by its function? (Would guess ULib.force(v,"traitor") or similar?)
I guess I must've misspelled something. Tried this again [QUOTE=Xaotic;48163921][code]RunConsoleCommand( "ulx", "force", v:Nick(), "traitor" )[/code][/QUOTE] Worked, thanks :)
Sorry, you need to Log In to post a reply to this thread.