[HELP] portable radio
#2

Do you mean you want to have all players with each skin stated to communicate with each other? if so..

pawn Код:
stock SendPRTransmission(color, msg[], team)
{
    for(new i; i < MAX_PLAYERS; i++) // foreach(Player, i)
    {
         if(GetPlayerSkin(i) == team)
         {
             SendClientMessage(i, color, msg);
         }
    }
    return 1;    
}

CMD:pr(playerid, params[])
{
   new string[256], name[MAX_PLAYER_NAME];
    if(IsPlayerLogged[playerid]) // Whatever variable you use for checking if logged or not.
    {
        if(isnull(params)) return SendClientMessage(playrid, SOME_COLOR,"USAGE: /pr [text]");
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        format(string, sizeof(string),"[PR]: %s: %s", name, params);
        if(GetPlayerSkin(playerid) == 157) return SendPRTransmission(SOME_COLOR, string, 157); // So on.
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] portable radio - by V4at - 25.06.2012, 10:47
Re: [HELP] portable radio - by Randy More - 25.06.2012, 11:16

Forum Jump:


Users browsing this thread: 1 Guest(s)