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

Check knife cl_righthand


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SID12
Junior Member
Join Date: May 2019
Old 09-17-2019 , 11:30   Check knife cl_righthand
Reply With Quote #1

So I was wondering if there is a way to check if the client has cl_righthand "1/0" if so can someone please tell me how can I check this
SID12 is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-17-2019 , 12:05   Re: Check knife cl_righthand
Reply With Quote #2

yes , query_client_cvar
LearninG is offline
SID12
Junior Member
Join Date: May 2019
Old 09-17-2019 , 12:08   Re: Check knife cl_righthand
Reply With Quote #3

And how would i use it properly like if(query_client_cvar) something can you explain or is there anywhere I can find this?
SID12 is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-17-2019 , 12:27   Re: Check knife cl_righthand
Reply With Quote #4

Code:
#include <amxmodx> public plugin_init() {     register_plugin("query client cvar example" , "1.0" , "LearninG")     register_clcmd("say /test" , "test") } public test(id) {     query_client_cvar(id , "cl_righthand" , "Handler") } public Handler(id , const szCvar[] , const szValue[]) {     new value = str_to_num(szValue)     client_print(id , print_chat , "[AMXX] cl_righthand is %d" , value) }
if you want to check the value :
Code:
if(value == 1) {     //do your code } else {     //do your code }

Last edited by LearninG; 09-17-2019 at 12:32.
LearninG is offline
SID12
Junior Member
Join Date: May 2019
Old 09-17-2019 , 12:43   Re: Check knife cl_righthand
Reply With Quote #5

Oh that was it thx a lot
SID12 is offline
Reply


Thread Tools
Display Modes

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 08:57.


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