VoidExpanse/scope-player: Difference between revisions

From AtomicTorchWiki
(Created page with "<noinclude> Category:VoidExpanse/api_scopes </noinclude> = Scope player = Used to manage player-related stuff. '''Visibility:''' Global. == List of functions == {{Scri...")
 
No edit summary
Line 18: Line 18:
}}
}}


{{Scripting_api|AddExperience|
* string: player_name
* double: experience|
void|
<pre style="margin:0px;">player.AddExperience("dlirry", 100500);</pre> |
Adds specified amount of experience to player.
The same effect as ship.SetCurrentValueDelta(2535, "experience", 100500);
}}


{{Scripting_api|GetMoney|
{{Scripting_api|GetMoney|

Revision as of 04:35, 26 March 2014


Scope player

Used to manage player-related stuff.

Visibility: Global.

List of functions

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

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.