How i can make admin to see factins chat
#1

this i my command
PHP код:
if(strcmp(cmd"/faction"true) == || strcmp(cmd"/f"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pMuted] != 0)
            {
                
SendClientMessage(playeridCOLOR_ADMINCMD" Ти си заглушен и не можеш да пишеш.");
                return 
1;
            }
            if(
PlayerInfo[playerid][pMember] == TEAM_CIVILIAN)
            {
                
SendClientMessage(playeridCOLOR_ADMINCMD" Неможеш да използваш тази команда понеже ти неси в банда или мафия.");
                return 
1;
            }
            new 
length strlen(cmdtext);
            new 
team gTeam[playerid];
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[256];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridCOLOR_WHITE"USAGE: (/f)action [team chat]");
                return 
1;
            }
            new 
ranktext[256];
               switch(
PlayerInfo[playerid][pRank])
            {
                  case 
1format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[playerid][pMember]][fRank1]);
                case 
2format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[playerid][pMember]][fRank2]);
                case 
3format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[playerid][pMember]][fRank3]);
                case 
4format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[playerid][pMember]][fRank4]);
                case 
5format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[playerid][pMember]][fRank5]);
                case 
6format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[playerid][pMember]][fRank6]);
            }
            
format(stringsizeof(string), "[ID:%d Rank:%s] %s : %s",playeridranktextPlayerName(playerid), result);
            
SendFactionMessage(teamCOLOR_LIGHTBLUEstring);
        }
        return 
1;
    } 
Reply
#2

how is going your admin variable?
Reply
#3

Do you have something like
pawn Код:
SendAdminMessage(team, COLOR_LIGHTBLUE, string);
Reply
#4

no i don't have
Reply
#5

give me a variable for Admins, and i will do it for you..
Reply
#6

pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
    if(IsPlayerAdmin(i) || PlayerInfo[i][pAdmin] >= 1)
    {
        SendClientMessage(i, COLOR_ADMINCMD, /*message*/);
    }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)