Hi, I'm making a button in Derma, which I want to make a client get kicked through ULX by pressing it.
However, I'm pretty lost on how I would get around that, but I got a little thought going on..
[CODE]button.DoClick = function() RunConsoleCommand("ulx", "kick", "?", "Reason"); end[/CODE]
I know above won't work, however that should give you an idea about where I'm going, thanks.
Unless the player is an admin, you will need to network to the server. I would use the net library's sending player parameter rather than writing your own entity to reduce exploits.
Alright, I'll try my way through networking, even though I'll probably have to improve my knowledge on that subject before I start ^^.
- Wrong -
[QUOTE=The Beta;43838574]Hi, I'm making a button in Derma, which I want to make a client get kicked through ULX by pressing it.
However, I'm pretty lost on how I would get around that, but I got a little thought going on..
[CODE]button.DoClick = function() RunConsoleCommand("ulx", "kick", "?", "Reason"); end[/CODE]
I know above won't work, however that should give you an idea about where I'm going, thanks.[/QUOTE]
[lua]
ply = self.Player
button.DoClick = function() RunConsoleCommand( "ulx", "kick", ply:Nick(), "You were kicked") end [/lua]
Of course your going to need it to be attached to a person so if the button is already registered to a LocalPlayer than this code will work fine.
For example I would set it up to where is display's a list of all connected players on the server, having a tiny DermaMenu() Pop up on DoRightClick() and have the code line as one of the DermaMenu() options.
Hope I helped.
Sorry, you need to Log In to post a reply to this thread.