As in topic, please look at code in line with "if(IsAdmin(NewPlayer))", IsAdmin is function from AccessControl class.
PHP:
class Test extends KFMutator;
function NotifyLogin(Controller NewPlayer)
{
super.PostLogin(NewPlayer);
/// Send welcome message to the connected player
NewPlayer.ClientMessage("Welcome to the server.");
/// Broatcast message to all of players on the server
local Controller Player;
foreach WorldInfo.AllControllers(class'Controller', Player)
if (Player.bIsPlayer && !Player.IsA('PlayerController') && Player != NewPlayer)
{
if(IsAdmin(NewPlayer))
Player.ClientMessage("Admin '"$NewPlayer.PlayerReplicationInfo.PlayerName"' connected");
else
Player.ClientMessage("Player '"$NewPlayer.PlayerReplicationInfo.PlayerName"' connected");
}
}
Last edited: