AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help to add green admin chat (https://forums.alliedmods.net/showthread.php?t=277101)

FurienMaster 01-02-2016 16:39

Help to add green admin chat
 
Hi!
I've got this code to add [VIP] prefix in chat and I wanna to modify it to show the message something like this:
if(is_user_admin && get_user_flags(id) & ADMIN_LEVEL_H)
[VIP] Name: Message
This is the code
Code:

public                MSG_Say(user, dest, receiver) {
        new id = get_msg_arg_int(1)
        if(is_user_connected(id)) {
                new Prefix[64]
                if(get_user_flags(id & VIP_LEVEL))
                        Prefix                =                "^x04[VIP]"
                else
                        Prefix                =                ""
               
                new Temp[256], Temp2[256];
                get_msg_arg_string(2, Temp, sizeof Temp - 1);
                if(!equal(Temp, "#Cstrike_Chat_All")){
                        add(Temp2, sizeof Temp2 - 1, Prefix);
                        add(Temp2, sizeof Temp2 - 1, " ");
                        add(Temp2, sizeof Temp2 - 1, Temp);
                }
                else{
                        add(Temp2, sizeof Temp2 - 1, Prefix);
                        add(Temp2, sizeof Temp2 - 1, "^x03 %s1^x01 :  %s2");
                }
                set_msg_arg_string(2, Temp2);
        }
        return PLUGIN_CONTINUE
}



All times are GMT -4. The time now is 09:32.

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