Raised This Month: $ Target: $400
 0% 

how to edit this chat plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-28-2017 , 13:33   Re: how to edit this chat plugin
Reply With Quote #1

PHP Code:
#include <amxmodx>

new g_pMaxNumbers

public plugin_init()
{
    
register_plugin("Max Numbers in Chat""1.0""OciXCrom")
    
register_clcmd("say""OnSay")
    
register_clcmd("say_team""OnSay")
    
g_pMaxNumbers register_cvar("mnc_max_numbers""4")
}

public 
OnSay(id)
{
    static 
szArgs[192], szCommand[9], iLeniMaxiNumbersi
    read_args
(szArgscharsmax(szArgs))
    
remove_quotes(szArgs)
    
    
iLen strlen(szArgs)
    
iMax get_pcvar_num(g_pMaxNumbers)
    
iNumbers 0
    
    
for(0iLeni++)
    {
        if(
isdigit(szArgs[i]))
        {
            if(
iNumbers iMax)
                
szArgs[i] = '*'
            
else iNumbers++
        }
    }
    
    if(
iNumbers)
    {
        
read_argv(0szCommandcharsmax(szCommand))
        
engclient_cmd(idszCommandszArgs)
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE

__________________

Last edited by OciXCrom; 03-29-2017 at 10:15.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply



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 18:02.


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