General > Developers Corner
Name Checker/Kick
Decicus:
Happy to help another member around these forums.
Decicus:
So I tried adding ulx.asay, but I couldn't get it to work with this. I don't really understand the "calling_ply" part of it. I know that's whoever uses the command to say something in admin chat, but I can't get it to work with the kick thing. Any help with that?
MrPresident:
You could just do this.
--- Code: ---for _, a in pairs( player.GetAll() ) do
if a:query( "ulx seeasay" ) then
ULib.tsay( a, "Autokicked player: " .. ply:Nick() .. " for having the string (" .. v .. ") in their name." )
end
end
--- End code ---
This will send a message to all connected admins who can see asay messages when a player gets kicked for having a restricted string in their name.
Decicus:
Thanks, MrP.
JamminR:
I forgot (Garry?)Gmod stopped allowing name changes in game using server console.
Or was that all Source servers, and Valve tied it into Steam only?
Which makes me think .. aloud even.
What about something that would set a global server variable ply:fakename = <name input using some console command>.
Then something like
OldNick = Nick()
function Nick(ply)
return ply:fakenick
end
I've overridden Gmod functions before, quite a bit rusty as to if it can still be done and best way though.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version