Raised This Month: $ Target: $400
 0% 

how to get CPU Stat?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lucky109
Senior Member
Join Date: Jan 2005
Old 08-04-2007 , 07:13   how to get CPU Stat?
Reply With Quote #1

as title....
i want to show CPU Loading..like : 75% Loading

Last edited by lucky109; 08-04-2007 at 07:57.
lucky109 is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 08-04-2007 , 19:42   Re: how to get CPU Stat?
Reply With Quote #2

Code:
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	set_task(5.0, "Stats", 0,"",0, "b")
}
public Stats()
{
	new Stat = get_cvar_string("stats")
	set_hudmessage(0, 255, 0, 0.02.0, 0.66, 0, 6.0, 12.0)
	show_hudmessage(id, "%s", Stat)

	
}
this will mostly not work cuz the command stats print's 2 lines
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-04-2007 , 22:00   Re: how to get CPU Stat?
Reply With Quote #3

Yeah, that and the fact that there is no cvar named stats and you are using get_cvar_string incorrectly. stats is a console command.

Also, your code has tons of errors. I suggest looking up some of the basics before you try to help someone.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 09:10.


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