Raised This Month: $51 Target: $400
 12% 

[L4D2]Is there a way to add kick reasons in the sourcemod config?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Morning
Member
Join Date: May 2021
Old 05-16-2023 , 12:30   [L4D2]Is there a way to add kick reasons in the sourcemod config?
Reply With Quote #1

Basically I just want to add some kick reasons to the sourcemod admin menu (similar to banreasons.txt). It's just to show the player why they were kicked instead of just "kicked by administrator".

I'm aware I can use sm_kick #1 "Reason", I was just wondering if sourcemod can handle a kickreasons.txt or something similar for the admin menu or if i'd have to edit and recompile one of the core plugins to do this.
Morning is offline
3ipKa
Member
Join Date: Jul 2013
Old 05-19-2023 , 14:45   Re: [L4D2]Is there a way to add kick reasons in the sourcemod config?
Reply With Quote #2

Not tested.
\addons\sourcemod\configs\adminmenu_custom.tx t
Code:
// Custom admin menu commands.
// For more information:
//
// https://wiki.alliedmods.net/Custom_Admin_Menu_(SourceMod)
//
// Note: This file must be in Valve KeyValues format (no multiline comments)
//
"Commands"
{
	"ServerCommands"
	{
		"Kick player"
		{
			"cmd"		"sm_kick #1 #2"
			"admin"		"sm_kick"
			"execute"	"server"
			"1"
			{
				"type"		"player"
				"method"	"userid"
				"title"		"Choose player:"
			}
			"2"
			{
				"type"		"list"
				"title"		"Choose the reason"
				"1"		"You're dumb"
				"1."		"Dumb"
				"2"		"You was kicked due to teamkilling"
				"2."		"Teamkiller"
				"3"		"You kicked 'cause I just want to..."
				"3."		"Just because"
			}
		}
	}
}
"1." - Text to display in menu(discription) - optional
"1" - Reason text to display to player after kick, without "discription" it was instead

Last edited by 3ipKa; 05-19-2023 at 14:46.
3ipKa is offline
Reply



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 22:41.


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