Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

(Resolved)Swear Filter?


Colonello
 Share

Recommended Posts

Im about to start on a new project once I get back from vacation so I'm preplanning using my phone but on the more on topic side can anyone send me a link to or make a tutorial for a swear filter I want my game to be kid friendly so that people aren't swearing their heads off
Link to comment
Share on other sites

Pulled this from a mirage tutorial.

```
Public Function CheckMessage(Index As Long, Msg As String)
Dim kArray() As String
Dim Swears As String
Dim i As Integer
Dim SwearChar As String

    Swears = "ass,f**k,sh*t,female dog,damn,"
    kArray = Split(Swears, ",")

    SwearChar = "*"

    ' Thanks to Classified For Help with the Full Word Replacement
    For i = 0 To UBound(kArray)
        If InStr(LCase(Msg$), LCase(kArray(i))) Then
              Msg$ = Replace$(LCase(Msg$), LCase(kArray(i)), LCase(String(Len(kArray(i)), SwearChar)))
        End If
    Next i
End Function
```
Add this in the handle message sub.

```
Call CheckMessage(Index, Msg)
```
Would of wrote one myself, but considering that one is already out there and usable i just dug it up :p
Link to comment
Share on other sites

```
http://www.touchofdeathforums.com/smf2/index.php/topic,74678.0.html
```Swearing filter ^

You can find a list of most of the tutorials people post here at this link
http://www.touchofdeathforums.com/smf2/index.php/topic,75901.0.html
Link to comment
Share on other sites

@Sigridunset:

> ```
> http://www.touchofdeathforums.com/smf2/index.php/topic,74678.0.html
> ```Swearing filter ^
>
> You can find a list of most of the tutorials people post here at this link
> http://www.touchofdeathforums.com/smf2/index.php/topic,75901.0.html

Why in the hell did you just post the same thing i did?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...