Raised This Month: $ Target: $400
 0% 

Access variables in other plugins?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
XeroXer
Junior Member
Join Date: Sep 2006
Location: Västerås, Sweden
Old 09-06-2008 , 08:06   Access variables in other plugins?
Reply With Quote #1

Hi all!

On my server I have a lot of different plugins running and most of them all access the ip, steamid and an id from my database for every user.
Since this makes a lot of the same variables in the different plugins I was thinking that maybe there is a better way.

Can I in plugin 1 access a variable set in plugin 2?
I know about the callfunc but I want to get to the variable without calling a function for it.

So in globalvars.amxx I create:
PHP Code:
new playerDbId[32], playerSteamId[32], playerIp[32]; 
I then sen these to the correct information when the user connects, and reset them at disconnect.

Now in savedeaths.amxx I want to save that the player XeroXer dies.
I then want to send it to the database with his db id.
Can I then access the playerDbId[id] from globalvars.amxx?

Any help and/or suggestions are welcome...
__________________
::: From the Gates of Hell :::
XeroXer is offline
Send a message via ICQ to XeroXer Send a message via AIM to XeroXer Send a message via MSN to XeroXer
 



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:17.


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