NetworkPlayer 2.1
by admin
- usingSystem.Collections;
- {
- public GUIManager guiManager;
- public GameObject PlayerManagerPrefab;
- publicstring PlayerName;
- privatestring MatchName =';
- privateint MatchMaxUsers =32;
- public List<MPPlayer> PlayerList =new List<MPPlayer>();
- public List<MapSetting> MapList =new List<MapSetting>();
- public MapSetting CurrentMap =null;
- publicbool IsMatchStarted =false;
- //General Multiplayer Modes
- public MPPlayer MyPlayer;
- {
- PlayerName = PlayerPrefs.GetString('PlayerName');
- DontDestroyOnLoad(gameObject);
- {
- }
- publicvoid StartServer(string servername, string serverpassword, int maxusers)
- MatchName = servername;
- MatchMaxUsers = maxusers;
- Network.InitializeServer(MatchMaxUsers, 2550, false);
- MasterServer.RegisterHost('DeathMatch', MatchName, ');
- }
- void OnServerInitialized()
- Server_PlayerJoinRequest(PlayerName, Network.player);
- {
- networkView.RPC('Server_PlayerJoinRequest', RPCMode.Server, PlayerName, Network.player);
- {
- networkView.RPC('Client_RemovePlayer', RPCMode.All, id);
- {
- {
- networkView.RPC('Client_AddPlayerToList', player, pl.PlayerName, pl.PlayerNetwork);
- networkView.RPC('Client_GetMultiplayerMatchSettings', player, CurrentMap.MapName, ', ');
- {
- }
- [RPC]
- void Server_PlayerJoinRequest(string playername, NetworkPlayer view)
- networkView.RPC('Client_AddPlayerToList', RPCMode.All, playername, view);
- void Client_AddPlayerToList(string playername, NetworkPlayer view)
- MPPlayer tempplayer =new MPPlayer();
- tempplayer.PlayerNetwork= view;
- if(Network.player view)
- MyPlayer = tempplayer;
- GameObject play = Network.Instantiate(PlayerManagerPrefab, Vector3.zero, Quaternion.identity, 5)as GameObject;
- }
- [RPC]
- {
- foreach(MPPlayer pl in PlayerList)
- if(pl.PlayerNetwork view)
- temppl = pl;
- }
- {
- }
- void Client_GetMultiplayerMatchSettings(string map, string mode, string others)
- CurrentMap = GetMap(map);
- {
- {
- {
- break;
- }
- returnget;
- void Client_LoadMultiplayerMap(string map, int prefix)
- //Network.SetLevelPrefix(prefix);
- }
- void OnGUI()
- if(!MyPlayer.PlayerIsAlive&& IsMatchStarted)
- if(IsMatchStarted && Input.GetKey(KeyCode.Tab))
- guiManager.ScoreBoard();
- }
- [RPC]
- {
- int numberspawn = Random.Range(0, Spawnpoints.Length-1);
- networkView.RPC('Client_SpawnPlayer', RPCMode.All, player, Spawnpoints[numberspawn].transform.position+new Vector3(0, 2, 0), Spawnpoints[numberspawn].transform.rotation);
- void Client_SpawnPlayer(NetworkPlayer player, Vector3 position, Quaternion rotation)
- MultiplayerManager.GetMPPlayer(player).PlayerIsAlive=true;
- MultiplayerManager.GetMPPlayer(player).PlayerHealth=100;
- {
- MyPlayer.PlayerManager.ControllerTransform.position= position;
- MyPlayer.PlayerManager.ControllerTransform.rotation= rotation;
- MyPlayer.PlayerManager.networkView.RPC('Client_PlayerAlive', RPCMode.All);
- else
- }
- void OnLevelWasLoaded()
- if(Application.loadedLevelName CurrentMap.MapLoadName&& Network.isServer)
- MatchLoaded =true;
- Spawnpoints = GameObject.FindGameObjectsWithTag('spawnpoint');
- networkView.RPC('Client_ServerLoaded', RPCMode.AllBuffered, IsMatchStarted);
- }
- [RPC]
- {
- IsMatchStarted = started;
- publicstatic MPPlayer GetMPPlayer(NetworkPlayer player)
- foreach(MPPlayer play in MultiplayerManager.instance.PlayerList)
- if(play.PlayerNetwork player)
- return play;
- }
- }
- //Deathmatch
- {
- if(GUI.Button(new Rect(5, Screen.height-40, 250, 35), 'Spawn'))
- if(Network.isServer)
- else
- networkView.RPC('Server_SpawnPlayer', RPCMode.Server, Network.player);
- }
- [RPC]
- publicvoid Client_UpdatePlayerHealthAndAlive(NetworkPlayer targetplayer, bool IsAlive, int CurrentHealth)
- MPPlayer player = MultiplayerManager.GetMPPlayer(targetplayer);
- player.PlayerHealth= CurrentHealth;
- }
- [System.Serializable]
- {
- public NetworkPlayer PlayerNetwork;
- publicint PlayerHealth =100;
- publicint PlayerScore;
- publicint PlayerDeahts;
- publicclass MapSetting
- publicstring MapName;
- public Texture MapLoadTexture;
Network Player 2.1 Pc
2 1 DIGITAL IN DIGITAL IN USB DAC AC IN AL OUT COAXIAL 5V 1A DC OUTPUT For 5V 0.6A MAX) WIRELESS LAN iPod/iPhone CONTROL OUT USB. The illustration may appear differently, depending on the model used. 4 Switch the input for the connected device to. DKBansV2 has a big developer API to customise the plugin completely. If you have questions or problems about the api, use our development channel on our discord for discussing with other developers. Sip pro 4.2.3 + in-app purchase online. The latest version of NetworkPlayer is 2.1 on Mac Informer. It is a perfect match for Streaming Media in the Audio & Video category. The app is developed by Keshwendu Kant Suryabansi.