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

[HOWTO] Using XVars


Post New Thread Reply   
 
Thread Tools Display Modes
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 09-24-2010 , 17:05   Re: [HOWTO] Using XVars
Reply With Quote #11

Just to make it clear, the public keyword means the variable is exposed to the host, which is AMXx in this case.

Also XVars, unlike CVars, are not part of the engine, they are an AMXx feature.
Seta00 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-24-2010 , 20:22   Re: [HOWTO] Using XVars
Reply With Quote #12

Quote:
Originally Posted by Seta00 View Post
Just to make it clear, the public keyword means the variable is exposed to the host, which is AMXx in this case.

Also XVars, unlike CVars, are not part of the engine, they are an AMXx feature.
I thought that information was implied, but I suppose it would be necessary to be stated.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 09-25-2010 , 03:23   Re: [HOWTO] Using XVars
Reply With Quote #13

Nice, thanks for posting
Vechta is offline
t3hNox
Senior Member
Join Date: Oct 2009
Old 11-20-2010 , 14:14   Re: [HOWTO] Using XVars
Reply With Quote #14

Thanks. This is pretty usefull !
Is there any way to detect when the xvar value is altered in the main plugin ?
t3hNox is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-20-2010 , 14:19   Re: [HOWTO] Using XVars
Reply With Quote #15

Quote:
Originally Posted by t3hNox View Post
Thanks. This is pretty usefull !
Is there any way to detect when the xvar value is altered in the main plugin ?
Probably the only way is to constantly check it's value to see if it has changed but that is not a good idea.
__________________

Last edited by fysiks; 11-20-2010 at 14:22.
fysiks is online now
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-20-2010 , 14:29   Re: [HOWTO] Using XVars
Reply With Quote #16

Quote:
Originally Posted by t3hNox View Post
Thanks. This is pretty usefull !
Is there any way to detect when the xvar value is altered in the main plugin ?
If you want to hook when it's changed, you would be better off using dynamic natives to change a global variable.
Then you would know when the native is called for when it was changed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 08-28-2011 , 08:31   Re: [HOWTO] Using XVars
Reply With Quote #17

thanks Exolent,
i never hear about xvars. but sounds good.
__________________

Working on:
nothing
schmurgel1983 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-03-2012 , 06:45   Re: [HOWTO] Using XVars
Reply With Quote #18

Hey,
Just wanted to try this out but I have a Problem.

In my first Plugin I wrote :

PHP Code:
public bool:g_bHasWH[33
And in my second :

PHP Code:
new bool:g_bHasWH2[33]


public 
plugin_init()
{
    
g_bHasWH2 get_xvar_num(g_bHasWH)

But it says :
Quote:
Error: Undefined symbol "g_bHasWH"
What do I have to do to get it working?
Kia is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-03-2012 , 06:49   Re: [HOWTO] Using XVars
Reply With Quote #19

You can't use xvars with arrays, you will have to use dynamic natives for that.
__________________
Arkshine is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 06-27-2012 , 16:31   Re: [HOWTO] Using XVars
Reply With Quote #20

awesome.
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
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 03:33.


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