GetNPCHealth: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetNPCHealth(npc)}} {{FuncParameters}} {{FuncParam|npc|__EDIT_ME__}} {{FuncReturnValue|__EDIT_ME_..." |
No edit summary |
||
Line 6: | Line 6: | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|npc| | {{FuncParam|npc|NPC you want to get health of}} | ||
{{FuncReturnValue| | {{FuncReturnValue|NPC Health}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
function checkHealth(player, npc) | |||
AddPlayerChat(player, 'NPC has: ' .. GetNPCHealth(npc) .. ' health') | |||
end | |||
AddCommand('npchealth', checkHealth) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
__EDIT_ME__ | __EDIT_ME__ |
Revision as of 19:53, 13 November 2019
Description
__EDIT_ME__
Syntax
GetNPCHealth(npc)
Parameters
- npc
NPC you want to get health of
Return Value
- NPC Health
Example
function checkHealth(player, npc)
AddPlayerChat(player, 'NPC has: ' .. GetNPCHealth(npc) .. ' health')
end
AddCommand('npchealth', checkHealth)
See also
__EDIT_ME__