IsPlayerNPC: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
params=<syntaxhighlight lang="lua">(playerid)</syntaxhighlight> | params=<syntaxhighlight lang="lua">(playerid)</syntaxhighlight> | ||
<poem>::playerid: The id of the player to be check. </poem>| | <poem>::playerid: The id of the player to be check. </poem>| | ||
retvals= *1 The player is an NPC | |||
*0 The player is not an NPC| | *0 The player is not an NPC| | ||
example=<source lang="lua"> | example=<source lang="lua"> |
Revision as of 16:32, 1 April 2022
Description:
Checks if a player is an NPC
Parameters:
(playerid)
playerid: The id of the player to be check.
Return Values:
*1 The player is an NPC
- 0 The player is not an NPC
Example
function onPlayerJoin(player) { if(IsPlayerNPC(player.ID)) print("An NPC connected"); }
Related Functions
The following functions may be helpful as they relate to this function in one way or another.