Author Topic: This thread's OP is a lua n00b  (Read 10120 times)

0 Members and 1 Guest are viewing this topic.

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: This thread's OP is a lua n00b
« Reply #30 on: January 12, 2014, 08:30:22 AM »
No, Ven, I am afraid I don't know lua but I am trying to pick things up from you guys on this thread and the other thread. I am using Eccid's code but commenting out the kick part, like he did originally. What I want is to just censor all players except mod, admin, sadmin, owner. No kicks or bans for anyone. So all I have to fix is how Eccid's code currently censors those groups.
Make sure that owner inherits from superadmin, it will save you a ton of trouble. Owner can still have its own permissions, but anything that applies to superadmins, will apply to owner. For moderators, change line 17 of my code from:
Code: [Select]
if (ply:IsAdmin() and not KickWords.admins) or (ply:IsSuperAdmin() and not KickWords.sadmins) then return text endto this:
Code: [Select]
if ((ply:IsAdmin() or ply:IsUserGroup("moderator")) and not KickWords.admins) or (ply:IsSuperAdmin() and not KickWords.sadmins) then return text end
make sure ply:IsUserGroup("moderator") has the exact name of your moderator group
« Last Edit: January 12, 2014, 08:32:19 AM by Eccid »

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: This thread's OP is a lua n00b
« Reply #31 on: January 12, 2014, 09:00:07 AM »
Hmm it still seems to be censoring all groups.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: This thread's OP is a lua n00b
« Reply #32 on: January 12, 2014, 11:14:37 AM »
Have you tried my version? (Not the one I posted, the Eccid'ified one, CenKik.)

It's overall the same, plus you can disable kicking and/or censoring.
Out of the Garry's Mod business.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: This thread's OP is a lua n00b
« Reply #33 on: January 12, 2014, 11:31:26 AM »
I saw your version but i thought it was a work in process. i didnt know which to take. I have this one all set up, I just need to reconcile the admin-censor thing.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: This thread's OP is a lua n00b
« Reply #34 on: January 12, 2014, 11:43:40 AM »
Nah, the CenKik version Eccid posted is finished.
Out of the Garry's Mod business.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: This thread's OP is a lua n00b
« Reply #35 on: January 13, 2014, 09:37:36 AM »
Thanks Neku! Your script works great and I will be putting it on 11 servers (I assume it will work on all gamemodes).  I have to make it not censor moderators so can I just take the "admin" part of the code and change it to moderator? Or will that screw things up? Also, I have the same problem as before - if you censor "hello", it will let "Hello" or HELLO" through. The script is case sensitive.
« Last Edit: January 13, 2014, 09:47:44 AM by Storm »

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: This thread's OP is a lua n00b
« Reply #36 on: January 14, 2014, 05:30:38 PM »
Thanks Neku! Your script works great and I will be putting it on 11 servers (I assume it will work on all gamemodes).  I have to make it not censor moderators so can I just take the "admin" part of the code and change it to moderator? Or will that screw things up? Also, I have the same problem as before - if you censor "hello", it will let "Hello" or HELLO" through. The script is case sensitive.

This should be talked about here:
http://forums.ulyssesmod.net/index.php/topic,6938.0.html

Storm, I pretty much added what you needed in the new addon.
Out of the Garry's Mod business.