Difference between revisions of "MDE Scripting: GetActivePlayer"

From Nomad DB
Line 16: Line 16:
 
==Description==
 
==Description==
 
Returns the [[MDE Scripting: Entities#Player|Player]] entity.
 
Returns the [[MDE Scripting: Entities#Player|Player]] entity.
 
Shortcut : '''''getp()'''''
 
  
  
Line 37: Line 35:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
local Player = game.game:GetActivePlayer() -- Player returns the player
 
local Player = game.game:GetActivePlayer() -- Player returns the player
</syntaxhighlight><syntaxhighlight lang="lua">
+
</syntaxhighlight>
 +
 
 +
 
 +
 
 +
==Aliases==
 +
<syntaxhighlight lang="lua">
 
local Player = getp() -- Player returns the player
 
local Player = getp() -- Player returns the player
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 01:24, 16 October 2020

Syntax
game.game:GetActivePlayer()
Module Game
Library Game
Game Mafia: Definitive Edition


Description

Returns the Player entity.


Returns

# Type Description
1 Entity (C_SceneObjectLuaWrapper => player_archetype-2-) Player entity


Examples

local Player = game.game:GetActivePlayer() -- Player returns the player


Aliases

local Player = getp() -- Player returns the player