11.02.2009, 19:28
With gang chat I presume you're looking for a certain clantag in a players name
the chat command
the custom function would look a bit like this:
it won't fully work like this, but if you know a bit of coding you can easily tweak it to your needs
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;
}

