Seeing team Radio
#4

pawn Код:
public OnPlayerText(playerid, text[])
{
    new strName[MAX_PLAYER_NAME], strOut[129];

    GetPlayerName(playerid, strName, sizeof(strName));
    if(text[0] == ',') // he used ' ! ' before text in chat box ( change as you wish )
    {
        new string[129];
        strmid(string, text, 1, strlen(text), 129);
        if(gTeam[playerid] == YOURTEAMHERE || gTeam[playerid] == YOURTEAMHERE || gTeam[playerid] == YOURTEAMHERE || gTeam[playerid] == YOURTEAMHERE)
        {
            format(strOut, 129, "[Team Radio] %s: %s", strName, string);

            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(gTeam[i] == gTeam[playerid]) // change this if you're not using gTeam
                    SendClientMessage(i, 0x00FF00FF, strOut);
            }
        }
        return 0; // prevent the message to be sent on global chat
    }
    return 1;
}
the example i gave last hour ago is for 1 team only. the code i gave now is for 4 teams
Reply


Messages In This Thread
Seeing team Radio - by iOmar - 10.05.2012, 07:02
Re: Seeing team Radio - by JaKe Elite - 10.05.2012, 07:05
Re: Seeing team Radio - by iOmar - 10.05.2012, 08:21
Re: Seeing team Radio - by JaKe Elite - 10.05.2012, 08:27
Re: Seeing team Radio - by iOmar - 10.05.2012, 10:18
Re: Seeing team Radio - by JaKe Elite - 10.05.2012, 10:26
Re: Seeing team Radio - by iOmar - 10.05.2012, 10:33
Re: Seeing team Radio - by iOmar - 10.05.2012, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)