AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Know the value of a plugin variable ? (https://forums.alliedmods.net/showthread.php?t=247504)

Kiske 09-02-2014 20:37

Know the value of a plugin variable ?
 
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 :stupid:


Thanks in advanced!

slLent 09-03-2014 04:34

Re: Know the value of a plugin variable ?
 
read this

Kiske 09-03-2014 05:08

Re: Know the value of a plugin variable ?
 
Quote:

Originally Posted by slLent (Post 2193388)

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.

Arkshine 09-03-2014 05:52

Re: Know the value of a plugin variable ?
 
Maybe you should start by explaining what you want really achieve, because this sounds like a XY problem.

Kiske 09-03-2014 06:04

Re: Know the value of a plugin variable ?
 
Quote:

Originally Posted by Arkshine (Post 2193400)
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.

Arkshine 09-03-2014 06:28

Re: Know the value of a plugin variable ?
 
That's the Y problem. Why would you want to do that? In what purposes? That's the X problem you should explain.

Kiske 09-03-2014 07:12

Re: Know the value of a plugin variable ?
 
Quote:

Originally Posted by Arkshine (Post 2193412)
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!

joropito 09-09-2014 10:37

Re: Know the value of a plugin variable ?
 
You can always use pev-> custom values...


All times are GMT -4. The time now is 02:22.

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