Raised This Month: $ Target: $400
 0% 

[HELP] Limit Plugin Messages.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Akshat
Senior Member
Join Date: Feb 2013
Location: India, Jaipur.
Old 11-12-2014 , 11:00   [HELP] Limit Plugin Messages.
Reply With Quote #1

I am using this plugin which blocks cl_minmodels 1 command.. players keep spamming the command in console and the chat gets flooded. Help :/

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

public plugin_init()
{
register_plugin("No MinModels", "2.0" , "GuiSkis")
}

public client_putinserver(id)
{
set_task(5.0, "First_Query", id)
}

public First_Query(id)
{
if ( is_user_connected(id) )
{
query_client_cvar(id, "cl_minmodels", "Cl_MinModels_Value")
}
}

public Cl_MinModels_Value(id, szCvar[], szValue[])
{
if ( is_user_connected(id) )
{
if ( szValue[0] != '0' || szValue[1] )
{


new name[33]
get_user_name(id, name, 32)
ColorChat(0, TEAM_COLOR, "[^4AMXX^3] %s ^1Tried to use ^4MinModels ^1which is not allowed on this server, so it has been set to ^4default^1.", name)
	
	

}
client_cmd(id, ";cl_minmodels 0")
}
query_client_cvar(id, "cl_minmodels", "Cl_MinModels_Value")
}
Akshat is offline
Send a message via Skype™ to Akshat
 



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 17:30.


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