Raised This Month: $ Target: $400
 0% 

Is This Well Done?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-26-2010 , 12:30   Re: Is This Well Done?
Reply With Quote #1

Sorry, I misunderstood
Why don't you just use:
PHP Code:
if(!get_pcvar_float(pFreezeTime)) // if the value is 0
    
return PLUGIN_HANDLED;
else 
// else if is greater than 0, allow chat.
    
return PLUGIN_CONTINUE
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!

Last edited by Brreaker; 05-26-2010 at 12:40.
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 05-26-2010 , 12:44   Re: Is This Well Done?
Reply With Quote #2

PHP Code:
#include <amxmodx>

new g_pFreezeTime;


public 
plugin_init()
{
      
register_plugin("O""M""G");

      
g_pFreezeTime get_cvar_pointer("mp_freezetime");

      
register_clcmd("say""ClientCommand_Say");
}

public 
ClientCommand_Say(iClient)
{
      if(
get_pcvar_num(g_cFreezeTime) <= 0)
      {
            
client_print(iClientprint_chat"* Chat is blocked!");

            return 
PLUGIN_HANDLED;
      }

      return 
PLUGIN_CONTINUE;

Not tested, though.

When do you want to block the chat?
After the freezetime passes or if the 'mp_freezetime' cvar value is lower / equal to 0?
__________________
unnyquee 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 05:22.


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