Raised This Month: $ Target: $400
 0% 

Can't prevent pickup :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 02-11-2007 , 07:00   Can't prevent pickup :(
Reply With Quote #1

My function is this.
PHP Code:
public event_touch(touched,toucher)
    {
    if(
toucher==0||touched==0)
        {
        return 
PLUGIN_HANDLED
        
}
    
    new 
touchedcn[33]
    new 
touchercn[33]
    
pev(touched,pev_classname,touchedcn,32)
    
pev(toucher,pev_classname,touchercn,32)
    new 
message[201]
    
format(message,200,"Toucher:'%i' CN:'%s' Touched:'%i' CN:'%s'",toucher,touchercn,touched,touchedcn)
    
console_print(0,message)
    return 
PLUGIN_HANDLED
    

When I try to get a weapon or an item, this function prints the message to console; but I get the weapon. How can I prevent pickup?
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
VEN
Veteran Member
Join Date: Jan 2005
Old 02-11-2007 , 07:42   Re: Can't prevent pickup :(
Reply With Quote #2

return FMRES_SUPERCEDE
VEN is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 02-11-2007 , 08:20   Re: Can't prevent pickup :(
Reply With Quote #3

I read this in http://www.amxmodx.org/doc/source/fu...core/index.htm :
Quote:

//Plugin halts continued operation (plugins following in the plugins.ini won't be called).
//Whatever called it will eventually supercede.
PLUGIN_HANDLED 1
So this is only for engine hooks right?

Edit:
I forgot to add: It worked.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
VEN
Veteran Member
Join Date: Jan 2005
Old 02-11-2007 , 13:34   Re: Can't prevent pickup :(
Reply With Quote #4

For FM_* hooks you should return FMRES_* values. See fakemeta_const.inc/docs/funcwiki for details.
VEN is offline
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 00:37.


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