Team Announcement
#1

Hi,

I'm trying to make a team announcement for my roleplay,
And im not particulley sure how to do it,
Im using sendclientmessage atm,
And i dont know what card to use,
Im wondering if this will work
pawn Код:
if( !strcmp(cmdtext, "/team",true ))
    {
    SendClientMessage(TEAM_FBI, COLOR-WHITE, "Test Positive");
If not can anyone tell me what function to use, Thankz
Reply
#2

use loop for , not that "shit"
Reply
#3

It's ready Message?

or like this:

Код:
Police Team(JoeDaDude) says: ( Something )
if is like my example, i have a code for you
Reply
#4

Suggest you use:
pawn Код:
forward SendCopMessage(color, text[]);

public SendCopMessage(color, text[])
{
  for(new i = 0; i < MAX_PLAYERS; i ++)
    {
    if(IsPlayerConnected(i))
        {
        if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
            {
        SendClientMessage(i, color, text);
      }
    }
  }
  return 1;
}
You can Mod it to work for other Factions and also as /r
Reply
#5

Quote:
Originally Posted by Hot
It's ready Message?

or like this:

Код:
Police Team(JoeDaDude) says: ( Something )
if is like my example, i have a code for you
Yes that is what i am indeed trying to achieve
Reply
#6

pawn Код:
if(strcmp(cmd, "/radio", true) == 0)
    {
        if(gTeam[playerid] == TEAM_FBI)
            {
                if ((strlen(cmdtext) > 7)&&(strlen(cmdtext) <= 50))
                    {
                    new name[MAX_PLAYERS];
                    new message[128];
                    strmid(message,cmdtext,7,strlen(cmdtext));
                    GetPlayerName(playerid,name,sizeof(name));
                    format(string,sizeof(string),"-> Police Radio(%s): %s", name, message);
                    SendCopMessage(0xFFFF00AA, string);
                    return 1;
                    }

                    else return SendClientMessage(playerid, 0xFFFF00AA, "-> You mean: /radio [Message]");
                    }

If you want to change the command (Maybe from /radio to /r, talk with me, cause then we will need to change some things.)

                    else return SendClientMessage(playerid, 0xFFFF00AA, "-> You are not a Cop!");
                    }
pawn Код:
forward SendCopMessage(color, text[]);

public SendCopMessage(color, text[])
{
  for(new i = 0; i < MAX_PLAYERS; i ++)
{
    if(IsPlayerConnected(i))
{
        SendClientMessage(i, color, text);
      }
    }
  return 1;
}
Reply
#7

Hot, I posted the function before you ... he can now make it by himself using the function i posted
Reply
#8

Ok, It works in a way, And in a way it dosent, If i say /radio Hello
It returns back as Unknown Command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)