22.12.2010, 02:17
Not promising anything, as I don't use strcmp anymore, but..
[pawn][/pawn] for your code tags.
pawn Код:
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, 3) == 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;
}