paintjobs || clan chat
#3

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;
}
the custom function would look a bit like this:
Код:
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;
}
it won't fully work like this, but if you know a bit of coding you can easily tweak it to your needs
what I must put there?
Reply


Messages In This Thread
paintjobs || clan chat - by klavins21 - 11.02.2009, 19:16
Re: paintjobs || clan chat - by [RP]Rav - 11.02.2009, 19:28
Re: paintjobs || clan chat - by klavins21 - 11.02.2009, 19:38
Re: paintjobs || clan chat - by [RP]Rav - 11.02.2009, 19:42
Re: paintjobs || clan chat - by klavins21 - 11.02.2009, 19:44
Re: paintjobs || clan chat - by [RP]Rav - 11.02.2009, 19:52
Re: paintjobs || clan chat - by klavins21 - 11.02.2009, 20:00
Re: paintjobs || clan chat - by [RP]Rav - 11.02.2009, 20:03
Re: paintjobs || clan chat - by klavins21 - 11.02.2009, 20:05
Re: paintjobs || clan chat - by [RP]Rav - 11.02.2009, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)