Thread: Vip Chat
View Single Post
drakunovu6
Member
Join Date: Sep 2017
Old 09-13-2020 , 12:13   Re: Vip Chat
Reply With Quote #7

Didn't test it but try this one, uses the method of adminchat.sma but with the *, vip flags and say if it's dead or not

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <VIPSystem>

#define ACCESS_FLAG VIP_FLAG_F

public plugin_init() 
{
    
register_plugin("VSVipChat""1.3""ZETA [M|E|N]");
    
register_clcmd("say_team""cmdSayVip"ADMIN_ALL"");
}

public 
cmdSayVip(id)
{
    new 
said[2];
    
read_argv(1said1);
    
    if (
said[0] != '*' || !VSGetVipFlag(idACCESS_FLAG))
        return 
PLUGIN_CONTINUE;
    
    new 
message[192], name[32];
    new 
players[32], inum;
    
    
read_args(message191);
    
remove_quotes(message);
    
get_user_name(idname31);
    
    
format(message191"%s(VIP) %s :  %s"is_user_alive(id) ? "" "*DEAD* "namemessage[1]);

    
get_players(playersinum)
    
    for (new 
0inum; ++i)
    {
        if (
players[i] != id && VSGetVipFlag(idACCESS_FLAG))
            
client_print(players[i], print_chat"%s"message);
    }
    
    
client_print(idprint_chat"%s"message);

    return 
PLUGIN_HANDLED;

drakunovu6 is offline