Page 1 sur 1

HELP : changer l'heure en multi

Posté : lun. 22 oct. 2018, 13:19
par =[TTK]= Dobeul Ouépone
Salut,

je voudrais pouvoir changer l'heure en live en multi, voici mon script lancé depuis un addaction :

Code : Tout sélectionner

? !(local server) : exit ;
setDate [2018,10,24,06,00];
Bien sûr, ça ne marche pas…

Merci pour votre aide !
Bisou

Re: HELP : changer l'heure en multi

Posté : lun. 22 oct. 2018, 21:07
par =[TTK]= Yourry
Yop.
La commande est bonne mais toute la difficulté est de faire exécuter cette commande par le serveur et non par le client.
Pour cela il faut imbriquer une commande supplémentaire qui ordonne au serveur d'écouter le mission maker.
Ça c'est la théorie, la pratique au prochain numéro si on me paie avec des chaislongs (ancêtre du Bitcoin...) !

Re: HELP : changer l'heure en multi

Posté : lun. 22 oct. 2018, 22:09
par =[TTK]= Dobeul Ouépone
Ca marche, je me souviens avoir braqué quelques TTK, je dois encore en avoir sous le matelas.

Merci Yourry,

@Memphis, quand est-ce que tu dresses le nouveau serveur à nous obéir ?

Re: HELP : changer l'heure en multi

Posté : lun. 22 oct. 2018, 23:08
par =[TTK]= Memphis007
Ah non le dressage, c'est pas moi, c'est Yoda.

Sinon d'après le Wiki de BIS :
In multiplayer, the effect of this command is local, not global. The date from the server is synchronized with clients when they join the game (including start of the mission and joining in progress). E.g. if this command is executed on server in the init.sqf before the mission starts, every client will be synchronized with server as mission is started. However, if you run this command in the middle of the mission, effect is local.
et
Regarding execution in the middle of a session, the post of MulleDK13 is not entirely true. If you don't change the year, you are perfectly fine when executing the command on the server only. However, the server does not sync the year. Hence, if you do change the year, you have to execute the command on the server, clients and JIP to account for the missing sync. e.g.

Code : Tout sélectionner

[[], {setDate [1986, 2, 25, 16, 0]}] remoteExec ["call",0,"JIP_id_setDate"];
A tester.