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

[EO] Swear filter Upgrade


lexkymbeth
 Share

Recommended Posts

[added Send to sever] "Sends msg to sever if its bad. Like if you want to mute them or what ever
[added Let admins swear]

if you have swear filter replace with this code:
```
Public Function CheckForSwears(Index As Long, Msg As String)
' #########
' ###SFS###
' #########
' Edits by Lex
Dim SplitStr() As String
Dim SwearWords As String
Dim i As Integer

' alow admins swear
If GetPlayerAccess(Index) > 3 Then
Exit Function
End If

    '  There are NO spaces between each swear.
    SwearWords = "test,test2"
    SplitStr = Split(SwearWords, ",")

        ' log and star bad words
    For i = 0 To UBound(SplitStr)
        If InStr(1, LCase(Msg$), SplitStr(i), 1) Then
        Call TextAdd(GetPlayerName(Index) & " said: " & Msg & " !!!!!")
              Msg = Replace$((Msg), (SplitStr(i)), LCase(String(Len(SplitStr(i)), "*")), , , 1)
        End If
    Next i
    End Function
```
if you don't have Swear filter
[http://www.touchofdeathforums.com/smf/index.php/topic,74678.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,74678.0.html)

Any problums? Post :p
Link to comment
Share on other sites

@greendixy:

> I am getting an error it highlights  TextAdd on this line
>
> ```
> Call TextAdd(GetPlayerName(Index) & " said: " & Msg & " !!!!!", QBColor(BrightRed))
> ```
> no errors with original way

TextAdd has nothing to do with this tutorial, copy/paste it from a clean EO into your source.
Link to comment
Share on other sites

@greendixy:

> I am getting an error it highlights  TextAdd on this line
>
> ```
> Call TextAdd(GetPlayerName(Index) & " said: " & Msg & " !!!!!", QBColor(BrightRed))
> ```
> no errors with original way

this should be in your sever. textadd post a msg to sever try..
```
Call TextAdd(GetPlayerName(Index) & " said: " & Msg & " !!!!!")
```color code works on mying but nor others
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...