20-09-2008, 10:01 AM
Originaly Created by Obsidian
Edited and refined by William
Difficulty: 1/5
Functionality: Works for all versions of MS.
Introduction
A standared simple client side swear filter that's added in 2-5minutes easily.
Client Side
Add this at the bottom of modGameLogic:
Now search for all the different messages: adminmsg, saymsg, broadcastmsg, globalmsg, playermsg, mapmsg.
And do this on all of them:
Replace it with:
And of course you shouldn't replace the saymsg call with a globalmsg call...
Good Luck And have Fun
Edited and refined by William
Difficulty: 1/5
Functionality: Works for all versions of MS.
Introduction
A standared simple client side swear filter that's added in 2-5minutes easily.
Client Side
Add this at the bottom of modGameLogic:
Code:
Public Function CheckMessage(byval Msg As String) As String
Dim kArray() As String
Dim Swears As String
Dim i As Integer
Dim SwearChar As String
Swears = "ass,fuck,shit,bitch,damn,cunt,whore,piss,jesus,god"
kArray = Split(Swears, ",")
SwearChar = "*"
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
CheckMessage = Msg
End Function
Now search for all the different messages: adminmsg, saymsg, broadcastmsg, globalmsg, playermsg, mapmsg.
And do this on all of them:
Code:
Call GlobalMsg(ChatText)
Code:
Call GlobalMsg(CheckMessage(ChatText))
Good Luck And have Fun