fast commands
#7

pawn Код:
stock SendTeamMessage(team, color, message)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
          if(gTeam[i] == team)
          {
               SendClientMessage(i, color, message);
          }
    }
}
And a Command:

pawn Код:
if (strcmp("/team", cmdtext, true, 10) == 0)
{
     new idx;
     if(!strlen(strtok(cmdtext, idx)))
     {
           SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /team [text]");
           return 1;
     }
     else
     {
           new teamstring[128];
           new pName[MAX_PLAYER_NAME];
           GetPlayerName(playerid, pName, sizeof(pName));
           format(teamstring, 128, "(T): %s: %s", pName, idx);
           SendTeamMessage(gTeam[playerid], 0x00FF00AA, teamstring);
           return 1;
      }
      return true;
}
Reply


Messages In This Thread
fast commands - by ethhackerman - 17.03.2013, 16:26
Re: fast commands - by ethhackerman - 18.03.2013, 10:53
Re: fast commands - by Xeiss - 18.03.2013, 10:54
Re: fast commands - by cotyzor - 18.03.2013, 11:45
Re: fast commands - by ethhackerman - 18.03.2013, 12:04
Re: fast commands - by ethhackerman - 18.03.2013, 14:56
Re: fast commands - by erminpr0 - 18.03.2013, 18:54
Re: fast commands - by ethhackerman - 18.03.2013, 19:33
Re: fast commands - by Misiur - 18.03.2013, 19:52
Re: fast commands - by ethhackerman - 19.03.2013, 11:01

Forum Jump:


Users browsing this thread: 1 Guest(s)