Raised This Month: $51 Target: $400
 12% 

Query cvar from chat


Post New Thread Reply   
 
Thread Tools Display Modes
pRED*
Join Date: Dec 2006
Old 08-19-2008 , 19:51   Re: Query cvar from chat
Reply With Quote #11

%f and GetConVarFloat
pRED* is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 08-19-2008 , 20:27   Re: Query cvar from chat
Reply With Quote #12

<nvm>
berni is offline
jheidt
Junior Member
Join Date: Aug 2008
Old 08-20-2008 , 10:06   Re: Query cvar from chat
Reply With Quote #13

Isnt the plugin version defined as a const String[] in the myinfo struct?
I think so, %f wouldn't work, because a plugin version value can be any string.

%s is the format string for a string, and you can look at the various other values here: http://wiki.alliedmods.net/Format_Cl...eMod_Scripting)

In short, you'll need to know what type of value you are trying to print out to the chat window. The in-memory representation of a value varies depending on its type, which is why you'll need this. You can try to format a integer as a float point value, but it won't be what you expect, and vice versa.
jheidt 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 07:48.


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