GetNPCCount

From Onset Developer Wiki
Revision as of 13:35, 20 November 2019 by 28days (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
GetNPCCount

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Get the number of spawned NPCs.

Syntax

GetNPCCount()

Parameters

  • This function has no parameters.

Return Value

  • Returns the NPC count.

Example

AddCommand("npc", function(playerid)
    AddPlayerChat(playerid, "Total NPC count: "..GetNPCCount()..".")
end)

See also