View Single Post
Author Message
xfusionlockx
AlliedModders Donor
Join Date: Aug 2014
Old 07-06-2019 , 18:22   Command Source Tag
Reply With Quote #1

This is a little line of code that you can add when sending the usage of a command to the player. It checks whether the command was sent from console or chat, and adds the correct tag accordingly.

Code:
GetCmdReplySource() == SM_REPLY_TO_CONSOLE ? "sm_" : "!"
You would add it in here:
Code:
ReplyToCommand(iClient, "Usage: %scolor <color>", GetCmdReplySource() == SM_REPLY_TO_CONSOLE ? "sm_" : "!");
Makes it more aesthetically pleasing in my opinion.
xfusionlockx is offline