06.10.2010, 23:59
pawn Код:
if(!strcmp(cmdtext, "/b", true)) //Lenght is optional, so I'd rather not use it
{
if(!cmdtext[2] || (cmdtext[2] == '\1' && !cmdtext[3])
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /b [OOC CHAT]");
if(cmdtext[2] != '\1')
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /b [OOC CHAT] (don't forget to put a space between /b and your message)");
new str[128];
GetPlayerName(playerid,str, sizeof(str));
format(str, sizeof(str), "%s ((%s))", str, cmdtext[3]);
SendClientMessageToAll (COLOR_WHITE, str);
return 1;
}
\1 = space ' '
pawn Код:
if(!cmdtext[2] || (cmdtext[2] == '\1' && !cmdtext[3])