Raised This Month: $433 Target: $400
 108% 

plugin doesnt work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jookerx0
New Member
Join Date: Jan 2020
Old 01-15-2020 , 11:06   plugin doesnt work
Reply With Quote #1

hello im new here
i have problem with using plugin which after compile . in game will not work and giving me this error:


L 01/15/2020 - 19:19:56: Client CVAR querying is not enabled - check MM version!
L 01/15/2020 - 19:19:56: [AMXX] Run time error 10 (plugin "my.amxx") (native "query_client_cvar") - debug not enable

then after i turn on debug it will show this error:


L 01/15/2020 - 19:24:11: Client CVAR querying is not enabled - check MM version!
L 01/15/2020 - 19:24:11: [AMXX] Displaying debug trace (plugin "my.amxx")
L 01/15/2020 - 19:24:11: [AMXX] Run time error 10: native error (native "query_client_cvar")
L 01/15/2020 - 19:24:11: [AMXX] [0] my.sma::fps_check (line 29)


i want to block clients about using developer 1 (only developer 0 allowed)
and if they used "developer 1" then kick/ban them from server

im using this source code:

HTML Code:
#include <amxmodx>

#define MAXPLAYERS	32

new max_reset
new count[MAXPLAYERS+1]

public plugin_init() {
	register_plugin("Developer 0", "1.0", "connor")
	max_reset = register_cvar("max_bad_value", "5")
}

public plugin_cfg() {
	set_task(5.0, "fps_check", _, _, _, "b")
}

public client_connect(id) {
	count[id] = 0
}

public client_disconnect(id) {
	count[id] = 0
}

public fps_check() {
	new players[MAXPLAYERS], inum
	get_players(players, inum, "ch") //don't collect BOTs & HLTVs
	for(new i; i<inum; ++i)
		query_client_cvar(players[i] , "developer" , "cvar_result")
}

public cvar_result(id, const cvar[], const value[])
{
	if(equal(value, "Bad CVAR request"))
	{
		server_cmd("kick #%d Please remove the alias that blocks fps_max or developer cvar", get_user_userid(id))
	}

	new iValue = str_to_num(value)

	if(!iValue)
		return

	client_cmd(id, "developer 0")
	client_print(id, print_chat, "Your ^"developer^" cvar has been set to 0, don't touch it")
	count[id]++
	
	if(count[id] >= get_pcvar_num(max_reset))
		server_cmd("kick #%d You have bad cvar values to play on this server", get_user_userid(id))
}
thanks.
jookerx0 is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-15-2020 , 12:26   Re: plugin doesnt work
Reply With Quote #2

I think this error is related with non-steam version of server.
What is the server specifications?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
jookerx0
New Member
Join Date: Jan 2020
Old 01-15-2020 , 15:01   Re: plugin doesnt work
Reply With Quote #3

Quote:
Originally Posted by ^SmileY View Post
I think this error is related with non-steam version of server.
What is the server specifications?
yes my server is non-steam
but i saw some other servers did
so is it possible to i have this feature (block developer 1) in non-steam servers?

thanks for reply
jookerx0 is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-15-2020 , 17:08   Re: plugin doesnt work
Reply With Quote #4

Non-Steam is not supported on this forum.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-15-2020 , 17:54   Re: plugin doesnt work
Reply With Quote #5

Developer is blocked anyways by Valve now, the only thing that works to get higher than 101 fps, is fps_override. No idea if this also applies for non-steam, but at least it is for steam and therefore this plugin would be useless.
__________________


My Plugins:
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-16-2020 , 06:59   Re: plugin doesnt work
Reply With Quote #6

Quote:
Originally Posted by Napoleon_be View Post
Developer is blocked anyways by Valve now, the only thing that works to get higher than 101 fps, is fps_override. No idea if this also applies for non-steam, but at least it is for steam and therefore this plugin would be useless.
Not for non-steam clients!
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-16-2020 , 07:54   Re: plugin doesnt work
Reply With Quote #7

Quote:
Originally Posted by ^SmileY View Post
Not for non-steam clients!
No support then obviously
__________________


My Plugins:
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-16-2020 , 13:07   Re: plugin doesnt work
Reply With Quote #8

Quote:
Originally Posted by Napoleon_be View Post
No support then obviously
Some Non-Steam client still support developer, i do not know how.
Even the updated one
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 18:03.


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