GetClosestPlayer: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC____NOEDITSECTION__<big> NPC Scripts have the following functions too. {| style=height:1em |scope="col" style="width: 300px; text-align:left; vertical-align: top;"| *[...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Welcome| desc= Gets the closest player to an NPC| | |||
retvals=The playerid of the closest player according to the parameters specified or 255 if there is no such closest player. It checks only players streamed in.| | |||
params=<syntaxhighlight lang="lua">(checkteam=false)</syntaxhighlight> | |||
<poem>::checkteam: If this optional parameter is provided true, the id of the closest player whose team id is not that of npc will be returned.</poem>| | |||
}} | |||
Latest revision as of 05:26, 27 December 2022
Description:
Gets the closest player to an NPC
Parameters:
(checkteam=false)
checkteam: If this optional parameter is provided true, the id of the closest player whose team id is not that of npc will be returned.
Return Values:
The playerid of the closest player according to the parameters specified or 255 if there is no such closest player. It checks only players streamed in.