Raised This Month: $ Target: $400
 0% 

Native Boolean?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 06-20-2013 , 06:47   Re: Native Boolean?
Reply With Quote #1

Quote:
Originally Posted by Bos93 View Post
PHP Code:
#include < amxmodx >

#define PLUGIN_NAME        "x"
#define PLUGIN_VERSION    "x"
#define PLUGIN_AUTHOR    "x"

new bool:g_bReturn;

public 
plugin_init( )
{
    
register_plugin 
    

        
PLUGIN_NAME
        
PLUGIN_VERSION
        
PLUGIN_AUTHOR 
    
);
}

public 
plugin_natives()
{
    
register_native("get_bReturn""_get_bReturn_");
}

public 
_get_bReturn_( )
{
    return 
g_bReturn;


Example for other plugins:

native bool:get_bReturn;

if( get_bReturn ) //code
If I will use that like this?
PHP Code:
bool:get_bReturn[33];
public 
plugin_natives()
{
    
register_native("get_bReturn""_get_bReturn_");
}

public 
_get_bReturn_( )
{
    return 
g_bReturn;

Do I have to change something?

Last edited by Unkolix; 06-20-2013 at 06:52.
Unkolix is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 06-20-2013 , 08:07   Re: Native Boolean?
Reply With Quote #2

Quote:
Originally Posted by Unkolix View Post
If I will use that like this?
PHP Code:
bool:get_bReturn[33];
public 
plugin_natives()
{
    
register_native("get_bReturn""_get_bReturn_");
}

public 
_get_bReturn_( )
{
    return 
g_bReturn;

Do I have to change something?
PHP Code:
bool:get_bReturn[33];
public 
plugin_natives()
{
    
register_native("get_bReturn""_get_bReturn_");
}

public 
_get_bReturn_pPlayer )
{
    return 
g_bReturnpPlayer ];

__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
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 11:57.


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