10.02.2010, 07:43
So, how i can make join quit messages only wievable to rcon admins? Like when someone joins the join message only shows for rcon's. Help please!
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
format(string,sizeof(string),"%s has joined the server",PlayerName(playerid));
SendClientMessage(i,COLOR_YELLOW,string);
}
}
}
public OnPlayerDisconnect(playerid, reason) { new string[64], name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); switch(reason) { case 0: format(string,sizeof string,"%s left the server. (Timed out)",name); case 1: format(string,sizeof string,"%s left the server. (Leaving)",name); case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name); } for(new pid=0; pid<GetMaxPlayers(); pid++) { if(IsPlayerAdmin(pid)) SendClientMessage(pid, 0xFFFFFFAA,string); } return 1; }