mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
Update compiles - 2 more files to do
fn_selfActions.sqf player_updateGui.sqf
This commit is contained in:
15
SQF/dayz_code/compile/fn_selectRandomChance.sqf
Normal file
15
SQF/dayz_code/compile/fn_selectRandomChance.sqf
Normal file
@@ -0,0 +1,15 @@
|
||||
/************************************************************
|
||||
Chance calc by deadactionman updated by R4Z0R49
|
||||
|
||||
Parameters: chance (0.00-1.00)
|
||||
Returns: true/false
|
||||
|
||||
E.G.
|
||||
_return = [0.5] call fn_chance; // will return TRUE 50% of the time
|
||||
_return = [0.25] call fn_chance; // will return TRUE 25% of the time
|
||||
*************************************************************/
|
||||
private ["_result"];
|
||||
|
||||
if ((_this select 0) > (random 1)) then {_result = true;} else {_result = false;};
|
||||
|
||||
_result
|
||||
Reference in New Issue
Block a user