Raised This Month: $ Target: $400
 0% 

Message still getting displayed after reconnecting.


Post New Thread Reply   
 
Thread Tools Display Modes
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
Akshat
Senior Member
Join Date: Feb 2013
Location: India, Jaipur.
Old 11-12-2014 , 10:54   Re: Message still getting displayed after reconnecting.
Reply With Quote #2

Solved.
Akshat is offline
Send a message via Skype™ to Akshat
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 11-15-2014 , 07:53   Re: Message still getting displayed after reconnecting.
Reply With Quote #3

your plugin is easy to bypass, btw, by setting the cvar 5 seconds after you connected
do a set_task instead and go trough all the players
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
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 17:34.


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