I’d like a lua script to block the CMDs I put into the script, for say if a client types ‘hi’ into console, it will ban them/kick them(Kick preferably). Thanks
goes to autorun/server
concommand.Add(“Hi”, function(ply, cmd, args)
I dont think that’s what he wants.
If he has a command to activate something, forexample rp_money 500 or something, he doesent want people to be able to write that.
Why should only admins be able to kick themselves? :colbert:
On-topic, your best bet would probably be gm_slog.
if not ply:IsAdmin()
I was tired, okay?
Say, if somebody types +hacks, then it will kick them
function AntiHax() ply:Kick("No hax!") end concommand.Add( "+hack", AntiHax ) concommand.Add( "+hacks", AntiHax ) concommand.Add( "+hax", AntiHax ) concommand.Add( "haxors", AntiHax )
Isn’t that Server-Sided?
You’re trying to kick someone from a random server as a player?
Even if you’re talking about your server /facepalm…
Fixed she missed ply.
Nobody in this thread seems to realise that adding a command serverside will only be useful if the command doesn’t exist on the client.
Sourcenet “ProcessNetCMD” hook (or a similarly named hook) is what you want.
Still blocks it either way.
Thanks for that. How can I make it check CVars and if they do not match, it will kick them/ban them?
Notice: Baconbot users do not get banned for using +Bacon_Menu
They changed the Console Command in V4, you can still detect by using other stuff though like file checking ect.
It’s the same. lol
How do you file check etc?
You forgot the ply argument… :3
Cubar Fixed it
Cubar pointed that out earlier, and yea… :eng99: