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

[ANY] Command Shortcuts


Post New Thread Reply   
 
Thread Tools Display Modes
Author
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
Plugin ID:
7566
Plugin Version:
1.0
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows players/admins to execute server/client commands via shortcuts
    Old 03-21-2021 , 20:21   [ANY] Command Shortcuts
    Reply With Quote #1

    Command Shortcuts

    Description:
    Allows players/admins to execute server/client commands via shortcuts. There is a plugin does almost the same by Arkarr but it is outdated. Some people asked for an update so i rewrited a new one.

    Version:
    1.0 - First release.

    1.1 - Added option to register shortcuts as a console command. Requested by Tonblader

    1.2 - Added option to use a specified STEAMID instead of admin flag. Requested by starcs

    1.3 - Added function to apply commands delayed in specificied second(s). Requested by
    Alessandro_k

    Features:
    • Any keyword can be a shortcut to an existing command.
    • Allows client commands to execute via shortcuts.
    • Shortcuts can be specified for admin flag.
    • Real commands can be triggered in delayed after shortcut has triggered.

    Console Variables:
    Config file is located in: cfg/sourcemod/sm_commandshortcuts.cfg
    • sm_commandshortcuts_notification - Display a message when a command shortcut triggered. 1 = Enabled, 0 = Disabled
    • sm_commandshortcuts_publicinfo - Allow all clients to lookup command shortcuts info by typing !commandshortcuts. 1 = All Clients, 0 = Only Admins(who have access to ban)

    Commands:
    • sm_reloadshortcuts - Reloads the config file.
    • sm_commandshortcuts - Gives info about command shortcuts.

    Configuration
    "shortcut" - Trigger to execute the command.
    "flag" - Needed flag to use trigger. Instead of flag, a steamid can also be used. Only specified STEAMID will be able to use trigger. Leaving it completely empty means no permission required.
    "command" - Command to execute when shortcut triggered. {player} can be used to target the client who triggered the shortcut. It's the same as @me.
    "type" - Type of command. Set 1 if the command needed to be executed by console, or set 2 to execute by client.
    "registershortcut" Registers the shortcut if the option is 1. With that shortcut can be used on console. Set 0 if you want shortcut works only as a chat trigger.
    "delay" - Delay you want command to execute. Set to 0 if it's not needed.

    The section names(1, 2, 3) is not important but must be unique.

    See the example for full info.

    Example:
    Spoiler


    Installation
    • Upload commandshortcuts.cfg to addons/sourcemod/configs/ folder
    • Upload sm_commandshortcuts.smx to addons/sourcemod/plugins folder
    Attached Files
    File Type: zip sm_commandshortcuts_v1.2.zip (12.0 KB, 136 views)
    File Type: sp Get Plugin or Get Source (sm_commandshortcuts.sp - 81 views - 6.6 KB)
    File Type: smx sm_commandshortcuts.smx (9.0 KB, 53 views)
    File Type: zip sm_commandshortcuts_v1.3.zip (20.9 KB, 85 views)
    __________________
    Also known as Hardy`.

    Feel free to contact me if you have a private plugin request!

    My Steam Profile | Discord: Hardy`#3792

    Last edited by stephen473; 12-16-2022 at 15:14.
    stephen473 is offline
    NanoC
    Veteran Member
    Join Date: Jan 2016
    Location: Argentina
    Old 03-22-2021 , 00:01   Re: [ANY] Command Shortcuts
    Reply With Quote #2

    Nicely done!
    __________________
    NanoC is offline
    Send a message via Skype™ to NanoC
    stephen473
    Senior Member
    Join Date: Jan 2017
    Location: somewhere on earth
    Old 03-22-2021 , 04:32   Re: [ANY] Command Shortcuts
    Reply With Quote #3

    Quote:
    Originally Posted by NanoC View Post
    Nicely done!
    thank you!

    any suggestion & feature request will be welcomed.
    __________________
    Also known as Hardy`.

    Feel free to contact me if you have a private plugin request!

    My Steam Profile | Discord: Hardy`#3792
    stephen473 is offline
    Tonblader
    Senior Member
    Join Date: Jul 2011
    Location: Peru
    Old 03-22-2021 , 04:58   Re: [ANY] Command Shortcuts
    Reply With Quote #4

    these shortcuts can be executed in chat or console or can they be in both?
    I would like it to be possible in both
    Tonblader is offline
    stephen473
    Senior Member
    Join Date: Jan 2017
    Location: somewhere on earth
    Old 03-22-2021 , 09:19   Re: [ANY] Command Shortcuts
    Reply With Quote #5

    Quote:
    Originally Posted by Tonblader View Post
    these shortcuts can be executed in chat or console or can they be in both?
    I would like it to be possible in both
    currently shortcuts only works as chat triggers. so it won't work on console. but i will add that option asap.
    __________________
    Also known as Hardy`.

    Feel free to contact me if you have a private plugin request!

    My Steam Profile | Discord: Hardy`#3792

    Last edited by stephen473; 03-22-2021 at 12:16.
    stephen473 is offline
    stephen473
    Senior Member
    Join Date: Jan 2017
    Location: somewhere on earth
    Old 03-22-2021 , 10:29   Re: [ANY] Command Shortcuts
    Reply With Quote #6

    updated!

    new version 1.1
    Added option to register shortcuts as a console command. Requested by Tonblader

    see main post to download the latest version.
    __________________
    Also known as Hardy`.

    Feel free to contact me if you have a private plugin request!

    My Steam Profile | Discord: Hardy`#3792
    stephen473 is offline
    Tonblader
    Senior Member
    Join Date: Jul 2011
    Location: Peru
    Old 03-22-2021 , 15:13   Re: [ANY] Command Shortcuts
    Reply With Quote #7

    Quote:
    Originally Posted by stephen473 View Post
    updated!

    new version 1.1
    Added option to register shortcuts as a console command. Requested by Tonblader

    see main post to download the latest version.
    Thanks, is necesarry use "sm_" to execute or only the "shortcut command"?

    Similar to this:
    https://wiki.alliedmods.net/Commands...#Chat_Triggers

    Last edited by Tonblader; 03-22-2021 at 15:14.
    Tonblader is offline
    stephen473
    Senior Member
    Join Date: Jan 2017
    Location: somewhere on earth
    Old 03-23-2021 , 04:04   Re: [ANY] Command Shortcuts
    Reply With Quote #8

    Quote:
    Originally Posted by Tonblader View Post
    Thanks, is necesarry use "sm_" to execute or only the "shortcut command"?

    Similar to this:
    https://wiki.alliedmods.net/Commands...#Chat_Triggers

    no. you can register the command however you want. but even if you just register command as "fly" you need to use those chat triggers(!fly / /fly) to use it in chat. in console you can just type fly.
    __________________
    Also known as Hardy`.

    Feel free to contact me if you have a private plugin request!

    My Steam Profile | Discord: Hardy`#3792
    stephen473 is offline
    ThatKidWhoGames
    Veteran Member
    Join Date: Jun 2013
    Location: IsValidClient()
    Old 03-23-2021 , 07:06   Re: [ANY] Command Shortcuts
    Reply With Quote #9

    Beat me to it, nicely done!
    ThatKidWhoGames is offline
    stephen473
    Senior Member
    Join Date: Jan 2017
    Location: somewhere on earth
    Old 03-23-2021 , 14:26   Re: [ANY] Command Shortcuts
    Reply With Quote #10

    thank you for your precious comment
    __________________
    Also known as Hardy`.

    Feel free to contact me if you have a private plugin request!

    My Steam Profile | Discord: Hardy`#3792
    stephen473 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 07:05.


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