Raised This Month: $ Target: $400
 0% 

What difference in ConCmd return value?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 01-27-2016 , 12:12   What difference in ConCmd return value?
Reply With Quote #1

Question in title. What if Plugin_Continue, Plugin_Handled, Plugin_Stop?
Kailo is offline
Godis
Senior Member
Join Date: Jan 2014
Old 01-27-2016 , 12:42   Re: What difference in ConCmd return value?
Reply With Quote #2

From the wiki:

Quote:
Plugin_Continue - The original server command will be processed, if there was one. If the server command was created by a plugin, this has no effect.
Plugin_Handled - The original server command will not be processed, if there was one. If the server command was created by a plugin, this has no effect.
Plugin_Stop - The original server command will not be processed, if there was one. Additionally, no further hooks will be called for this command until it is fired again.
Most often you will use Plugin_Continue and Plugin_Handled. Plugin_Stop is used for things like stopping a repeating timer, etc.

Last edited by Godis; 01-27-2016 at 12:44.
Godis is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-27-2016 , 12:50   Re: What difference in ConCmd return value?
Reply With Quote #3

Returning plug in handled on a command will prevent it from executing.
Like if a player tries to suicide and you have kill hooked, it will prevent the command.
Stop will end some actions as well, as in the case of sound hooks, it will stop the sound.

In most cases stop and handled are the same, it just depends what return is expected for that callback, or in the case of forwards.. how the return just happens tl be coded.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-27-2016 , 13:56   Re: What difference in ConCmd return value?
Reply With Quote #4

Plugin_Continue will make it display "Unknown command: <some command>" in the client's console also.
Mitchell 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 20:38.


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