SetNPCHealth: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetNPCHealth(npc, health)}} {{FuncParameters}} {{FuncParam|npc|__EDIT_ME__}} {{FuncParam|health|__..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Set the NPC health.}} | ||
{{FuncSyntax|SetNPCHealth(npc, health)}} | {{FuncSyntax|SetNPCHealth(npc, health)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|npc| | {{FuncParam|npc|The NPC identifier.}} | ||
{{FuncParam|health| | {{FuncParam|health|The health in floating point value.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|This function returns nothing.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
SetNPCHealth(npcid, 100.0) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:NPCFunctions}} |
Latest revision as of 15:20, 19 November 2019
Description
Set the NPC health.
Syntax
SetNPCHealth(npc, health)
Parameters
- npc
The NPC identifier. - health
The health in floating point value.
Return Value
- This function returns nothing.
Example
SetNPCHealth(npcid, 100.0)
See also
- GetStreamedNPC
- GetNPCLocation
- SetNPCOutline
- SetNPCPropertyValue
- GetNPCPropertyValue
- CreateNPC
- DestroyNPC
- IsValidNPC
- GetAllNPC
- GetNPCCount
- IsNPCStreamedIn
- SetNPCLocation
- GetNPCLocation
- SetNPCHealth
- GetNPCHealth
- SetNPCAnimation
- SetNPCHeading
- GetNPCHeading
- SetNPCTargetLocation
- SetNPCFollowPlayer
- SetNPCFollowVehicle
- SetNPCRagdoll
- SetNPCRespawnTime