22.12.2010, 02:11
(
Последний раз редактировалось [HIR]AlbanianSoilder; 22.12.2010 в 06:01.
)
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....
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;
}

