19.03.2013, 21:02
Hi guys
Please how to make SendClientMessage to admin for any new acoonet
Please how to make SendClientMessage to admin for any new acoonet
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.
}
}
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);
}
}
}