IsNPCStreamedIn: Difference between revisions

From Onset Developer Wiki
Kuzkay (talk | contribs)
No edit summary
28days (talk | contribs)
No edit summary
 
Line 9: Line 9:
{{FuncParam|npc|NPC which you want to check}}
{{FuncParam|npc|NPC which you want to check}}


{{FuncReturnValue|boolean: true or false value}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==
Line 25: Line 25:


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{NPCFunctions}}

Latest revision as of 17:17, 13 December 2019

IsNPCStreamedIn

Type: Function
Context: Server
Introduced: v1.0

Description

Checks if stated NPC is streamed in for the player

Syntax

IsNPCStreamedIn(player, npc)

Parameters

  • player
    Player which you want to check
  • npc
    NPC which you want to check

Return Value

  • Returns true on success.

Example

function npcCheck(player)
   local x, y, z = GetPlayerLocation(player)
   local npc = CreateNPC(1, x, y, z, 0)

   if IsNPCStreamedIn(player, npc) then
      AddPlayerChat('npc has been created and streamed in')
   end
end


See also