AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved] Block event of another plugin (https://forums.alliedmods.net/showthread.php?t=154187)

padilha007 04-04-2011 03:46

[Solved] Block event of another plugin
 
It would be possible to block a function from another plugin?


Example:
I have the function:
register_event (CurWeapon "," EventCurWeapon "," b "," 1 = 1 ")
I want to block it with another plugin. It would be possible to block?


Solution:
Making changes in amxx module for blocking functions in an ini file.

Arkshine 04-04-2011 06:31

Re: Block event of another plugin
 
You could create a public variable. (xvar)

padilha007 04-04-2011 10:32

Re: Block event of another plugin
 
Like this?

PHP Code:

#include < amxmodx >

public plugin_init( )
{
    
register_plugin"Xvar Block Test""0.1""Beta" );
    
    new 
pCurWeapon get_xvar_id("EventCurWeapon");
    
    if( 
pCurWeapon != -)
        
set_xvar_numpCurWeapon);



lis_16 04-04-2011 11:36

Re: Block event of another plugin
 
I don't know this methode but U can make a native and a boolean and check it in yours CurWeapon. If booleaon=true return plugin_handled (in curweapon).

padilha007 04-04-2011 11:49

Re: Block event of another plugin
 
In my case i dont want to modify the plugin.

ConnorMcLeod 04-04-2011 12:35

Re: Block event of another plugin
 
Then what you want is not possible, or may be there is an orpheu supa way :mrgreen:

padilha007 04-04-2011 13:33

Re: Block event of another plugin
 
Nooo, i'm sad. I can not imagine how it would be in orpheus ^^

Any crazy idea?

lis_16 04-04-2011 15:31

Re: Block event of another plugin
 
Try this:

PHP Code:

if( xvar_exists "CurWeapon" something 

If plugin is no needed in late part of the game you can pause it, an unpause in new round but it seems stupied idea. I think there is no other wat to stop it without editing plugin we are talking about.

Exolent[jNr] 04-04-2011 17:31

Re: Block event of another plugin
 
XVar, as in Variable.
Functions are not variables, so you cannot use them as XVars.

Emp` 04-04-2011 19:13

Re: Block event of another plugin
 
Returning PLUGIN_HANDLED in most events stops them from continuing to the next plugin. So you would just have to have your plugin above the unchanged plugin in the plugins.ini.


All times are GMT -4. The time now is 14:36.

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