AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   *using plugin_handled (https://forums.alliedmods.net/showthread.php?t=107816)

Amonel 10-30-2009 17:22

*using plugin_handled
 
PHP Code:

*deleted 

the plugin works, but i have.. 1 dilemma.
using "return PLUGIN_HANDLED;"
it shouldn't appear that i typed "/show" (AmoneL: /show)

Exolent[jNr] 10-30-2009 17:26

Re: noob question, noob title..
 
You have to return PLUGIN_HANDLED in the say command hook, not the menu hook.

Amonel 10-30-2009 17:46

Re: noob question, noob title..
 
i moved it around but i still don't know where to put it :|

D!DD! 10-30-2009 18:10

Re: noob question, noob title..
 
Im a noob to but this i what i guess

Quote:

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /show","clcmd_netsetup");

return PLUGIN_HANDLED
}

g_msgsaytext = get_user_msgid("SayText")
}
Or something like that xD (I can't script. Im a noob)

Exolent[jNr] 10-31-2009 00:00

Re: noob question, noob title..
 
Quote:

Originally Posted by D!DD! (Post 976308)
Im a noob to but this i what i guess



Or something like that xD (I can't script. Im a noob)

No.

fysiks 10-31-2009 01:02

Re: noob question, noob title..
 
Quote:

Originally Posted by D!DD! (Post 976308)
Im a noob to but this i what i guess



Or something like that xD (I can't script. Im a noob)

You already told us you know nothing so it's a bad idea to try and suggest code. FYI.

Amonel 10-31-2009 04:17

Re: noob question, noob title..
 
ok.. so no one is able to help me ?

biscuit628 10-31-2009 04:23

Re: noob question, noob title..
 
PHP Code:

public plugin_init() 
{
    
register_clcmd("say","sayfunction");
}
        
public 
sayfunction(id)
{
    
//..code
    
return PLUGIN_HANDLED


PHP Code:

//Plugin passes through operation.  Whatever called it continues.
#define PLUGIN_CONTINUE        0
//Plugin halts continued operation (plugins following in the plugins.ini won't be called).
//Whatever called it will eventually supercede.
#define PLUGIN_HANDLED        1
//Continue calling plugins but halt the operation
#define PLUGIN_HANDLED_MAIN    2 


Amonel 10-31-2009 04:50

Re: noob question, noob title..
 
i should have used plugin_continue :-)

thanks anyway :D

fysiks 10-31-2009 14:06

Re: noob question, noob title..
 
Quote:

Originally Posted by Amonel (Post 976643)
ok.. so no one is able to help me ?

Exolent told you the solution.


Quote:

Originally Posted by Amonel (Post 976649)
i should have used plugin_continue :-)

No. If you want it to work as you said in your your first post you must return PLUGIN_HANDLED.

Quote:

Originally Posted by Amonel (Post 976261)
it shouldn't appear that i typed "/show" (AmoneL: /show)



All times are GMT -4. The time now is 17:44.

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