Raised This Month: $ Target: $400
 0% 

is possible get Renderer mod of client?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-07-2009 , 22:15   Re: is possible get Renderer mod of client?
Reply With Quote #2

Possible, but not 100% currect (client can just alias the cvar and...). Here is my example:

PHP Code:
#include <amxmodx>
 
#define PLUGIN_NAME    "Get My 3D Settings"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR  "Numb"
 
#define OPENGL_CVAR "gl_clear" // NOTE: if used aliased selected cvar, data will be stored as if user is not using OpenGL
 
new bool:g_bIsUserOpenGL[33];
 
public 
plugin_init()
{
 
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);
 
 
register_clcmd("say /opengl""clcmd_opengl");
}
 
public 
client_connect(iPlrId)
{
 
g_bIsUserOpenGL[iPlrId] = false;
 
 if( !
is_user_bot(iPlrId) && !is_user_hltv(iPlrId) )
  
query_client_cvar(iPlrIdOPENGL_CVAR"cvar_result_func");
}
 
public 
cvar_result_func(iPlrId, const iCvar[], const iValue[])
 
g_bIsUserOpenGL[iPlrId] = (equal(iValue"Bad CVAR request")?false:true);
 
public 
clcmd_opengl(iPlrId)
 
client_print(iPlrIdprint_chat"* You are %susing OpenGL 3D setting", (g_bIsUserOpenGL[iPlrId]?"":"NOT ")); 
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.

Last edited by MPNumB; 01-07-2009 at 22:28.
MPNumB is offline
Send a message via Skype™ to MPNumB
 



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:14.


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