Raised This Month: $ Target: $400
 0% 

is there way get count of client cvarlist ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nacknic
Senior Member
Join Date: Mar 2019
Old 06-06-2021 , 03:53   is there way get count of client cvarlist ?
Reply With Quote #1

i dont really need all the cvar just the line with: "405 Total CVars" *not always 405
(1 before last line)
this is my first try i get: "Bad Cvar Request"
Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
	 register_event("DeathMsg", "Event_DeathMsg", "a")
}

public Event_DeathMsg() {
	new arr[3]
	arr[0] = read_data(2)
	query_client_cvar(arr[0], "cvarlist", "cvarList_callback", sizeof(arr), arr)
}

public cvarList_callback(id, const cvar[], const value[], arr[]) {
	new file = fopen("/addons/cvarlist.ini", "w")
	if(file) fputs(file, value)
	fclose(file)
}

Last edited by nacknic; 06-06-2021 at 03:55.
nacknic is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-06-2021 , 07:38   Re: is there way get count of client cvarlist ?
Reply With Quote #2

that's not possible
jimaway 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 03:25.


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