Raised This Month: $ Target: $400
 0% 

Clan Chat (Current Version: 2.0)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gunny
Senior Member
Join Date: Mar 2004
Location: Magnolia, Texas
Old 04-20-2007 , 01:12   Re: Clan Chat (Current Version: 2.0)
Reply With Quote #1

Anyone still working on this plugin?? I too am having the same issues as mustangman041.
__________________
TEAM FORTRESS 2 - 70.85.30.25:27015
COUNTER-STRIKE SOURCE - 70.85.30.22:27015
COUNTER-STRIKE SOURCE DEATH MATCH - 70.85.30.23:27015
Gunny is offline
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 04-28-2007 , 13:52   Re: Clan Chat (Current Version: 2.0)
Reply With Quote #2

Quote:
Originally Posted by Gunny View Post
Anyone still working on this plugin?? I too am having the same issues as mustangman041.
Hehe, sorry but i guess not. Its more as a year ago for the last post. This plugin should be unapproved because it is also not working for me and neither for any other AMX user.
Maurice is offline
cRoSsEd-ThReAdEd
Junior Member
Join Date: Dec 2006
Old 04-30-2007 , 05:43   Re: Clan Chat (Current Version: 2.0)
Reply With Quote #3

I agree. although I'm currently working on it. I can tell you how to fix the team_say though. this is what needs changed,

// Client commands
register_clcmd("say_team","commandChat",ADMIN_LEVEL_D,"^^<message> - displays message to clan members")
that will remove your team_say and replace it as it were your Clan_say. So this is how I modded that.

// Client commands
register_clcmd("clanChat","commandChat",ADMIN_LEVEL_B,"<message> - displays message to clan members")

However. I am still debuggin the Non-Access problem. I think I may have to use a variable or something, but I'm working on it right now.
cRoSsEd-ThReAdEd is offline
cRoSsEd-ThReAdEd
Junior Member
Join Date: Dec 2006
Old 04-30-2007 , 10:05   Re: Clan Chat (Current Version: 2.0)
Reply With Quote #4

Ok. I got it. Here is how you can get it working "WITHOUT" giving your players admin abilities.

however, you will need to give each clan member a flag, the flags you need to give them are "nz". With those two flags,they will be able to view the clan chat, and reply within the clan chat, but not view admin chat or perform any admin commands. You MUST have the z at the end, or they will be able to view the admin chat.

Use the below code:

Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
    register_plugin("AMX Clan Chat", "2.0", "Infra")
    register_cvar("amx_clan_chat", "2.0", FCVAR_SERVER)
    
    // Console commands
    register_concmd("clanChat","commandConsole",ADMIN_LEVEL_B,"<message>")
    register_concmd("amx_clanchat","commandConsole",ADMIN_LEVEL_B,"<message>")
    
    // Client commands
    register_clcmd("clanChat","commandChat",ADMIN_LEVEL_B,"<message> - displays message to clan members")
    
    
    // Cvars
    register_cvar("amx_cc_clan","<clanname>")
    
    return PLUGIN_CONTINUE
}

public clanChat( id ) 
{
    new players[32], numPlayers
    new message[192]
    new authid[16], name[32]
    new clanName[32]
    

        
    
    
    
    // Get message and remove quotes
    read_args(message, 191)
    remove_quotes(message)    
    // Get user's name
    get_user_name(id, name, 31)
    
    
    
    // Get players currently on server
    get_players(players, numPlayers)
    
    // Get Clan Name
    get_cvar_string("amx_cc_clan", clanName, 31) 
   
    //  (ADMINS) [CI]MooMooJr. :   yay    
    // Declare Clan Permission
    
    format(message, 192, "(%s) %s :   %s", clanName, name, message)
    for(new i = 0; i < numPlayers; i++) 
    {
        // If user has access, then print message for them
       /*All clan members must have the flag nz to use this, it will void all   admin access, but will allow them to view the clan message.*/
        if( access(players[i], ADMIN_LEVEL_B) ) 
        {
            client_print(players[i], print_chat, message)
        }
    }
    
    
    log_amx("Chat: ^"%s<%d><%s><>^" clan chat ^"%s^"",name, id, authid, message)
      log_message("^"%s<%d><%s><>^" triggered ^"amx_clanchat^" (text ^"%s^")",name, id, authid, message)
    
    return PLUGIN_CONTINUE
}

public commandChat ( id,level,cid )
{
    if(!cmd_access(id,level,cid,2))
    {
        return PLUGIN_CONTINUE
    }
    
    new message[2]
    
    read_argv(1,message,1)
    
    if (message[0]!= '#')
    {
        return PLUGIN_CONTINUE
    }
      
      clanChat( id )
      
      return PLUGIN_HANDLED
}

public commandConsole ( id,level,cid )
{
    if(!cmd_access(id,level,cid,2))
    {
        return PLUGIN_CONTINUE
    }

      clanChat( id )
      
      return PLUGIN_HANDLED
}
This is only a temporary fix until i can get my amxx team working with it and make a fix.
Also I advise them to bind it to a key as follows: bind "i" "messagemode clanChat"

Last edited by cRoSsEd-ThReAdEd; 04-30-2007 at 10:06. Reason: Add information
cRoSsEd-ThReAdEd is offline
Gunny
Senior Member
Join Date: Mar 2004
Location: Magnolia, Texas
Old 04-30-2007 , 12:48   Re: Clan Chat (Current Version: 2.0)
Reply With Quote #5

Quote:
Originally Posted by cRoSsEd-ThReAdEd View Post
Ok. I got it. Here is how you can get it working "WITHOUT" giving your players admin abilities.

however, you will need to give each clan member a flag, the flags you need to give them are "nz". With those two flags,they will be able to view the clan chat, and reply within the clan chat, but not view admin chat or perform any admin commands. You MUST have the z at the end, or they will be able to view the admin chat.

Use the below code:

Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
    register_plugin("AMX Clan Chat", "2.0", "Infra")
    register_cvar("amx_clan_chat", "2.0", FCVAR_SERVER)
    
    // Console commands
    register_concmd("clanChat","commandConsole",ADMIN_LEVEL_B,"<message>")
    register_concmd("amx_clanchat","commandConsole",ADMIN_LEVEL_B,"<message>")
    
    // Client commands
    register_clcmd("clanChat","commandChat",ADMIN_LEVEL_B,"<message> - displays message to clan members")
    
    
    // Cvars
    register_cvar("amx_cc_clan","<clanname>")
    
    return PLUGIN_CONTINUE
}

public clanChat( id ) 
{
    new players[32], numPlayers
    new message[192]
    new authid[16], name[32]
    new clanName[32]
    

        
    
    
    
    // Get message and remove quotes
    read_args(message, 191)
    remove_quotes(message)    
    // Get user's name
    get_user_name(id, name, 31)
    
    
    
    // Get players currently on server
    get_players(players, numPlayers)
    
    // Get Clan Name
    get_cvar_string("amx_cc_clan", clanName, 31) 
   
    //  (ADMINS) [CI]MooMooJr. :   yay    
    // Declare Clan Permission
    
    format(message, 192, "(%s) %s :   %s", clanName, name, message)
    for(new i = 0; i < numPlayers; i++) 
    {
        // If user has access, then print message for them
       /*All clan members must have the flag nz to use this, it will void all   admin access, but will allow them to view the clan message.*/
        if( access(players[i], ADMIN_LEVEL_B) ) 
        {
            client_print(players[i], print_chat, message)
        }
    }
    
    
    log_amx("Chat: ^"%s<%d><%s><>^" clan chat ^"%s^"",name, id, authid, message)
      log_message("^"%s<%d><%s><>^" triggered ^"amx_clanchat^" (text ^"%s^")",name, id, authid, message)
    
    return PLUGIN_CONTINUE
}

public commandChat ( id,level,cid )
{
    if(!cmd_access(id,level,cid,2))
    {
        return PLUGIN_CONTINUE
    }
    
    new message[2]
    
    read_argv(1,message,1)
    
    if (message[0]!= '#')
    {
        return PLUGIN_CONTINUE
    }
      
      clanChat( id )
      
      return PLUGIN_HANDLED
}

public commandConsole ( id,level,cid )
{
    if(!cmd_access(id,level,cid,2))
    {
        return PLUGIN_CONTINUE
    }

      clanChat( id )
      
      return PLUGIN_HANDLED
}
This is only a temporary fix until i can get my amxx team working with it and make a fix.
Also I advise them to bind it to a key as follows: bind "i" "messagemode clanChat"


THANKS, I will give it a try ASAP and report back.
__________________
TEAM FORTRESS 2 - 70.85.30.25:27015
COUNTER-STRIKE SOURCE - 70.85.30.22:27015
COUNTER-STRIKE SOURCE DEATH MATCH - 70.85.30.23:27015
Gunny 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 00:39.


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