static void PositionCamera(SharpBridge.Timer.TimerParams param) { Player player = Entities.getPlayer((int)param.@params[0]); if (player != null) { player.cam_setPos(cameraPos, 0); player.cam_setLookAt(cameraLookPos); } }
static void Run(SharpBridge.Timer.TimerParams param) { List <Player> players = Entities.getPlayers(); foreach (Player player in players) { int pId = player.getID(); if (!Game.AccountManager.IsOnline(pId)) { continue; } player.requestWeapons(); } }
public static bool onPlayerCredentials(int playerid) { Player player = Entities.getPlayer(playerid); if (player == null) { return(false); } player.sendMsg("(2) Spawning", 0xFF00FFFF); player.spawn(spawnPos); player.setFrozen(true); //Add a timer to allow the player to spawn first and then set their camera position SharpBridge.Timer.TimerParams tParams = new SharpBridge.Timer.TimerParams(); object buffer = playerid; [email protected](buffer); SharpBridge.Timer.Manager.RegisterTimer(PositionCamera, 2000, 1, tParams); //Text that stays for 500 seconds (8 minutes and 20 seconds) player.drawInfoText("Welcome " + player.getNick() + "~n~Use ~r~/register~w~ to create an account~n~Or ~b~/login~w~ to login", 500000); return(true); }