AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Admin Rank Color Chat with Tags (https://forums.alliedmods.net/showthread.php?t=176192)

LilWayne 01-14-2012 22:56

Admin Rank Color Chat with Tags
 
If there isn't an existing plugin;
Can somebody make a Admin Tags and Color chat plugin for me?
Example.

All Flags A-U
[Head Admin] NAME : RED CHAT

Flags B-U (Excluding ghkl)
[Full Admin] Name : GREEN CHAT

Flags bcefijou
[Basic Admin] NAME: GREEN CHAT

Flags biu
[VIP] NAME: GREEN CHAT

Flags z
[MEMBER] NAME: Normal Chat

Thanks ahead of time if some one can make it!

wickedd 01-14-2012 23:13

Re: Admin Rank Color Chat with Tags
 
Search

MAUGHOLD 01-15-2012 01:08

Re: Admin Rank Color Chat with Tags
 
For what game/mod ?

LilWayne 01-15-2012 02:20

Re: Admin Rank Color Chat with Tags
 
CS 1.6 Sorry! :D

OxfordL 01-15-2012 03:50

Re: Admin Rank Color Chat with Tags
 
Search... https://forums.alliedmods.net/showthread.php?t=173113

LilWayne 01-15-2012 03:54

Re: Admin Rank Color Chat with Tags
 
That's definitely not was I was looking for. But thanks.

MAUGHOLD 01-15-2012 14:20

Re: Admin Rank Color Chat with Tags
 
I have a plugin for Dayofdefeat that changes the color of the admins name to a light sea foam green, so that everyone sees that an admin is talking. I paid Sylwester to code it for me and he never released it publicly. maybe I should release it.

Here is the source code.

Code:

#include <amxmodx>

#define MAX_PLAYERS 32

new g_team[MAX_PLAYERS+1]
new g_msgid_SayText
new g_msgid_PTeam
new g_said[MAX_PLAYERS+1][128]
new g_alive[MAX_PLAYERS+1]
new g_say_team[MAX_PLAYERS+1]
new g_max_players


public plugin_init(){
    register_plugin("DoD ColorChat", "1.1", "Sylwester")
    g_msgid_SayText = get_user_msgid("SayText")
    g_msgid_PTeam = get_user_msgid("PTeam")
    register_clcmd("say", "handle_say")
    register_clcmd("say_team", "handle_say_team")
    register_message(g_msgid_PTeam, "update_team")
    g_max_players = get_maxplayers()
}


public update_team(msg_id, msg_dest, id)
    g_team[get_msg_arg_int(1)] = get_msg_arg_int(2)


public handle_say_team(id){
    if(!(get_user_flags(id) & ADMIN_KICK))
        return PLUGIN_CONTINUE
    read_args(g_said[id], 127)
    remove_quotes(g_said[id])
    if(g_said[id][0] == '@' || strlen(g_said[id]) <= 0)
        return PLUGIN_HANDLED_MAIN
    new i, len = strlen(g_said[id])-1
    while(g_said[id][i] <= 32)
        if(++i>len)
            return PLUGIN_HANDLED_MAIN
    g_say_team[id] = 1
    g_alive[id] = is_user_alive(id)

    message_begin (MSG_BROADCAST, g_msgid_PTeam)
    write_byte (id)
    write_byte (4)
    message_end ()
   
    set_task(0.1, "delayed_say", id)
    return PLUGIN_HANDLED_MAIN
}


public handle_say(id){
    if(!(get_user_flags(id) & ADMIN_KICK))
        return PLUGIN_CONTINUE
    read_args(g_said[id], 127)
    remove_quotes(g_said[id])
    if(g_said[id][0] == '@' || strlen(g_said[id]) <= 0)
        return PLUGIN_HANDLED_MAIN
    new i, len = strlen(g_said[id])-1
    while(g_said[id][i] <= 32)
        if(++i>len)
            return PLUGIN_HANDLED_MAIN
    g_say_team[id] = 0
    g_alive[id] = is_user_alive(id)

    message_begin (MSG_BROADCAST, g_msgid_PTeam)
    write_byte (id)
    write_byte (4)
    message_end ()
   
    set_task(0.1, "delayed_say", id)
    return PLUGIN_HANDLED_MAIN
}


public delayed_say(id){
    static players[32], pnum, team, msg[128], name[32]
    team = get_user_team(id)
    pnum = 0
    get_user_name(id, name, 31)
    for(new i=1; i<=g_max_players; i++){
        if(i == id){
            players[pnum++] = i
            continue
        }
        if(!is_user_connected(i))
            continue
        if(!g_alive[id] && is_user_alive(i))
            continue
        if(g_say_team[id] && team != get_user_team(i))
            continue
        players[pnum++] = i
    }
    formatex(msg, 127, "%c%s%s%s: %s", 2, g_alive[id]?"":"(DEAD)", g_say_team[id]?"(TEAM)":"", name, g_said[id])

    for(new i=0; i<pnum; i++){
        message_begin (MSG_ONE, g_msgid_SayText, _, players[i])
        write_byte (id)
        write_string (msg)
        message_end ()
    }

    message_begin (MSG_BROADCAST, g_msgid_PTeam)
    write_byte (id)
    write_byte (g_team[id])
    message_end ()
}

Granted this does not differentiate between higher or lower ranked admins. You can try it for cs 1.6 and see if it works.

jackas 01-15-2012 15:03

Re: Admin Rank Color Chat with Tags
 
Here!

LilWayne 01-15-2012 16:18

Re: Admin Rank Color Chat with Tags
 
I looked at that, but it wasn't really what I wanted, but that's currently what i'm using.

DZBosS 04-17-2018 17:56

Re: Admin Rank Color Chat with Tags
 
i wont like this how have givme ling downlod

https://imgur.com/a/YOgFR


All times are GMT -4. The time now is 00:24.

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