Difference between revisions of "cmf respawn fnc limit"
Jump to navigation
Jump to search
(Created page with "{{CMF Function |game1=arma3 |version1=0.50 |game2=cmf3 |version2=2.1.0 |descr=This function limits the respawns for the local player. Once the limit has been reached the un...") |
|||
Line 26: | Line 26: | ||
|x2= {{code|lang=scilab|// Allow 5 respawns if player has role "SL" | |x2= {{code|lang=scilab|// Allow 5 respawns if player has role "SL" | ||
[5, { [player, "SL"] call cmf_fnc_common_isRole }] call cmf_respawn_fnc_limit;}} | [5, { [player, "SL"] call cmf_fnc_common_isRole }] call cmf_respawn_fnc_limit;}} | ||
|seealso= [[cmf_respawn_fnc_rallypoint]] [[cmf_respawn_fnc_setLimit]] | |||
|var1= {{!}} GLOBAL {{!}}{{!}} Unit {{!}}{{!}} cmf_respawn_respawns {{!}}{{!}} A [https://community.bistudio.com/wiki/Number Number] variable containing the player's respawn limit | |var1= {{!}} GLOBAL {{!}}{{!}} Unit {{!}}{{!}} cmf_respawn_respawns {{!}}{{!}} A [https://community.bistudio.com/wiki/Number Number] variable containing the player's respawn limit | ||
|var2= {{!}} GLOBAL {{!}}{{!}} Unit {{!}}{{!}} cmf_respawn_deaths {{!}}{{!}} A [https://community.bistudio.com/wiki/Number Number] variable containing the player's deaths | |var2= {{!}} GLOBAL {{!}}{{!}} Unit {{!}}{{!}} cmf_respawn_deaths {{!}}{{!}} A [https://community.bistudio.com/wiki/Number Number] variable containing the player's deaths | ||
}} | }} |
Latest revision as of 22:04, 17 December 2022
Description
- Description:
- This function limits the respawns for the local player. Once the limit has been reached the unit will be kicked into spectator.
- Execution:
- Call
- Groups:
- CMF3: respawn
Syntax
- Syntax:
- [limit, condition] call cmf_respawn_fnc_limit
- Parameters:
- limit: Number - The respawn limit to assign the player
- condition: String - (Optional, default { true }) If false will not set a respawn limiter on the player
- Return Value:
- None
Examples
- Example 1:
// Allow 5 respawns for player [5] call cmf_respawn_fnc_limit;
- Example 2:
// Allow 5 respawns if player has role "SL" [5, { [player, "SL"] call cmf_fnc_common_isRole }] call cmf_respawn_fnc_limit;
Additional Information
Internal Variables
Locality | Namespace | Name | Description |
---|---|---|---|
GLOBAL | Unit | cmf_respawn_respawns | A Number variable containing the player's respawn limit |
GLOBAL | Unit | cmf_respawn_deaths | A Number variable containing the player's deaths |
Events
- No events
Notes