Raised This Month: $ Target: $400
 0% 

is possible get Renderer mod of client?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
padilha007
Senior Member
Join Date: Jul 2008
Old 01-07-2009 , 19:49   is possible get Renderer mod of client?
Reply With Quote #1

i need get if is:

OpenGL
software


possible? if not i have one problem...

i use rendering to make one player invisible, if the user is on software him see the invisisble player
__________________

padilha007 is offline
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
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-07-2009 , 22:35   Re: is possible get Renderer mod of client?
Reply With Quote #3

Quote:
Originally Posted by MPNumB View Post
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 ")); 
query_client_cvar does not take any aliases into account. The cvar check is guaranteed to work ,what's not is setting it through client_cmd.
__________________

Community / No support through PM
danielkza is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-07-2009 , 22:40   Re: is possible get Renderer mod of client?
Reply With Quote #4

I know it doesnt... I was saying that for example:

If client used cmd:

alias r_drawviewmodel".

than after making cvar check it will return "Bad CVAR request".
__________________
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.
MPNumB is offline
Send a message via Skype™ to MPNumB
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-07-2009 , 22:50   Re: is possible get Renderer mod of client?
Reply With Quote #5

Quote:
Originally Posted by MPNumB View Post
I know it doesnt... I was saying that for example:

If client used cmd:

alias r_drawviewmodel".

than after making cvar check it will return "Bad CVAR request".
It won't, just tested, and this prints the correct cvar value of 300 (what it was before I typed /decals)
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_clcmd("say /decals""cmdDecals")
}

public 
cmdDecals(id)
{
    
client_cmd(id"alias r_decals randomshit")
    
query_client_cvar(id"r_decals""CVarCheck_Handler")
}

public 
CVarCheck_Handler(idszCvar[], szValue[])
{
    
client_print(idprint_chat"%s = %s"szCvarszValue)

__________________

Community / No support through PM
danielkza is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 01-07-2009 , 23:37   Re: is possible get Renderer mod of client?
Reply With Quote #6

a code sets the other?

tnx in advance
__________________

padilha007 is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-07-2009 , 23:38   Re: is possible get Renderer mod of client?
Reply With Quote #7

Quote:
Originally Posted by padilha007 View Post
a code sets the other?

tnx in advance
Didn't get what you mean. What code, and what other code?
__________________

Community / No support through PM
danielkza is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 01-08-2009 , 01:48   Re: is possible get Renderer mod of client?
Reply With Quote #8

i get both?
__________________

padilha007 is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 01-08-2009 , 22:30   Re: is possible get Renderer mod of client?
Reply With Quote #9

dont work your code MPNumB
__________________

padilha007 is offline
Old 01-09-2009, 18:50
padilha007
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Old 01-13-2009, 09:22
padilha007
This message has been deleted by YamiKaitou. Reason: bump
padilha007
Senior Member
Join Date: Jul 2008
Old 01-29-2009 , 17:17   Re: is possible get Renderer mod of client?
Reply With Quote #10

bump
__________________

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


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