Difference between revisions of "MDE Scripting: GetActivePlayer"
From Nomad DB
Line 18: | Line 18: | ||
Shortcut : '''''getp()''''' | Shortcut : '''''getp()''''' | ||
− | |||
Line 33: | Line 32: | ||
|} | |} | ||
− | == | + | |
+ | |||
+ | ==Examples== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local Player = game.game:GetActivePlayer() -- Player returns the player | local Player = game.game:GetActivePlayer() -- Player returns the player |
Revision as of 01:22, 16 October 2020
Syntax | game.game:GetActivePlayer()
|
---|---|
Module | Game |
Library | Game |
Game | Mafia: Definitive Edition |
Description
Returns the Player entity.
Shortcut : getp()
Returns
# | Type | Description |
---|---|---|
1 | Entity (C_SceneObjectLuaWrapper => player_archetype-2-) | Player entity |
Examples
local Player = game.game:GetActivePlayer() -- Player returns the player
local Player = getp() -- Player returns the player