Radio Issue
#1

not sure what i did wrong but it worked 1 time and that was about it, i did /r hi all i saw was this

*Radio:Tanker305:

then when i tryed it the next time it gave me unknown command, knowing me it is most likely a incredibly simple mistake i overlooked

pawn Код:
SendArmyMessage(color, text[])
{
  for(new i = 0; i < MAX_PLAYERS; i ++)
    {
    if(IsPlayerConnected(i))
        {
        if (gTeam[i] == TEAM_ARMY)
            {
        SendClientMessage(i, color, text);
      }
    }
  }
}
SendRebalMessage(color, text[])
{
  for(new i = 0; i < MAX_PLAYERS; i ++)
    {
    if(IsPlayerConnected(i))
        {
        if (gTeam[i] == TEAM_REBAL)
            {
        SendClientMessage(i, color, text);
      }
    }
  }
}
pawn Код:
if(strcmp(cmdtext , "/r", true) == 0)
    {
        if (gTeam[playerid] == TEAM_ARMY)
        {
            if ((strlen(cmdtext) >= 1)&&(strlen(cmdtext) <= 3))
            {
                new string[128];
                new playername[MAX_PLAYER_NAME];
                GetPlayerName(playerid,playername,sizeof(playername));
                format(string,sizeof(string),"*Radio: %s:%s",playername,cmdtext[128]);
                SendArmyMessage(COLOR_RADIO, string);
            }
            else return SendClientMessage(playerid, 0xFFFF00AA, "Usage: /r [message]");
        }
        if (gTeam[playerid] == TEAM_REBAL)
        {
            if ((strlen(cmdtext) >= 1)&&(strlen(cmdtext) <= 3))
            {
                new string[128];
                new playername[MAX_PLAYER_NAME];
                GetPlayerName(playerid,playername,sizeof(playername));
                format(string,sizeof(string),"*Radio: %s:%s",playername,cmdtext[128]);
                SendRebalMessage(COLOR_RADIO, string);
            }
            else return SendClientMessage(playerid, 0xFFFF00AA, "Usage: /r [message]");
        }
       
    }
Reply


Messages In This Thread
Radio Issue - by [LCG]TANKER - 17.11.2009, 20:31
Re: Radio Issue - by LarzI - 17.11.2009, 21:04
Re: Radio Issue - by [LCG]TANKER - 17.11.2009, 21:25
Re: Radio Issue - by LarzI - 17.11.2009, 21:32
Re: Radio Issue - by [LCG]TANKER - 18.11.2009, 00:06
Re: Radio Issue - by _Vortex - 18.11.2009, 03:25
Re: Radio Issue - by [LCG]TANKER - 18.11.2009, 03:34
Re: Radio Issue - by [LCG]TANKER - 18.11.2009, 16:38

Forum Jump:


Users browsing this thread: 5 Guest(s)