• Variable bug function() RunConsoleCommand("ulx kill",self.Player:SteamID() or "0"); end )
    9 replies, posted
Hello, I make this code function() RunConsoleCommand("ulx kill",self.Player:SteamID() or "0"); end ) For tab menu in my gamemode and i have this error ? RunConsoleCommand: Command has invalid characters! (ulx kill (' ')) The first parameter of this function should contain only the command, the second parameter should contain arguments. thank all help !
function() RunConsoleCommand("ulx", "kill",self.Player:SteamID() or "0"); end )
Thank for you reply Nop don't work Invalid command entered. If you need help, please type "ulx help" in your console.
well then ulx kill must be an invalid command.
It's Slay, not kill.
Thank TheTech i am Command "ulx slay", argument #1: no targets foun this error for m:AddOption( "Killé", function() RunConsoleCommand("ulx", "slay",self.Player:SteamID() or "0"); end )
[QUOTE=Pink3vil;48720149]Thank TheTech i am Command "ulx slay", argument #1: no targets foun this error for m:AddOption( "Killé", function() RunConsoleCommand("ulx", "slay",self.Player:SteamID() or "0"); end )[/QUOTE] You need self.Player:Nick(), not SteamID(), as you are slaying a Player by in-game name, not SteamID
Why not just do self.Player:Kill() instead?
[QUOTE=LUModder;48721358]Why not just do self.Player:Kill() instead?[/QUOTE] I assume he wants ULX to handle the permissions seeing as he is running the command on the client
[QUOTE=smithy285;48721457]I assume he wants ULX to handle the permissions seeing as he is running the command on the client[/QUOTE] You could still add a ULX permission check but have it easier to be done using Kill(), yeah it's more of a headache but still, not having to deal with concommand stuff.
Sorry, you need to Log In to post a reply to this thread.