Raised This Month: $ Target: $400
 0% 

Invis Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drogocop
Member
Join Date: Jul 2008
Location: Argentina
Old 07-29-2008 , 10:36   Invis Chat
Reply With Quote #1

Hi.
The idea of plugin is:
say /invischat - Don't Look The Chat
say /viewchat - Look the chat
But if the player does not use the command /viewchat before leaving the server, in other servers don't look chat.
Is there a way that when they disconnect, disable /invischat ?

PHP Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN    "Invis Chat"
#define AUTHOR    "Drogocop"
#define VERSION    "1.0"


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd"say /invischat""ChatInvisible")
    
register_clcmd"say /viewchat""ChatVisible")
}

public 
ChatInvisible (id)
{
    
client_cmdid"hud_saytext_internal 0" )
    
client_printid,print_console"[IC] Now the chat is Invisible" )
}

public 
ChatVisible (id)
{
    
client_cmdid"hud_saytext_internal 1" )
    
client_printidprint_chat"[IC] Now the chat is Visible" )

Thanks for the Help
__________________
Drogocop is offline
Send a message via MSN to Drogocop
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 07-29-2008 , 12:03   Re: Invis Chat
Reply With Quote #2

Code:
public client_disconnect(id) { client_cmd(id, "hud_saytext_internal 1") }

I guess this would work
__________________
minimiller is offline
Send a message via MSN to minimiller
Jon
Veteran Member
Join Date: Dec 2007
Old 07-29-2008 , 14:22   Re: Invis Chat
Reply With Quote #3

Don't mess around with client cmds unless there is no other way.

Code:
#include <amxmodx> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" new bool:ViewChat[33]; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("say", "HandleSay").     register_clcmd("say /invischat", "HandleInvisChat")     register_clcmd("say /viewchat", "HandleViewChat") } public HandleInvisChat(id)     ViewChat[id] = false; public HandleViewChat(id)     ViewChat[id] = true; public HandleSay(id) {     if(!ViewChat[id])         return PLUGIN_HANDLED;             return PLUGIN_CONTINUE; }
Jon 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:32.


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