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

Know the value of a plugin variable ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 09-02-2014 , 20:37   Know the value of a plugin variable ?
Reply With Quote #1

Hi,
I am new in modules, so, I don't know if this is possible and how to do it.

For example, Plugin A:
PHP Code:
register_event("HLTV""event__HLTV""a""1=0""2=0");

public 
event__HLTV() {
    
g_NewRound 1;
    
    
remove_task(TASK_DELAY_START);
    
set_task(get_pcvar_float(g_CVAR_DelayStart), "task__StartRound"TASK_DELAY_START);
}

public 
task__StartRound() {
    
g_NewRound 0;

I want to know if it's possible to, through the moudule, know the value of the var g_NewRound.

Sory for my english


Thanks in advanced!
__________________

Kiske is offline
Send a message via Skype™ to Kiske
slLent
Member
Join Date: Apr 2010
Location: Tomsk, Russia
Old 09-03-2014 , 04:34   Re: Know the value of a plugin variable ?
Reply With Quote #2

read this
slLent is offline
Kiske
Veteran Member
Join Date: May 2009
Old 09-03-2014 , 05:08   Re: Know the value of a plugin variable ?
Reply With Quote #3

Quote:
Originally Posted by slLent View Post
Thanks, but I don't want to hook new round, it's just an example, I mean, I want to know the value of any variable of my plugin through the module.

Thanks.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-03-2014 , 05:52   Re: Know the value of a plugin variable ?
Reply With Quote #4

Maybe you should start by explaining what you want really achieve, because this sounds like a XY problem.
__________________
Arkshine is offline
Kiske
Veteran Member
Join Date: May 2009
Old 09-03-2014 , 06:04   Re: Know the value of a plugin variable ?
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
Maybe you should start by explaining what you want really achieve, because this sounds like a XY problem.
I want to know if it's possible to, through the moudule, know the value of any variable in X plugin.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-03-2014 , 06:28   Re: Know the value of a plugin variable ?
Reply With Quote #6

That's the Y problem. Why would you want to do that? In what purposes? That's the X problem you should explain.
__________________

Last edited by Arkshine; 09-03-2014 at 06:29.
Arkshine is offline
Kiske
Veteran Member
Join Date: May 2009
Old 09-03-2014 , 07:12   Re: Know the value of a plugin variable ?
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
That's the Y problem. Why would you want to do that? In what purposes? That's the X problem you should explain.
Ooh, I see.

Well, I have the '/hats' plugin.

And I have the 'semiclip' and '/invis' module,
but when you activate '/invis', you can see hats floating around the place.

My way to 'fix' that, is check in AddToFullPack_Post (module) if the user has the '/invis' on and if the entity is a hat, then make it transparent or whatever.


Thank you!
__________________


Last edited by Kiske; 09-03-2014 at 07:13.
Kiske is offline
Send a message via Skype™ to Kiske
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-09-2014 , 10:37   Re: Know the value of a plugin variable ?
Reply With Quote #8

You can always use pev-> custom values...
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Reply


Thread Tools
Display Modes

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 06:16.


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