AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Solved [CSGO] Customize "Admin commands (sourcemod)" (https://forums.alliedmods.net/showthread.php?t=337609)

Ryan2 05-02-2022 18:21

[CSGO] Customize "Admin commands (sourcemod)"
 
Pertaining to: https://wiki.alliedmods.net/Admin_commands_(sourcemod)

I am using sm_say when I use this command it comes out as (All) (Admin) Message

Is there anyway to customize this as in change (All) and (Admin)?

Bacardi 05-03-2022 04:18

Re: [CSGO] Customize "Admin commands (sourcemod)"
 
[REQ] Edit the Basechat Plugin Please?

* #22

Ryan2 05-03-2022 11:52

Re: [CSGO] Customize "Admin commands (sourcemod)"
 
Thanks! but looks like the .sp file has changed since that initial post. As (All) is no longer in the code at all.

But I assume it is this on line 337

PHP Code:

        if (g_GameEngine == Engine_CSGO)
            
PrintToChat(i" \x01\x0B\x04%t: \x01%s""Say all"nameBufmessage);
        else
            
PrintToChat(i"\x04%t: \x01%s""Say all"nameBufmessage); 

Edit: Just edited this and it worked. Thanks @Bacardi :)

Ryan2 05-03-2022 22:13

Re: [CSGO] Customize "Admin commands (sourcemod)"
 
Seems I did not get it right after all.

I changed:

PHP Code:

        if (g_GameEngine == Engine_CSGO)
            
PrintToChat(i" \x01\x0B\x04%t: \x01%s""Say all"nameBufmessage); 

to:

PHP Code:

        if (g_GameEngine == Engine_CSGO)
            
PrintToChat(i" \x01\x0B\x04[Admin]: \x01%s""Say all"nameBufmessage); 

But now it is sending the chat message as "[Admin]: Say all" and not what I put as the message. I guess changing %t had something to do with it. Any ideas on how I can get it to work properly?

Bacardi 05-03-2022 22:52

Re: [CSGO] Customize "Admin commands (sourcemod)"
 
ou, it have been updated...
https://github.com/alliedmodders/sou...c025d3c1067c5c

What if we not edit plugin, yet.
- Grap the original basechat.smx from SourceMod zip.


Look file ...translations/common.phrases.txt
and edit "Say all"
Code:

       
        "Say all"
        {
                "#format"                "{1:s}"
                "en"                        "(ALL) {1}"
        }

        "Chat admins"
        {
                "#format"                "{1:N}"
                "en"                        "(ADMINS) {1}"
        }
        "Chat to admins"
        {
                "#format"                "{1:N}"
                "en"                        "(TO ADMINS) {1}"
        }
        "Private say to"
        {
                "#format"                "{1:N},{2:N}"
                "en"                        "(Private to {1}) {2}"
        }
}

example
Code:

        "Say all"
        {
                "#format"                "{1:s}"
                "en"                        "[{1}]"
        }


...from ...cfg/sourcemod/sourcemod.cfg you can set show admin activity as anonymous to non-admins.

Code:

// Specifies how admin activity should be relayed to users.  Add up the values
// below to get the functionality you want.
// 1: Show admin activity to non-admins anonymously.
// 2: If 1 is specified, admin names will be shown.
// 4: Show admin activity to admins anonymously.
// 8: If 4 is specified, admin names will be shown.
// 16: Always show admin names to root users.
// --
// Default: 13 (1+4+8)

sm_show_activity 13


Ryan2 05-04-2022 01:20

Re: [CSGO] Customize "Admin commands (sourcemod)"
 
It worked. Thank you!!


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

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