Guest User

Untitled

a guest
Feb 5th, 2019
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.63 KB | None | 0 0
  1. /*
  2.         File : fn_setPlayTime.sqf
  3.         Author : NiiRoZz
  4.  
  5.         Description :
  6.         Sets gathered time of player
  7.  
  8.         GATHERED - Loaded from DB and NOT changed
  9.         JOIN - Time, the player joined - the newly gathered playtime will be calculated using difference
  10.  
  11. */
  12.  
  13. private["_uid", "_time_gathered"];
  14.  
  15. _uid = _this select 0;
  16. _time_gathered = ((_this select 1) * 60);
  17.  
  18. //create value using get
  19. [_uid] call TON_fnc_getPlayTime;
  20.  
  21. //set value no 1
  22. {
  23.     if ((_x select 0) isEqualTo _uid) exitWith {
  24.         _x set [1, _time_gathered];
  25.         _x set [2, time];
  26.     };
  27. } forEach TON_fnc_playtime_values;
Add Comment
Please, Sign In to add comment