11.02.2009, 19:38
Quote:
|
Originally Posted by Rav
With gang chat I presume you're looking for a certain clantag in a players name
the chat command Код:
if (strcmp(cmdtext, "/clanchat", true) == 0)
{
if (!IsPlayerInClanChatClan(playerid))
return SendClientMessage(playerid, COLOUR, "You cannot use this command");
// do something to get a nice layout for the string here
for (new i; i < MAX_PLAYERS; i++)
{
if (!IsPlayerConnected(i))
continue;
if (IsPlayerInClanChatClan(i)
SendClientMessage(i, COLOR, string);
}
return 1;
}
Код:
stock IsPlayerInClanChatClan(playerid) // goofy function name, I know
{
new playername[32];
GetPlayerName(playerid,playername,32);
if (strfind(playername, "[CLANTAG1]", false) > -1 || strfind(playername, "]=CLANTAG2=[", false) > -1)
return 1;
return 0;
}
|

