Skip to content

KPR_fnc_getPlaytimePlain

Christian edited this page Aug 21, 2018 · 1 revision

Description

Gets the playtime of the given player in plain minutes.

Parameter(s)

  • 0: STRING - Steam UID of the player (default: uid of current player)

Returns

  • NUMBER

Example

// Get the playtime of the executing player
private _playtime = [] call KPR_fnc_getPlaytimePlain;

// Return true, when the playtime of the player named "Testman" is greater than 80 minutes.
{
    if (name player == "Testman") exitWith {
        if ([getPlayerUID _x] call KPR_fnc_getPlaytimePlain > 80) then {hint "True";} else {hint "False";};
    };
} forEach (allPlayers - entities "HeadlessClient_F");
Clone this wiki locally