Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #replaces bad words in player chat with cheese and noties them they have been censored
- bind(player_chat,null,null,@chatevent,
- assign(@player,@chatevent['player'])
- assign(@msg,to_lower(@chatevent['message']))
- assign(@bw,array('fuck','cunt','nigger','nigga','bitch','ass','whore'))
- assign(@flag,0)
- for(assign(@i,0),lte(@i,6),inc(@i),
- assign(@newmsg,replace(@msg,@bw[@i],'cheese'))
- if(not(equals(@msg,@newmsg)),
- assign(@flag,1)
- )
- assign(@msg,@newmsg)
- )
- if(equals(@flag,1),
- modify_event('message', @msg)
- msg(concat(color(c),'Your chat has been censored'))
- console('chat censored for'@player)
- )
- )
- #censores signs with bad words - erases text and notifies placer
- bind(sign_changed,null,null,@signevent,
- assign(@text,to_lower(@signevent['text']))
- assign(@bw,array('fuck','cunt','nigger','nigga','bitch','ass','whore'))
- assign(@flag,0)
- for(assign(@i,0),lte(@i,6),inc(@i),
- assign(@newmsg,replace(@text,@bw[@i],'cheese'))
- if(not(equals(@text,@newmsg)),
- msg(concat(color(c),'Your sign has been censored'))
- console('sign censored for'@player)
- cancel()
- )
- assign(@text,@newmsg)
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement