LibAction: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "Callbacks OnTargetCleared(targetpid, reason) OnTargetOutOfRange(targetid) OnPullingTrigger([integer] keys, [Vector]pos, [float]angle, [integer]health, [integer]armour, [integer]weapon, [integer]ammo, [Vector]speed, [Vector]aimpos, [Vector]aimdir, [bool]isCrouching, [bool]isReloading ) -Called when target is out of range of the weaponrange of the current weapon of npc. If nothing is specified, npc resumes shooting when target comes in range again. Functions ShootTarget(p...")
 
No edit summary
Line 1: Line 1:
Callbacks
==Callbacks==
OnTargetCleared(targetpid, reason)
1. OnTargetCleared<source lang="lua">
OnTargetOutOfRange(targetid)
OnTargetCleared([integer]targetpid, [integer]reason)</source>
2. OnTargetOutOfRange
<source lang="lua">OnTargetOutOfRange([integer]targetid)</source>
Called when target is out of range of the weaponrange of the current weapon of npc. If target is not cleared, npc resumes shooting when target comes in range again.
3. OnPullingTrigger
<source lang="lua">
OnPullingTrigger([integer] keys, [Vector]pos,  [float]angle, [integer]health, [integer]armour, [integer]weapon, [integer]ammo, [Vector]speed, [Vector]aimpos, [Vector]aimdir, [bool]isCrouching, [bool]isReloading )
OnPullingTrigger([integer] keys, [Vector]pos,  [float]angle, [integer]health, [integer]armour, [integer]weapon, [integer]ammo, [Vector]speed, [Vector]aimpos, [Vector]aimdir, [bool]isCrouching, [bool]isReloading )
-Called when target is out of range of the weaponrange of the current weapon of npc. If nothing is specified, npc resumes shooting when target comes in range again.
</source>
 
Functions
Functions
ShootTarget(playerid)
ShootTarget(playerid)
ClearTarget()
ClearTarget()
GetTarget()
GetTarget()

Revision as of 04:10, 20 February 2023

Callbacks

1. OnTargetCleared

OnTargetCleared([integer]targetpid, [integer]reason)

2. OnTargetOutOfRange

OnTargetOutOfRange([integer]targetid)

Called when target is out of range of the weaponrange of the current weapon of npc. If target is not cleared, npc resumes shooting when target comes in range again. 3. OnPullingTrigger

OnPullingTrigger([integer] keys, [Vector]pos,  [float]angle, [integer]health, [integer]armour, [integer]weapon, [integer]ammo, [Vector]speed, [Vector]aimpos, [Vector]aimdir, [bool]isCrouching, [bool]isReloading )

Functions ShootTarget(playerid) ClearTarget() GetTarget()