fCraft.World.DisableGunPhysics C# (CSharp) Method

DisableGunPhysics() public method

public DisableGunPhysics ( Player player, bool announce ) : void
player Player
announce bool
return void
        public void DisableGunPhysics( Player player, bool announce )
        {
            try {
                if ( gunPhysics == false ) {
                    player.Message( "&WAlready disabled on this world" );
                    return;
                }
                gunPhysics = false;
                CheckIfToStopPhysics();
                if ( announce )
                    Server.Message( "{0}&S disabled Gun Physics on {1}", player.ClassyName, ClassyName );
            } catch ( Exception e ) {
                Logger.Log( LogType.Error, "PhyStopGunPhysics: " + e );
            }
        }

Usage Example

Example #1
0
 public static void RevertGame() //Reset game bools/stats and stop timers
 {
     task_.Stop();
     world_.gameMode = GameMode.NULL;
     instance        = null;
     started         = false;
     if (world_.gunPhysics)
     {
         world_.DisableGunPhysics(Player.Console, true);
     }
     world_       = null;
     playerCount  = 0;
     stoppedEarly = false;
 }
All Usage Examples Of fCraft.World::DisableGunPhysics