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 , 00:59   Re: Condition on cvar
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
You can also consider the xvar natives

PHP Code:
g_BulletDmgPtr get_cvar_pointer"bullet_dmg" );

if ( 
get_pcvar_numg_BulletDmgPtr ) == )
{
     
//do something

where am i wrong please help..
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>

new g_racePtr

public plugin_init() {

register_clcmd("say /mode", "SelectStyle", ADMIN_BAN)
g_racePtr = get_cvar_pointer( "fl_on" );

}

public SelectStyle(id)
{
    menu created
}

public menu_handle(id)
 {
   switch(item) {

		case 0: {
                                 if ( get_pcvar_num( g_racePtr ) == 1 )
				    {
					 set_hudmessage(0, 255, 255, -1.0, 0.0, 0, 1.0, 7.0, 0.1, 0.2)
					  show_hudmessage(id, "Race is currently on kindly stop the race or wait for it to finish")
				     }
                                                           

//statments to be executed
}
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