Jump to content

Search the Community

Showing results for tags 'time'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish

Categories

  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Youtube


Skype


Web


VK

Found 4 results

  1. Version 1.0.0

    1285 downloads

    With this simple Script you can open an UI that allows you to change the Time and Weather. Installation: 1. Copy the Files into your server-directory. 2. Add require("./weatherChanger"); to your index.js in the client_packages folder. Usage: Press F9 to open the UI.
  2. Once I faced a problem with NAPI.World.GetTime and didn't find on it the adequate answer. Can anyone help my code. Bonus will make a simple server time system class server_side : Script  { // The global variables that will be replace our GetTime int serverHour = 6; int serverMin = 0; int serverSec = 0; // A method that, when accessed, will change the time on the server private void server_Time(int hour, int minute, int second) { NAPI.World.SetTime(hour, minute, second); serverHour = hour; // ---------------------------------- serverMin = minute; // save in our variable time serverSec = second; // --------------------------------- }  // Bonus code that creates server time (1 server minute = 20 seconds) async void time() { while (true) { serverMin++; NAPI.World.SetTime(serverHour, serverMin, 0); if (serverMin == 60) { if (serverHour >= 23) { serverHour = 0; serverMin = 0; NAPI.World.SetTime(serverHour, serverMin, 0); } else { serverHour++; serverMin = 0; NAPI.World.SetTime(serverHour, serverMin, 0); } } await Task.Delay(20000); } } [Command("time")] // command to know the current time on the server public void CMD_time(Client client) { if (serverMin < 10) { NAPI.Chat.SendChatMessageToPlayer(client, $"Current time {serverHour.ToString()}:0{serverMin.ToString()}"); } else { NAPI.Chat.SendChatMessageToPlayer(client, $"Current time {serverHour.ToString()}:{serverMin.ToString()}"); } } // Change the time on the server [Command("settime")] public void CMD_settime(Client client, int hrs, int min) { server_Time(hrs, min, 0); NAPI.Chat.SendChatMessageToPlayer(client, $"Time was change to {hrs}:{min}"); } // Event that the time worked [ServerEvent(Event.ResourceStart)] public void OnResourceStart() { NAPI.World.SetTime(serverHour, serverMin, serverSec); time(); // Cycle start time at the start of the server } sorry for my russian english xd i hope this will help u ❤️
  3. Version 1.0.0

    577 downloads

    I posted this in the forum, but it is probably better suited here. This is a very simple script that gives the same time progression experience as single player mode. The source for the time is current GMT time and the calculation rolls this time into an in-game day 24 hour period that lasts 48 minutes (IRL time). Note that as the calculations are based off GMT (and not local time) all clients using this will have the same in game time (dependent on whether their computer's time and timezone is set up correctly). To use it, simply copy the file somewhere and "require" it in your client_resources script. There's nothing to configure. Known Bugs: Because the date is not recalculated, it continues to reflect the current real world date regardless of how many in game 24 hour periods there are within the game.
  4. Version 1.0.0

    1110 downloads

    Basic script to sync time of the game in custom cicles That script just change the time of the game based on the configuration cicle time and real life. every 0 hour and 12 hours the weather is changed in random mod to another weather. The cicle of Timeout will adjust to read the script every hour in the game. How to use: Just place de script in your server-side (Package) and change the "const cicleTime" to your size of a day cicle. Use real life minutes for that. Exemple: "30" will be 15 minutes in real life day and 15 minutes night. Notes: If you place some value in cicle time that a hour in the game last less then one minute in real life, dont will work (if you know how to fix comment please ). Future Updates: Smoth transition, show time and date on UI
×
×
  • Create New...