date: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 23: | Line 23: | ||
|mp= Returns the current '''local''' (MP client) in-game date. | |mp= Returns the current '''local''' (MP client) in-game date. | ||
{{Feature|arma3 |Clients' local date is [[Multiplayer Scripting#JIP Synchronisation|automatically and periodically synchronised]] with the server date.}} | {{Feature|arma3|Clients' local date is [[Multiplayer Scripting#JIP Synchronisation|automatically and periodically synchronised]] with the server date.}} | ||
|s1= [[date]] | |s1= [[date]] | ||
Line 30: | Line 30: | ||
|x1= <sqf> | |x1= <sqf> | ||
// in | // in {{arma3}} | ||
date params ["_year", "_month", "_day", "_hours", "_minutes"]; | date params ["_year", "_month", "_day", "_hours", "_minutes"]; | ||
// pre | // pre {{arma3}} | ||
private ["_now", "_year", "_month", "_day", "_hours", "_minutes"]; | |||
_now = date; // [2014,10,30,2,30] a.k.a Oct. 30th, 2:30am | _now = date; // [2014,10,30,2,30] a.k.a Oct. 30th, 2:30am | ||
_year = _now select 0; | _year = _now select 0; |
Latest revision as of 19:08, 8 March 2024
Description
- Description:
- Return the actual in-mission date and time.
- Multiplayer:
- Returns the current local (MP client) in-game date.
- Groups:
- Environment
Syntax
Examples
- Example 1:
- // in Arma 3 date params ["_year", "_month", "_day", "_hours", "_minutes"]; // pre Arma 3 private ["_now", "_year", "_month", "_day", "_hours", "_minutes"]; _now = date; // [2014,10,30,2,30] a.k.a Oct. 30th, 2:30am _year = _now select 0; _month = _now select 1; _day = _now select 2; _hours = _now select 3; _minutes = _now select 4;
- Example 2:
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on Jan 23, 2018 - 23:35 (UTC)
-
a useful script to format the date:
it can be shortened to: (no intermediary variable but more request to date)EDIT: or to
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Environment
- Scripting Commands: Local Effect