Raised This Month: $ Target: $400
 0% 

command help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SPT1
Senior Member
Join Date: Aug 2012
Old 08-25-2012 , 09:17   command help
Reply With Quote #1

how will i let it work
if anyone says /commands and /command
or /commandaaaaa
now it only works if anyone says /command
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN ""
#define VERSION ""
#define AUTHOR ""


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /command""command_say");
}
public 
command_say(id)
{
 
show_motd(id"command.txt")

__________________
AMXMODX

Last edited by SPT1; 08-25-2012 at 09:20.
SPT1 is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-25-2012 , 09:20   Re: command help
Reply With Quote #2

Just add:

PHP Code:
register_clcmd("say /commands""command_say"); 
Torge is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 08-25-2012 , 09:21   Re: command help
Reply With Quote #3

no check it again
i need it to detect like
/commandabdaf
or anything else afetr /command
then also the motd will come
__________________
AMXMODX
SPT1 is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-25-2012 , 09:25   Re: command help
Reply With Quote #4

As much as I can understand you mean that it don't work?

PHP Code:
register_clcmd("say /commands""commands_say");

public 
commands_say(id)
{
show_motd(id"command.txt")


Last edited by Torge; 08-25-2012 at 09:25.
Torge is offline
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 08-25-2012 , 09:25   Re: command help
Reply With Quote #5

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "311313"
#define VERSION "1.0"
#define AUTHOR "grs4"

new command[] = "/command"
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say""say")
}
public 
say(id)
{
    new 
szTxt[128]
    
read_args(szTxt127)
    
remove_quotes(szTxt)
    if(
containi(szTxtcommand))
    {
        
command_say(id);
    }
}
public 
command_say(id)
{
    
show_motd(id"command.txt")

Is that it ?

Last edited by grs4; 08-25-2012 at 09:26.
grs4 is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 08-25-2012 , 09:27   Re: command help
Reply With Quote #6

yes it doesn't works if anyone type /command
if i put
PHP Code:
register_clcmd("say /commands""commands_say"); 
then /command doesn't works
but if i make it like this
PHP Code:
register_clcmd("say /command""commands_say"); 
then /commands doesn't work
__________________
AMXMODX
SPT1 is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-25-2012 , 09:31   Re: command help
Reply With Quote #7

Well, I tested it and it works fine... Did you forgot to create command.txt in your cstrike folder ?

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN ""
#define VERSION ""
#define AUTHOR ""


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /command""command_say");
    
register_clcmd("say /commands""command_say");
}
public 
command_say(id)
{
 
show_motd(id"command.txt")

Torge is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 08-25-2012 , 09:42   Re: command help
Reply With Quote #8

Quote:
Originally Posted by Torge View Post
Well, I tested it and it works fine... Did you forgot to create command.txt in your cstrike folder ?

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN ""
#define VERSION ""
#define AUTHOR ""


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /command""command_say");
    
register_clcmd("say /commands""command_say");
}
public 
command_say(id)
{
 
show_motd(id"command.txt")

thanks
__________________
AMXMODX
SPT1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-25-2012 , 12:06   Re: command help
Reply With Quote #9

Quote:
Originally Posted by Torge View Post
Well, I tested it and it works fine... Did you forgot to create command.txt in your cstrike folder ?

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN ""
#define VERSION ""
#define AUTHOR ""


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /command""command_say");
    
register_clcmd("say /commands""command_say");
}
public 
command_say(id)
{
 
show_motd(id"command.txt")

That is still not what he asked for. I don't understand why he said thanks. The closest one to the correct code according to the actual request was posted by grs4.
__________________
fysiks is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 08-25-2012 , 14:11   Re: command help
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
That is still not what he asked for. I don't understand why he said thanks. The closest one to the correct code according to the actual request was posted by grs4.
that one didn't work
__________________
AMXMODX
SPT1 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 05:49.


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