Raised This Month: $ Target: $400
 0% 

Message still getting displayed after reconnecting.


  
 
 
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 , 05:47   Message still getting displayed after reconnecting.
Reply With Quote #1

I edited a plugin by GuskiS which kicks players using minmodels.. I added a message which would be displayed to the players in the server that the player is using minmodels.. but when the player reconnects after removing minmodels then also the message gets displayed.

I hope you understand what am saying.

Thanks!

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

public plugin_init()
{
#define PLUGIN		"Block Minmodels"
#define VERSION		"2.0"
#define AUTHOR		"GuskiS"

register_plugin(PLUGIN, VERSION, AUTHOR);
}


public client_disconnect(id)
{
	if(task_exists(id))
		remove_task(id);
}

public client_putinserver(id)
{
	if(!is_user_bot(id) && !is_user_hltv(id))
		set_task(5.0, "query_him", id);
}

public query_him(id)
	if(is_user_connected(id))
		query_client_cvar(id, "cl_minmodels", "Query_Results");

public Query_Results(id, const cvar[], const val[])
{
	if(floatstr(val) == 1.0)
		server_cmd( "kick #%i %s", get_user_userid(id), "Stop using cl_minmodels 1!");
		
	{
	    new name[33]
		get_user_name(id, name, 32)
		ColorChat(0, print_chat, "^3[^4AMXX^3] ^3%s ^1Just Tried To Use ^4MinModels ^1And Got Kicked.", name)

	}

	if(!task_exists(id))
		set_task(2.0, "query_him", id, _, _, "b");
		

}

Last edited by Akshat; 11-12-2014 at 05:51.
Akshat is offline
Send a message via Skype™ to Akshat
 


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:34.


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