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

How to create a command alias to run ".command" instead of "!command?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Maverick1707
Junior Member
Join Date: Nov 2015
Old 01-07-2016 , 02:56   How to create a command alias to run ".command" instead of "!command?
Reply With Quote #1

Hi,

I just created a command which needs 1 argument but I want it to run by typing ".command <arg>" instead of "!command <arg>".

How do I do that?

Thanks!
Maverick1707 is offline
ecca
Sexy Santa
Join Date: Jan 2011
Old 01-07-2016 , 06:58   Re: How to create a command alias to run ".command" instead of "!command?
Reply With Quote #2

Hook chat and filter out arguments by splitting string.
__________________
ecca is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 01-07-2016 , 07:00   Re: How to create a command alias to run ".command" instead of "!command?
Reply With Quote #3

The easiest way to change the chat trigger is through the "PublicChatTrigger" option in SourceMod's core.cfg. That would change it for all commands though. You could ask for this to be merged as well, so you can have both "!" and "." as chat triggers.

Otherwise you need to check for your ".command" in OnClientSayCommand and parse the argument manually..
__________________
Peace-Maker is offline
Maverick1707
Junior Member
Join Date: Nov 2015
Old 01-07-2016 , 12:17   Re: How to create a command alias to run ".command" instead of "!command?
Reply With Quote #4

Awesome guys, you solved all my doubts!

I think I will go for changing the PublicChatTrigger as I already have my commands coded as usual commands.

Thanks!
Maverick1707 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 15:40.


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