VoidExpanse/scope-player: Difference between revisions

From AtomicTorchWiki
No edit summary
No edit summary
Line 9: Line 9:


== List of functions ==
== List of functions ==
{{Scripting_api|AddAccess|
* string: player_name
* string: access_key|
void|
<pre style="margin:0px;">player.AddAccess("dlirry", "order_3");</pre> |
Grants player specified access.
}}
{{Scripting_api|RemoveAccess|
* string: player_name
* string: access_key|
void|
<pre style="margin:0px;">player.RemoveAccess("dlirry", "order_3");</pre> |
Removes from player specified access.
}}


{{Scripting_api|AddMoney|
{{Scripting_api|AddMoney|
* string: player_name
* string: player_name
* int: money|
* int: money
* bool: is_quest_reward|
void|
void|
<pre style="margin:0px;">player.AddMoney("dlirry", 100500);</pre> |
<pre style="margin:0px;">player.AddMoney("dlirry", 100500);</pre> |

Revision as of 08:19, 27 May 2014


Scope player

Used to manage player-related stuff.

Visibility: Global.

List of functions

AddAccess
Arguments Returns Example
  • string: player_name
  • string: access_key

void

player.AddAccess("dlirry", "order_3");
Description

Grants player specified access.


RemoveAccess
Arguments Returns Example
  • string: player_name
  • string: access_key

void

player.RemoveAccess("dlirry", "order_3");
Description

Removes from player specified access.


AddMoney
Arguments Returns Example
  • string: player_name
  • int: money
  • bool: is_quest_reward

void

player.AddMoney("dlirry", 100500);
Description

Adds specified amount of money to a player.


AddExperience
Arguments Returns Example
  • string: player_name
  • double: experience

void

player.AddExperience("dlirry", 100500);
Description

Adds specified amount of experience to player. The same effect as ship.SetCurrentValueDelta(2535, "experience", 100500);


GetMoney
Arguments Returns Example
  • string: player_name

int: player's money

var money = player.GetMoney("dlirry", 100500);
Description

Gets current amount of player's money


GetShipOfPlayer
Arguments Returns Example
  • string: player_name

int: player's ship ID

var ship_id = player.GetShipOfPlayer("dlirry");
Description

Returns ID of player's ship.


RemoveMoney
Arguments Returns Example
  • string: player_name
  • int: money

void

vplayer.RemoveMoney("dlirry", 1);
Description

Removes specified amount of money from player.