Raised This Month: $ Target: $400
 0% 

Condition on cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
shadow728988
Member
Join Date: Sep 2017
Old 01-01-2020 , 03:27   Re: Condition on cvar
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
From a psuedo-code perspective it looks fine, you are retrieving the cvar pointer from an existing cvar at plugin_init() and using it in your menu callback. Is it not working? Did you debug at all by console/server printing the get_pcvar_num() return value?
No it wasnt working then but i made it work as i registered this cvar as initial value 0 and then used get_pcvar_num

Code:
public plugin_init()
 {
   cvar_race= register_cvat ("fl_on","0")
}
   and then used
    if(get_pcvar_num(cvar_race)==1)
      {
         //statements
}
thank you for your help..

Last edited by Bugsy; 01-01-2020 at 14:21.
shadow728988 is offline
 



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 02:43.


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