DestroyNPC

From Onset Developer Wiki
Revision as of 19:55, 13 November 2019 by Kuzkay (talk | contribs)
DestroyNPC

Type: Function
Context: Server
Introduced: v1.0

Description

Destroy/remove any NPC by its id

Syntax

DestroyNPC(npc)

Parameters

  • npc
    NPC You want to destroy/remove

Return Value

  • __EDIT_ME__

Example

function deleteNPC(player, npc)
   if IsValidNPC(tonumber(npc)) then --Check if npc is valid first
      DestroyNPC(tonumber(npc))
   end
end
AddCommand('removenpc', deleteNPC)


See also

__EDIT_ME__