Raised This Month: $ Target: $400
 0% 

retrieving vars from other plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VarmVaffel
Member
Join Date: Feb 2005
Location: Norway
Old 03-16-2005 , 13:49   retrieving vars from other plugins
Reply With Quote #1

How can I retrieve a full array, or a var inside of an array from another plugin?

VV
VarmVaffel is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-16-2005 , 22:11  
Reply With Quote #2

Code:
// this goes in the plugin you want to receive FROM public return_variable() {   return the_variable_here; }

Code:
// this goes in the plugin you want to receive WITH public get_variable() {    callfunc_begin("return_variable","plugin_file.amxx");    new the_variable_here = callfunc_end(); }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
VarmVaffel
Member
Join Date: Feb 2005
Location: Norway
Old 03-17-2005 , 05:03  
Reply With Quote #3

alright thanks m8!

But isn't there any way to do this without changing the plugin we should receive the var from?
VarmVaffel is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-17-2005 , 13:37  
Reply With Quote #4

Yes.

Code:
    new holder_for_variable     if(xvar_exists ( "variable_you_want" ) ) holder_for_variable = get_xvar_num (  get_xvar_id ( variable_you_want ) )

You can use the xvar natives.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 14:16.


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