Raised This Month: $ Target: $400
 0% 

block symbols


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
giumbalau
Member
Join Date: Jan 2021
Old 05-08-2021 , 16:28   block symbols
Reply With Quote #1

Can anyone add the white list function to this plugin please ?
like white_list.ini

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "Block symbols"
#define VERSION "1.0"
#define AUTHOR ""

new const g_prefix[] = "=[PROTECT]"

new const symbols[] =
{
"!",
"#",
"*",
"(",
")",
"-",
"_",
"+",
"=",
"{",
"}",
"[",
"]",
"|",
"\",
"
/",
"
:",
"
;",
"
,",
"
~",
"
`",
"<",
">",
"ï¼…s0 114",
"%",
"&"
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say","handle_say")
register_clcmd("say_team","handle_say")
}

public handle_say(id)
{
new arg[256]
read_args(arg,255)
remove_quotes(arg)
trim(arg)

if(arg[0] =='^0' || !strlen(arg)) return PLUGIN_HANDLED

for(new i=0;i<charsmax(symbols);i++)
if(containi(arg,symbols[i]) != -1)
{
ColorChat(id,GREEN,"^x04%s^x03Your chat message can not contain ^4symbols^x03 or^x04 advertising words",g_prefix)
return PLUGIN_HANDLED
}



return PLUGIN_CONTINUE


Last edited by giumbalau; 05-08-2021 at 16:29.
giumbalau is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode