SetPlayerLivesLeft: Difference between revisions

no edit summary
(Created page with "{{ACSWarning}} int '''SetPlayerLivesLeft''' (int ''player'', int ''amount'') *''player'': the player to set the lives for. Setting ''player'' to ''PlayerNumber()'' will refe...")
 
No edit summary
Tag: Source edit
 
Line 1: Line 1:
{{ACSWarning}}
{{ACSWarning}}


int '''SetPlayerLivesLeft''' (int ''player'', int ''amount'')
bool '''SetPlayerLivesLeft''' (int ''player'', int ''amount'')


*''player'': the player to set the lives for. Setting ''player'' to ''PlayerNumber()'' will refer to the activator of the script.
== Usage ==
*''amount'': amount of lives left to set.
=== Parameters ===
* ''player'': the player to set the lives for.
* ''amount'': the amount of lives the player has left after they die. Lives are only reduced on respawning; to give a player 3 lives, an amount of 2 should be used. An amount of 0 indicates last life.


Returns 1 for success, 0 for failure (e.g. if the player does not exist). ''amount'' is the amount of lives the player has left after he dies. Lives are only reduced on respawning; to give a player 3 lives, an amount of 2 should be used. An amount of 0 indicates last life.
=== Return value ===
Returns true for success, false for failure (e.g. if the player does not exist).


[[Category: ACS Functions]]
== Examples ==
{{noexamples}}
 
== See also ==
* [[GetPlayerLivesLeft]]
 
[[Category: ACS functions]]