Class CustomWeapon
Represents a custom weapon that can be placed in the world
Assembly: SlipeClient.dll
Syntax
[DefaultElementClass(ElementType.Weapon)]
public class CustomWeapon : PhysicalElement
Constructors
|
Improve this Doc
View Source
CustomWeapon(SharedWeaponModel, Vector3)
Create a custom weapon at a certain position
Declaration
public CustomWeapon(SharedWeaponModel model, Vector3 position)
Parameters
Properties
|
Improve this Doc
View Source
Ammo
Get and set the ammo of this weapon
Declaration
public int Ammo { get; set; }
Property Value
|
Improve this Doc
View Source
AmmoInClip
Get and set the ammo currently in the clip
Declaration
public int AmmoInClip { get; set; }
Property Value
|
Improve this Doc
View Source
FiringRate
Set the firing rate of this weapon
Declaration
public int FiringRate { get; set; }
Property Value
|
Improve this Doc
View Source
State
Get and set the state of this weapon
Declaration
public WeaponState State { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
Fire()
Declaration
Returns
|
Improve this Doc
View Source
ResetFiringRate()
Reset the firing rate of this weapon
Declaration
public bool ResetFiringRate()
Returns
|
Improve this Doc
View Source
SetTarget()
Have the weapon target along its rotation
Declaration
Returns
|
Improve this Doc
View Source
SetTarget(Ped, Bone)
Have the weapon target a ped at a specific bone
Declaration
public bool SetTarget(Ped ped, Bone bone)
Parameters
Type |
Name |
Description |
Ped |
ped |
|
Bone |
bone |
|
Returns
|
Improve this Doc
View Source
SetTarget(BaseVehicle, Tire)
Have the weapon target a vehicle tire
Declaration
public bool SetTarget(BaseVehicle vehicle, Tire tire)
Parameters
Returns
|
Improve this Doc
View Source
SetTarget(PhysicalElement)
Have the weapon target the center of any element (vehicle, ped, player, world object)
Declaration
public bool SetTarget(PhysicalElement physicalElement)
Parameters
Returns
|
Improve this Doc
View Source
SetTarget(Vector3)
Have the weapon target a position
Declaration
public bool SetTarget(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
Returns
Events
|
Improve this Doc
View Source
OnFire
Declaration
public event CustomWeapon.OnFireHandler OnFire
Event Type
Extension Methods