censoring system

  • Thread starter Deleted member 9590
  • Start date
  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
D

Deleted member 9590

Skript Version: 2.5-alpha2
Skript Author: Bensku
Minecraft Version: 1.12.2

Hello, I have a gang skript, and I obiously don't want people to use bad profanity as their gang names, so therefor I made a list variable of names that is not allowed, and this is how I check if a player tries to use one of the not allowed names
Code:
if {censur::*} contains message:

so ex. if a player tries to name their gang "fuck", it will deny the creation of the gang, but there is an very easy workaround for that. Say a player instead of "fuck" writes "xfuck", the creation is not canceled. I can't think of a workaround for this, any suggestions?
 
Code:
function checkBlacklist(l: list, check: string):
        loop {_list::*}:
                if {_check} contains loop-value:
                return true
        return false
Try that
[doublepost=1589145084,1589144932][/doublepost]
Code:
if checkBlacklist({urblacklisthere::*}, message) is true:
        send "choose another name"
So yea
 
"ERROR Cannot recognise the type 'list' (bande.sk, line 28: function checkBlacklist(l: list, check: string):')"
 
Code:
function checkBlacklist(l: objects, check: string) :: boolean:
        loop {_list::*}:
                if "%{_check}%" contains "%loop-value%":
                        return true
        return false
Should work now
 
Last edited:
Code:
function checkBlacklist(l: objects, check: object) :: boolean:
        loop {_list::*}:
                if "%{_check}%" contains "%loop-value%":
                        return true
                return false
Should work now
Well now it just doesn't work at all. No errors though
[doublepost=1589223980,1589214783][/doublepost]also, for some reason the name is added twice to the {bb::*} list, even though it is only added once..
Code:
        if player's balance is more than or equal to 5000:
            set {bb::%uuid of player%} to message
            set {bb::%message%::oprettet} to now
            set {bb::%message%::message} to message
            add message to {bb::*}
            add uuid of player to {bb::%message%::medlemmer::*}
            add player to {bb::%message%::pmedlemmer::*}
            set {bb::%message%::ejer} to uuid of player
            set {bb::%message%::%uuid of player%::rangnummer} to 4
            set {bb::%message%::level} to 1
            set {bb::%message%::bankkonto} to 0
            set {bb::%message%::kills} to 0
            set {bb::%message%::deahts} to 0
            set {bb::%message%::vagtkills} to 0
            set {bb::%message%::damage} to 100
            set {bb::%message%::maxmedlemmer} to 3

any idea why??
 
Status
Not open for further replies.