This document provides two methods for using an example script in a game server: 1) Adding the script code to an existing main script by loading the sunshine auto class and database, then copying the command handling code. 2) Using the example script independently by specifying it as the gamemode in the server configuration file. It reminds the user to regularly save any changes to the vehicle database.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
192 views
SUNSHINE AUTOS - Example Script
This document provides two methods for using an example script in a game server: 1) Adding the script code to an existing main script by loading the sunshine auto class and database, then copying the command handling code. 2) Using the example script independently by specifying it as the gamemode in the server configuration file. It reminds the user to regularly save any changes to the vehicle database.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Using the Example Script.
Method One - Adding it to your own script
This example assumes your main script main.nut is in the same directory as your server.exe
1. Check the file paths...
2. Under onScriptLoad( ), add the following; // Load the class dofile("sunshine/sunshine.nut"); // Load into array 'MyVehicles' SunshineAutos.LoadDatabase("sunshine/sunshine.db"); // Remember to give me credits :-) print( "=== Loaded Sunshine Auto's v1.1 - By rulk ===" ); 3. Copy and paste all of the code under onPlayerCommand() into your own script. 4. Run the server and jump in-game.
Method Two - Using it independently
1. Put s_cmds.nut in the same directory as your server.exe 2. Open server.cfg, and put/change sqgamemode s_cmds.nut 3. Run the server and jump in-game. Finally.... REMEMBER TO SAVE REGULARY!! SunshineAutos.SaveDatabase("sunshine/sunshine.db");