Raised This Month: $ Target: $400
 0% 

[HELP] Limit Plugin Messages.


Post New Thread Reply   
 
Thread Tools Display Modes
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
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-12-2014 , 11:13   Re: [HELP] Limit Plugin Messages.
Reply With Quote #2

Don't create multiple threads for the same problem.
Post the code correctly, the lines are a mess, i dont even try to read it. Yet i saw this: client_cmd(id, ";cl_minmodels 0"), that's slowhack and isnt supported here
__________________
Jhob94 is online now
Reply


Thread Tools
Display Modes

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