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

How to make !command work without !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aairin
New Member
Join Date: May 2016
Old 05-22-2016 , 13:56   How to make !command work without !
Reply With Quote #1

Like in RTD, you can use either !rtd or just "rtd".
How to do it?
aairin is offline
Addicted.
AlliedModders Donor
Join Date: Dec 2013
Location: 0xA9D0DC
Old 05-22-2016 , 14:02   Re: How to make !command work without !
Reply With Quote #2

You can hook the chat.

PHP Code:
public OnPluginStart()
{
    
AddCommandListener(HookPlayerChat"say");
}

public 
Action HookPlayerChat(int client, const char[] commandint args)
{
    
char szText[256];
    
GetCmdArg(1szTextsizeof(szText));
    
    if (
StrEqual(szText"<COMMAND TRIGGER>"))
    {
        
//DO STUFF HERE

        
return Plugin_Handled// If you want to remove block the chat message from displaying
    
}

    return 
Plugin_Continue;


Last edited by Addicted.; 05-22-2016 at 14:03.
Addicted. is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-22-2016 , 14:15   Re: How to make !command work without !
Reply With Quote #3

Quote:
Originally Posted by oaaron99 View Post
You can hook the chat.

Spoiler
say_team is also a thing.

Also, https://sm.alliedmods.net/new-api/co...ientSayCommand
__________________

Last edited by ddhoward; 05-22-2016 at 14:15.
ddhoward is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 05-22-2016 , 15:56   Re: How to make !command work without !
Reply With Quote #4

Quote:
Originally Posted by ddhoward View Post
+1
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick 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 14:20.


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