AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get bool from other plugin (https://forums.alliedmods.net/showthread.php?t=163486)

avril-lavigne 07-30-2011 22:51

get bool from other plugin
 
I m using 2 different armors * but 2 similar plugins/

I dont want that player could use BOTH armors.
so can I retreive bool from 2nd plugin? and if has=yes,has=yes { make the second bool - false

Exolent[jNr] 07-30-2011 22:57

Re: get bool from other plugin
 
Quote:

Originally Posted by avril-lavigne (Post 1522282)
I m using 2 different armors * but 2 similar plugins/

I dont want that player could use BOTH armors.
so can I retreive bool from 2nd plugin? and if has=yes,has=yes { make the second bool - false

Use XVars.

fysiks 07-31-2011 00:12

Re: get bool from other plugin
 
But, remember it won't work on arrays. I'm guessing both plugins use an array for storing player usage.

Nyuszy 07-31-2011 05:47

Re: get bool from other plugin
 
http://forums.alliedmods.net/showthread.php?t=159941

avril-lavigne 07-31-2011 07:31

Re: get bool from other plugin
 
thanks Ill try xvars

Hunter-Digital 07-31-2011 08:38

Re: get bool from other plugin
 
If you only store booleans you can use a single variable as a bitsum for all players and use that variable as a xvar.

Bugsy 07-31-2011 09:27

Re: get bool from other plugin
 
Quote:

Originally Posted by Hunter-Digital (Post 1522510)
If you only store booleans you can use a single variable as a bitsum for all players and use that variable as a xvar.

I agree with this idea, if you need two separate bool vars for all players just use 2 xvars.

http://forums.alliedmods.net/showthread.php?t=139916
http://forums.alliedmods.net/showthread.php?t=138880

fysiks 07-31-2011 16:04

Re: get bool from other plugin
 
Quote:

Originally Posted by Hunter-Digital (Post 1522510)
If you only store booleans you can use a single variable as a bitsum for all players and use that variable as a xvar.

Yep, that's a good idea. I think I would use this before using a native if no additional functionality was required. Good advice Hunter.


All times are GMT -4. The time now is 03:26.

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