Chat Commands Interfering
#1

So i have two chat commands and they interfear.
The first command is /t
and the other is /tt

when i type /t and the message example:

/t test -> (LOCAL) Player said test.

and it works with it, but when i use /tt i get this example:

/tt test -> (LOCAL) Player said t test.
it is supposed to say (LOCAL-TELE) Player said test

Help! Please

here are the commands....

Код:
if (strcmp("/t", cmdtext, true, 2) == 0)
    {
        if(TEAMS)
        {
	    	if(strlen(cmdtext) <= 3)
			{
	    		SendClientMessage(playerid, COLOR_WHITE, "USAGE: /t (Text)");
	    		return 1;
	    	}
		new output[255];
	    	strmid(output,cmdtext,2,strlen(cmdtext));
	    	for(new i=0;i<MAX_PLAYERS;i++)
			{
	    		if() // All the teams
				{
 					format(string, sizeof(string), "(LOCAL) %s said %s.", playername, output);
		    		SendClientMessage(i, COLOR_ORANGE, string);
	    		}
	    	}
	    	return 1;
		}
		else
		{
		    // can't use command message
	    }
	    return 1;
  	}
	
	if (strcmp("/tt", cmdtext, true, 2) == 0)
    {
        if(TEAMS)
        {
	    	if(strlen(cmdtext) <= 3)
			{
	    		SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tt (Text)");
	    		return 1;
	    	}
		new output[255];
	    	strmid(output,cmdtext,2,strlen(cmdtext));
	    	for(new i=0;i<MAX_PLAYERS;i++)
			{
	    		if() // All the teams
				{
 					format(string, sizeof(string), "(LOCAL-TELE) %s said %s.", playername, output);
		    		SendClientMessage(i, COLOR_WHITE, string);
	    		}
	    	}
	    	return 1;
		}
		else
		{
		    // can't use command message
	    }
	    return 1;
  	}
Reply


Messages In This Thread
[SOLVED! DELETE!] Chat Commands Interfering - by [HIR]AlbanianSoilder - 22.12.2010, 02:11
Re: Chat Commands Interfering - by iFriSki - 22.12.2010, 02:17
Re: Chat Commands Interfering - by Krx17 - 22.12.2010, 02:23
Re: Chat Commands Interfering - by [HIR]AlbanianSoilder - 22.12.2010, 06:00

Forum Jump:


Users browsing this thread: 3 Guest(s)