GetNPCCount

From Onset Developer Wiki
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