Show / Hide Table of Contents

Class WeaponObject

Weapon object element A weapon object is a physical object that represents a weapon (usually a firearm), and is able to fire and reload. Much like a player's weapon.

Inheritance
object
Element
WorldObject
WeaponObject
Inherited Members
WorldObject.model
WorldObject.Model
WorldObject.IsLowLod
WorldObject.LowLodElement
WorldObject.DoubleSided
WorldObject.IsBreakable
WorldObject.Movement
WorldObject.scale
WorldObject.Scale
WorldObject.ApproximatedMidMovementPosition
WorldObject.ApproximatedMidMovementRotation
WorldObject.Health
WorldObject.IsVisibleInAllDimensions
WorldObject.Move(Vector3, Vector3, TimeSpan)
WorldObject.CancelMovement(bool)
WorldObject.ModelChanged
WorldObject.ScaleChanged
WorldObject.IsVisibleInAllDimensionsChanged
WorldObject.Moved
WorldObject.MovementCancelled
Element.Parent
Element.Children
Element.Associations
Element.AssociatedPlayers
Element.Id
Element.TimeContext
Element.Name
Element.position
Element.Position
Element.Right
Element.Up
Element.Forward
Element.rotation
Element.Rotation
Element.velocity
Element.Velocity
Element.turnVelocity
Element.TurnVelocity
Element.interior
Element.Interior
Element.dimension
Element.Dimension
Element.alpha
Element.Alpha
Element.areCollisionsEnabled
Element.AreCollisionsEnabled
Element.isCallPropagationEnabled
Element.IsCallPropagationEnabled
Element.isFrozen
Element.IsFrozen
Element.UpdateContext
Element.IsSync
Element.Subscribers
Element.ElementDataSubscriptions
Element.BroadcastableElementData
Element.Attachment
Element.AttachedElements
Element.IsDestroyed
Element.IsVisibleToEveryone
Element.AddSubscriber(Player)
Element.RemoveSubscriber(Player)
Element.GetAndIncrementTimeContext()
Element.CanUpdateSync(byte)
Element.Destroy()
Element.RunWithContext(Action, ElementUpdateContext)
Element.RunWithContext(Func<Task>, ElementUpdateContext)
Element.RunAsSync(Action, bool)
Element.RunAsSync(Func<Task>, bool)
Element.RemoveFrom(MtaServer)
Element.AssociateWith(Player)
Element.RemoveFrom(Player)
Element.UpdateAssociatedPlayers()
Element.AddChild(Element)
Element.RemoveChild(Element)
Element.IsChildOf(Element)
Element.SetData(string, LuaValue, DataSyncType)
Element.GetData(string, bool)
Element.SubscribeToData(Player, string)
Element.UnsubscribeFromData(Player, string)
Element.UnsubscribeFromAllData(Player)
Element.IsPlayerSubscribedToData(Player, string)
Element.GetPlayersSubcribedToData(string)
Element.AttachTo(Element, Vector3?, Vector3?)
Element.DetachFrom(Element)
Element.CreateFor(IEnumerable<Player>)
Element.CreateFor(Player)
Element.DestroyFor(IEnumerable<Player>)
Element.DestroyFor(Player)
Element.PositionChanged
Element.RotationChanged
Element.VelocityChanged
Element.TurnVelocityChanged
Element.InteriorChanged
Element.DimensionChanged
Element.AlphaChanged
Element.NameChanged
Element.CallPropagationChanged
Element.CollisionEnabledChanged
Element.FrozenChanged
Element.IdChanged
Element.AssociatedWith
Element.RemovedFrom
Element.DataChanged
Element.Attached
Element.Detached
Element.AttachedOffsetChanged
Element.Destroyed
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.Elements
Assembly: SlipeServer.Server.dll
Syntax
public class WeaponObject : WorldObject

Constructors

| Edit this page View Source

WeaponObject(ushort, Vector3)

Declaration
public WeaponObject(ushort model, Vector3 position)
Parameters
Type Name Description
ushort model
Vector3 position

Properties

| Edit this page View Source

Accuracy

Declaration
public float? Accuracy { get; set; }
Property Value
Type Description
float?
| Edit this page View Source

Ammo

Declaration
public ushort Ammo { get; set; }
Property Value
Type Description
ushort
| Edit this page View Source

BoneTarget

Declaration
public byte? BoneTarget { get; set; }
Property Value
Type Description
byte?
| Edit this page View Source

CheckBuildings

Declaration
public bool CheckBuildings { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

CheckCarTires

Declaration
public bool CheckCarTires { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

CheckDummies

Declaration
public bool CheckDummies { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

CheckObjects

Declaration
public bool CheckObjects { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

CheckPeds

Declaration
public bool CheckPeds { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

CheckVehicles

Declaration
public bool CheckVehicles { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

ClipAmmo

Declaration
public ushort ClipAmmo { get; set; }
Property Value
Type Description
ushort
| Edit this page View Source

DamagePerHit

Declaration
public ushort? DamagePerHit { get; set; }
Property Value
Type Description
ushort?
| Edit this page View Source

DisableWeaponModel

Declaration
public bool DisableWeaponModel { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

ElementType

The element type as per MTA's specifications. Multiple C# types can share the same MTA element type.

Declaration
public override ElementType ElementType { get; }
Property Value
Type Description
ElementType
Overrides
WorldObject.ElementType
| Edit this page View Source

IgnoreSomeObjectForCamera

Declaration
public bool IgnoreSomeObjectForCamera { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

InstantReload

Declaration
public bool InstantReload { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

IsChanged

Declaration
public bool IsChanged { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Owner

Declaration
public Element? Owner { get; set; }
Property Value
Type Description
Element
| Edit this page View Source

SeeThroughStuff

Declaration
public bool SeeThroughStuff { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

ShootIfTargetBlocked

Declaration
public bool ShootIfTargetBlocked { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

ShootIfTargetOutOfRange

Declaration
public bool ShootIfTargetOutOfRange { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

ShootThroughStuff

Declaration
public bool ShootThroughStuff { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

TargetElement

Declaration
public Element? TargetElement { get; set; }
Property Value
Type Description
Element
| Edit this page View Source

TargetPosition

Declaration
public Vector3? TargetPosition { get; set; }
Property Value
Type Description
Vector3?
| Edit this page View Source

TargetRange

Declaration
public float? TargetRange { get; set; }
Property Value
Type Description
float?
| Edit this page View Source

TargetType

Declaration
public WeaponTargetType TargetType { get; set; }
Property Value
Type Description
WeaponTargetType
| Edit this page View Source

WeaponRange

Declaration
public float? WeaponRange { get; set; }
Property Value
Type Description
float?
| Edit this page View Source

WeaponState

Declaration
public WeaponState WeaponState { get; set; }
Property Value
Type Description
WeaponState
| Edit this page View Source

WheelTarget

Declaration
public byte? WheelTarget { get; set; }
Property Value
Type Description
byte?

Methods

| Edit this page View Source

AssociateWith(MtaServer)

Declaration
public WeaponObject AssociateWith(MtaServer server)
Parameters
Type Name Description
MtaServer server
Returns
Type Description
WeaponObject

Extension Methods

ElementPropertyRelayingExtensions.AddRelayers(Element)
ElementPropertyRelayingExtensions.RelayChange(Element, Packet)
WorldObjectPropertyRelayingExtensions.AddWorldObjectRelayers(WorldObject)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX