Raised This Month: $ Target: $400
 0% 

Is This Well Done?


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

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