Raised This Month: $ Target: $400
 0% 

[Solved] Block event of another plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
padilha007
Senior Member
Join Date: Jul 2008
Old 04-04-2011 , 03:46   [Solved] Block event of another plugin
Reply With Quote #1

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.
__________________


Last edited by padilha007; 04-06-2011 at 12:30.
padilha007 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-04-2011 , 06:31   Re: Block event of another plugin
Reply With Quote #2

You could create a public variable. (xvar)
__________________
Arkshine is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 04-04-2011 , 10:32   Re: Block event of another plugin
Reply With Quote #3

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);

__________________


Last edited by padilha007; 04-04-2011 at 11:48.
padilha007 is offline
lis_16
Senior Member
Join Date: Feb 2008
Old 04-04-2011 , 11:36   Re: Block event of another plugin
Reply With Quote #4

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).
lis_16 is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 04-04-2011 , 11:49   Re: Block event of another plugin
Reply With Quote #5

In my case i dont want to modify the plugin.
__________________

padilha007 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-04-2011 , 12:35   Re: Block event of another plugin
Reply With Quote #6

Then what you want is not possible, or may be there is an orpheu supa way
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 04-04-2011 , 13:33   Re: Block event of another plugin
Reply With Quote #7

Nooo, i'm sad. I can not imagine how it would be in orpheus ^^

Any crazy idea?
__________________

padilha007 is offline
lis_16
Senior Member
Join Date: Feb 2008
Old 04-04-2011 , 15:31   Re: Block event of another plugin
Reply With Quote #8

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.
lis_16 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-04-2011 , 17:31   Re: Block event of another plugin
Reply With Quote #9

XVar, as in Variable.
Functions are not variables, so you cannot use them as XVars.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 04-04-2011 , 19:13   Re: Block event of another plugin
Reply With Quote #10

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.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply



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 14:35.


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