Player Lua API: Difference between revisions
m (Rich moved page Lua Apis/Player Lua API to Player Lua API without leaving a redirect: removing sub-pages) |
(Update) |
||
Line 1: | Line 1: | ||
<!-- This file is auto generated, please don't edit manually! --> | |||
= Player = | = Player = | ||
== Description == | == Description == | ||
Line 108: | Line 109: | ||
'''Returns''': bool | '''Returns''': bool | ||
=== GetDataString === | |||
<syntaxhighlight source lang="lua">Player.GetDataString(internalName)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
| 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 === | |||
<syntaxhighlight source lang="lua">Player.SetDataString(internalName, newString)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
| internalName || string | |||
|- | |||
| newString || string | |||
|} | |||
'''Description''': Sets the data string of a data file in the players data inventory | |||
'''Returns''': Nothing | |||
=== GetName === | === GetName === | ||
Line 139: | Line 164: | ||
'''Docs last hacked together on''': 09 | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': 13/09/2017 14:00 |
Revision as of 13:02, 13 September 2017
Player
Description
The Player API handles querying and setting the state of the player
Functions
AddItemToInventory
Player.AddItemToInventory(itemTable)
Expected parameter types
itemTable | Lua Type |
Description: Adds an item to the players inventory
Returns: Nothing
RemoveItemFromInventory
Player.RemoveItemFromInventory(itemTable)
Expected parameter types
itemTable | Lua Type |
Description: Removes an item to the players inventory
Returns: Nothing
HasItem
Player.HasItem(itemName)
Expected parameter types
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
dataTable | Lua Type |
Description: Sets the NFC data on the players phone
Returns: Nothing
AddDataFile
Player.AddDataFile(dataTable)
Expected parameter types
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
dataFileName | string |
Description: Does the player have a data file with this name?
Returns: bool
HasEncryptedFile
Player.HasEncryptedFile(dataFileName)
Expected parameter types
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
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
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
internalName | string |
newString | string |
Description: Sets the data string of a data file in the players data inventory
Returns: Nothing
GetName
Player.GetName()
Description: Get the Player's internalName
Returns: string
SetAlwaysRagdoll
Player.SetAlwaysRagdoll(state)
Expected parameter types
state | bool |
Description: Player character aways ragdolls on death
Returns: Nothing
SetInvisible
Player.SetInvisible(state)
Expected parameter types
state | bool |
Description: Player character is invisible
Returns: Nothing
This file is auto generated, please don't edit manually!
Docs last hacked together on: 13/09/2017 14:00