Raised This Month: $32 Target: $400
 8% 

Solved [CSGO] Customize "Admin commands (sourcemod)"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ryan2
Senior Member
Join Date: Jul 2020
Old 05-02-2022 , 18:21   [CSGO] Customize "Admin commands (sourcemod)"
Reply With Quote #1

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)?

Last edited by Ryan2; 05-04-2022 at 01:20.
Ryan2 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-03-2022 , 04:18   Re: [CSGO] Customize "Admin commands (sourcemod)"
Reply With Quote #2

[REQ] Edit the Basechat Plugin Please?

* #22

Last edited by Bacardi; 05-03-2022 at 04:18.
Bacardi is offline
Ryan2
Senior Member
Join Date: Jul 2020
Old 05-03-2022 , 11:52   Re: [CSGO] Customize "Admin commands (sourcemod)"
Reply With Quote #3

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

Last edited by Ryan2; 05-03-2022 at 12:05.
Ryan2 is offline
Ryan2
Senior Member
Join Date: Jul 2020
Old 05-03-2022 , 22:13   Re: [CSGO] Customize "Admin commands (sourcemod)"
Reply With Quote #4

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?

Last edited by Ryan2; 05-03-2022 at 22:13.
Ryan2 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-03-2022 , 22:52   Re: [CSGO] Customize "Admin commands (sourcemod)"
Reply With Quote #5

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
__________________
Do not Private Message @me

Last edited by Bacardi; 05-03-2022 at 23:02.
Bacardi is offline
Ryan2
Senior Member
Join Date: Jul 2020
Old 05-04-2022 , 01:20   Re: [CSGO] Customize "Admin commands (sourcemod)"
Reply With Quote #6

It worked. Thank you!!
Ryan2 is offline
Reply


Thread Tools
Display Modes

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 01:33.


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