Raised This Month: $ Target: $400
 0% 

A Question About "return PLUGIN_HANDLED" & "return PLUGIN_CONTINUE"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Jess98
Junior Member
Join Date: Apr 2018
Old 11-26-2018 , 17:25   Re: A Question About "return PLUGIN_HANDLED" & "return PLUGIN_CONTINUE"
Reply With Quote #8

Quote:
Originally Posted by OciXCrom View Post
PLUGIN_HANDLED in this case will block the /spawn command from showing in chat and will stop any other plugin from hooking it.
If it was PLUGIN_CONTINUE, the command would show in chat.
PLUGIN_HANDLED_MAIN will hide the command in chat, but won't stop any other plugins from hooking it.
It doesn't affect anything else in this case.
The answer that I was waiting for, thank you. But what also there happens if I don't use PLUGIN_HANDLED and it hooks with other plugins?

And, does it block the other lines / cases in the plugin?

For an example, I'm meaning:

Code:
if(cs_get_user_money(id) < get_pcvar_num(gMoney))
{ 
       client_print_color(id, id, "^4[%s]: ^3You Don't Have Enough Money to Spawn Yourself", SERVER_INFORMATION)
       return PLUGIN_HANDLED
}
I finished the task on the top line / case and wrote PLUGIN_HANDLED ( ↑ ). Will it hooking with the second line / case in the bottom ( ↓ )?

Code:
else if(cs_get_user_money(id) >= get_pcvar_num(gMoney))
{
         cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(gMoney))
         cs_user_spawn(id)
         client_print_color(id, id, "^4[%s]: ^3You Have Spawned Yourself!", SERVER_INFORMATION)
}

Last edited by Jess98; 11-26-2018 at 17:30. Reason: A little change for making question easy
Jess98 is offline
 



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


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