Raised This Month: $ Target: $400
 0% 

Redefine/Override methods?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
rjckE
Junior Member
Join Date: Mar 2009
Old 01-23-2010 , 22:20   Redefine/Override methods?
Reply With Quote #1

Hi guys. A simple question here.

Does PAWN/AMX allow to redefine methods?

I mean, supose i'm using admincmd.amxx in my server, and i do a plugin foo.amxx where i register a console command called amx_kick

PHP Code:
    register_concmd("amx_kick""cmdKick"ADMIN_KICK"<name or #userid> [reason]"
and the method cmdKick is something like this:

PHP Code:
public cmdKick(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
if (MY_CONDITION)
      return 
PLUGIN_HANDLED
    
else
      return 
PLUGIN_CONTINUE

If i do amx_kick, which amx_kick will amx use? the one from admincmd or the one from foo.amxx?

Thanks
__________________

Last edited by rjckE; 01-23-2010 at 22:21. Reason: indentation, sorry
rjckE is offline
Send a message via MSN to rjckE
 


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 07:17.


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