Difference between revisions of "MDE Scripting: GetActivePlayer"
From Nomad DB
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Page_MDE}} | ||
{| class="wikitable" | {| class="wikitable" | ||
!Syntax | !Syntax | ||
Line 4: | Line 5: | ||
|- | |- | ||
!Module | !Module | ||
− | |[[ | + | |[[MDE Scripting: Game Library#Game|Game]] |
|- | |- | ||
!Library | !Library | ||
− | |[[ | + | |[[MDE Scripting: Game Library|Game]] |
|- | |- | ||
!Game | !Game | ||
− | |[[ | + | |[[MDE Scripting|Mafia: Definitive Edition]] |
|} | |} | ||
==Description== | ==Description== | ||
− | Returns the [[MDE Scripting: | + | Returns the [[MDE Scripting: Player Entity|Player entity]]. |
− | |||
==Returns== | ==Returns== | ||
Line 24: | Line 24: | ||
!Description | !Description | ||
|- | |- | ||
− | |1 | + | | style="font-weight: bold; text-align:center;" | 1 |
|[[MDE Scripting: Entities|Entity]] ''(C_SceneObjectLuaWrapper => player_archetype-2-)'' | |[[MDE Scripting: Entities|Entity]] ''(C_SceneObjectLuaWrapper => player_archetype-2-)'' | ||
− | |[[MDE Scripting: | + | |[[MDE Scripting: Player Entity|Player entity]] |
|} | |} | ||
− | == | + | ==Examples== |
− | + | <syntaxhighlight lang="lua"> | |
− | |||
local Player = game.game:GetActivePlayer() -- Player returns the player | local Player = game.game:GetActivePlayer() -- Player returns the player | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ||
+ | |||
+ | ==Aliases== | ||
+ | <syntaxhighlight lang="lua"> | ||
+ | local Player = getp() -- Player returns the player | ||
+ | </syntaxhighlight> | ||
Latest revision as of 02:30, 18 November 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