[Help] Team Chats
#6

I am not sure If I placed it in the wrong area:
Код:
if(strcmp("/team", cmdtext, true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
     GetPlayerName(playerid, sendername, sizeof(sendername));
     while ((idx < strlen(cmdtext)) && (cmdtext[idx] <= ' '))
     {
        idx++;
     }
     new offset = idx;
     new result[64];
     while ((idx < strlen(cmdtext)) && ((idx - offset) < (sizeof(result) - 1)))
     {
        result[idx - offset] = cmdtext[idx];
        idx++;
     }
     result[idx - offset] = EOS;
     if(!strlen(result))
     {
        SendClientMessage(playerid, COLOR_WHITE, "Usage: /team [Text]");
     }
     else
     {
        format(string, sizeof(string), "%s: %s", sendername, result);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
          if(GetPlayerTeam(i) == TEAM_COP) // Add Team Here?
          {
             SendClientMessage(i, COLOR_WHITE, string);
          }
        }
     }
   }
}
}
Reply


Messages In This Thread
[Help] Team Chats - by Albanian1980 - 13.06.2010, 08:29
Re: [Help] Team Chats - by LTomi - 13.06.2010, 08:42
Re: [Help] Team Chats - by TheInnocentOne - 13.06.2010, 08:46
Re: [Help] Team Chats - by Albanian1980 - 13.06.2010, 09:09
Re: [Help] Team Chats - by TheInnocentOne - 13.06.2010, 09:12
Re: [Help] Team Chats - by Albanian1980 - 13.06.2010, 09:24
Re: [Help] Team Chats - by TheInnocentOne - 13.06.2010, 09:27
Re: [Help] Team Chats - by Albanian1980 - 13.06.2010, 09:29
Re: [Help] Team Chats - by Albanian1980 - 13.06.2010, 09:55

Forum Jump:


Users browsing this thread: 1 Guest(s)