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

Share array between plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kom64t
Junior Member
Join Date: Apr 2016
Old 04-15-2016 , 08:27   Share array between plugins
Reply With Quote #1

Is it possible to exchange data between the plug-ins.
For example:
1 plugin handles player_death event. In the cycle of checking how many living and dead players on each team.
The plug 2 has to do the same cycle to obtain the same information.
There is the possibility to share the same information between plugins.
How much slower this mechanism?
Kom64t is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 04-15-2016 , 08:35   Re: Share array between plugins
Reply With Quote #2

Take a look at forwards and natives. I can't imagine this having a notable speed difference.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 04-15-2016 , 17:56   Re: Share array between plugins
Reply With Quote #3

Click the dynamic objects link in my sig...

Code:
	// Creating dynamic objects is straight foward
	Dynamic someobj = Dynamic();

	// You can name a dynamic object
	someobj.SetName("someobj");

	// So another plugin can access it like so
	someobj = Dynamic.FindByName("someobj");
__________________

Last edited by Neuro Toxin; 04-15-2016 at 17:59.
Neuro Toxin is offline
Kom64t
Junior Member
Join Date: Apr 2016
Old 04-18-2016 , 15:23   Re: Share array between plugins
Reply With Quote #4

Quote:
Originally Posted by mottzi View Post
Take a look at forwards and natives. I can't imagine this having a notable speed difference.
Can you direct me to doc or example plugin ?
Kom64t is offline
ofir753
Senior Member
Join Date: Aug 2012
Old 04-18-2016 , 15:28   Re: Share array between plugins
Reply With Quote #5

Quote:
Originally Posted by Kom64t View Post
Can you direct me to doc or example plugin ?
https://sm.alliedmods.net/new-api/fu...SetNativeArray
ofir753 is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 04-18-2016 , 19:44   Re: Share array between plugins
Reply With Quote #6

Or you can pass a Handle with natives or forwards (to pass ADT arrays for example).
__________________
zipcore is offline
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 01:32.


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