Help : Massegin for new acconet
#1

Hi guys

Please how to make SendClientMessage to admin for any new acoonet
Reply
#2

After your register function add this

pawn Код:
foreach(Player, i)
            {
                             if(PlayerInfo[playerid][pAdmin] >= 1)
                             {
                                  SendClientMessage(playerid, COLORBLAHBLAH, "A new player has registered"); //Feel free to define a string that calls the player's name etc.
                              }
                        }
Reply
#3

pawn Код:
public OnPlayerConnect(playerid) //or whereever you register your player
{
     SendMessageToRAdmins(/*color_here*/,"A new player has registered");
     return 1;
}

stock SendMessageToRAdmins(color,const msg[])
{
   #if defined foreach
   foreach(Player, i)
   #else
   for( new i = 0; i != MAX_PLAYERS; i++ )
   #endif
   {
        if(pInfo[i][pAdmin] >= 1 && pInfo[i][Logged] == 1)
        {
            SendClientMessage(i,color,msg);
        }
   }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)