Player Lua API: Difference between revisions
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
| itemTable || Lua Type | | itemTable || Lua Type | ||
|} | |} | ||
'''Description''': Adds an item to the players inventory | '''Description''': Adds an item to the players inventory (silently, wihtout a notification. Also check Mission.SendData() ). | ||
'''Returns''': Nothing | '''Returns''': Nothing | ||
Line 270: | Line 270: | ||
'''Returns''': Lua Type | '''Returns''': Lua Type | ||
=== GetPlayerTrackingState === | |||
<syntaxhighlight source lang="lua">Player.GetPlayerTrackingState()</syntaxhighlight> | |||
'''Description''': Get current tracking state from Player's phone. | |||
'''Returns''': PlayerPhone+TrackingStates | |||
=== GetPlayerNetPointsCount === | |||
<syntaxhighlight source lang="lua">Player.GetPlayerNetPointsCount()</syntaxhighlight> | |||
'''Description''': Get current tracking state from Player's phone. | |||
'''Returns''': number | |||
=== SetPlayerNetPointsCount === | |||
<syntaxhighlight source lang="lua">Player.SetPlayerNetPointsCount(count)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| count || number | |||
|} | |||
'''Description''': Get current tracking state from Player's phone. | |||
'''Returns''': Nothing | |||
=== GetPlayerNetPointsCount === | |||
<syntaxhighlight source lang="lua">Player.GetPlayerNetPointsCount(count)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| count || number | |||
|} | |||
'''Description''': Get current tracking state from Player's phone. | |||
'''Returns''': Nothing | |||
=== GetPlayerNetPointsCount === | |||
<syntaxhighlight source lang="lua">Player.GetPlayerNetPointsCount(count)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| count || number | |||
|} | |||
'''Description''': Get current tracking state from Player's phone. | |||
'''Returns''': Nothing | |||
=== GetName === | === GetName === | ||
Line 313: | Line 364: | ||
This file is auto generated, please don't edit manually! | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': | '''Docs last hacked together on''': 15/11/2019 14:59 | ||
[[Category:Modding]][[Category:LuaAPI]] | [[Category:Modding]][[Category:LuaAPI]] |
Revision as of 18:13, 19 November 2019
Player
Description
The Player API handles querying and setting the state of the player
Functions
AddItemToInventory
Player.AddItemToInventory(itemTable)
Expected parameter types
Name | Type |
---|---|
itemTable | Lua Type |
Description: Adds an item to the players inventory (silently, wihtout a notification. Also check Mission.SendData() ).
Returns: Nothing
RemoveItemFromInventory
Player.RemoveItemFromInventory(itemTable)
Expected parameter types
Name | Type |
---|---|
itemTable | Lua Type |
Description: Removes an item to the players inventory
Returns: Nothing
HasItem
Player.HasItem(itemName)
Expected parameter types
Name | Type |
---|---|
itemName | string |
Description: Is an item in the players inventory
Returns: true if the item is in the players inventory, else false
ClearInventory
Player.ClearInventory()
Description: Removes all items from the players inventory
Returns: Nothing
SetPlayerNFCData
Player.SetPlayerNFCData(dataTable)
Expected parameter types
Name | Type |
---|---|
dataTable | Lua Type |
Description: Sets the NFC data on the players phone
Returns: Nothing
AddDataFile
Player.AddDataFile(dataTable)
Expected parameter types
Name | Type |
---|---|
dataTable | Lua Type |
Description: Adds a data file directly to the players data inventory without a sender
Returns: Nothing
ClearDataInventory
Player.ClearDataInventory()
Description: Removes all data files from the players data inventory
Returns: Nothing
ItemInQuickSlot
Player.ItemInQuickSlot()
Description: Gets the name of the item currently in the players quick slot
Returns: string
HasDataFile
Player.HasDataFile(dataFileName)
Expected parameter types
Name | Type |
---|---|
dataFileName | string |
Description: Does the player have a data file with this name?
Returns: bool
HasEncryptedFile
Player.HasEncryptedFile(dataFileName)
Expected parameter types
Name | Type |
---|---|
dataFileName | string |
Description: Does the player have a file with the name _dataFileName_ and is it encrypted?
Returns: bool
HasDecryptedFile
Player.HasDecryptedFile(dataFileName)
Expected parameter types
Name | Type |
---|---|
dataFileName | string |
Description: Does the player have a file with the name _dataFileName_ and is it unencrypted?
Returns: bool
GetDataString
Player.GetDataString(internalName)
Expected parameter types
Name | Type |
---|---|
internalName | string |
Description: Returns the data string of a file in the players inventory, takes in the internal name of the file
Returns: string
SetDataString
Player.SetDataString(internalName, newString)
Expected parameter types
Name | Type |
---|---|
internalName | string |
newString | string |
Description: Sets the data string of a data file in the players data inventory
Returns: Nothing
GetAllDataFileNames
Player.GetAllDataFileNames()
Description: Return internalNames of all files in the players data inventory
Returns: System.String[]
GetAllDataFiles
Player.GetAllDataFiles()
Description: Return a table of all files in the players data inventory
Returns: Lua Type
SendData
Player.SendData(internalName, receiver)
Expected parameter types
Name | Type |
---|---|
internalName | Lua Type |
receiver | Lua Type |
Description: Send a file from player's inventory to receiver
Returns: Nothing
GetSocialProfileSize
Player.GetSocialProfileSize(internalName)
Expected parameter types
Name | Type |
---|---|
internalName | string |
Description: Returns the size of the background profile player has collected about a character
Returns: number
SocialProfileContainsTag
Player.SocialProfileContainsTag(internalName, tag)
Expected parameter types
Name | Type |
---|---|
internalName | string |
tag | string |
Description: Returns true if social profile contains any character data with specified tag
Returns: bool
SocialProfileContainsTagData
Player.SocialProfileContainsTagData(internalName, tag, data)
Expected parameter types
Name | Type |
---|---|
internalName | string |
tag | string |
data | string |
Description: Returns true if social profile contains character data matching both tag and data
Returns: bool
SocialProfileContainsData
Player.SocialProfileContainsData(internalName, data)
Expected parameter types
Name | Type |
---|---|
internalName | string |
data | string |
Description: Returns true if social profile contains specified character data (regardless of it's tag)
Returns: bool
AddSocialProfileInformation
Player.AddSocialProfileInformation(internalName, tag, data)
Expected parameter types
Name | Type |
---|---|
internalName | string |
tag | string |
data | string |
Description: Add new background data about a character to SocialInventory
Returns: Nothing
GetSocialProfileInformation
Player.GetSocialProfileInformation(internalName)
Expected parameter types
Name | Type |
---|---|
internalName | string |
Description: Get all known background data about a character from player's SocialInventory
Returns: Lua Type
GetPlayerTrackingState
Player.GetPlayerTrackingState()
Description: Get current tracking state from Player's phone.
Returns: PlayerPhone+TrackingStates
GetPlayerNetPointsCount
Player.GetPlayerNetPointsCount()
Description: Get current tracking state from Player's phone.
Returns: number
SetPlayerNetPointsCount
Player.SetPlayerNetPointsCount(count)
Expected parameter types
Name | Type |
---|---|
count | number |
Description: Get current tracking state from Player's phone.
Returns: Nothing
GetPlayerNetPointsCount
Player.GetPlayerNetPointsCount(count)
Expected parameter types
Name | Type |
---|---|
count | number |
Description: Get current tracking state from Player's phone.
Returns: Nothing
GetPlayerNetPointsCount
Player.GetPlayerNetPointsCount(count)
Expected parameter types
Name | Type |
---|---|
count | number |
Description: Get current tracking state from Player's phone.
Returns: Nothing
GetName
Player.GetName()
Description: Get the Player's internalName
Returns: string
GetLightLevel
Player.GetLightLevel()
Description: Get the light level around the player
Returns: number
SetAlwaysRagdoll
Player.SetAlwaysRagdoll(state)
Expected parameter types
Name | Type |
---|---|
state | bool |
Description: Player character aways ragdolls on death
Returns: Nothing
SetInvisible
Player.SetInvisible(state)
Expected parameter types
Name | Type |
---|---|
state | bool |
Description: Player character is invisible
Returns: Nothing
This file is auto generated, please don't edit manually!
Docs last hacked together on: 15/11/2019 14:59