multi bools
Hi,
How to use one bool in two plugins. Example : execute a function in plugin 1 if a bool is set to true in plugin 2. thanks. |
Re: multi bools
Use natives.
|
Re: multi bools
Or you can declare the bool as "public" and retreive it via "get_xvar_num". But, yes, it's probably better to use natives.
|
Re: multi bools
Quote:
PHP Code:
PHP Code:
|
Re: multi bools
Code:
/* Code:
#if defined _bazooka_includedCode:
#include <bozooka> |
Re: multi bools
That's because you have to retrieve the value using get_xvar_num(var_index)
And to get the var_index you should use this native get_xvar_id with the name of the variable in the 1st param to return a unquie address of the variable. also declare the variable with 1 cell and use bitsum values to check the player whether has a bazooka or not. Example : PHP Code:
XVars only support cells (integers, floats, bools, etc.). Arrays (including strings, since strings are arrays of characters) cannot be used with XVars, in the other hand Make sure your public variable name is unique and its not repeated that will make confusion if it did. Again if you have read the documentation or even searched you won't need to make a useless thread. |
| All times are GMT -4. The time now is 17:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.