Announcement

Collapse
No announcement yet.

Base script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GAMEMODE Base script

    The gamemode is fully complying with the folder structure that is going to be on Onset once its released, demonstrates use of queries with full explanatory of each and every thing on the repository.
    If there is anything you think needs to be improved, feel free to leave a reply on this thread.

    https://github.com/kaperstone/blank-onset-server


    It has basic commands to spawn vehicle, some admin stuff, change model, resize your head and kill yourself.

    I have no idea if it even compiles, because I, like most of you, don't have access to the game, so good luck.
    Last edited by Kaperstone; 10-23-2019, 03:06 PM.

    #2
    Nice! After the next video we are going to release more example scripts.

    Some important errors:
    - You actually have to initialize the PlayerData table for the specific player id before using it.
    - Under "packages" in the server config you have to specify the name of the package. A package is a folder in the "package" directory. It's a collection of Lua scripts and other files.

    Comment


      #3
      Originally posted by Talos View Post
      - You actually have to initialize the PlayerData table for the specific player id before using it.
      Yeah, I've done it at the bottom of the code after the player is authenticated in Steam? or did I misunderstand?
      Originally posted by Talos View Post
      - Under "packages" in the server config you have to specify the name of the package. A package is a folder in the "package" directory. It's a collection of Lua scripts and other files.
      Oh, and I was lost trying to find how to include the gamemode inside

      Comment


        #4
        You have to initialize a table for the player like this:
        PHP Code:
        PlayerData[player] = {} 
        And when you are done do:
        PHP Code:
        PlayerData[player] = nil 

        Comment


          #5
          Originally posted by Talos View Post
          You have to initialize a table for the player like this:
          PHP Code:
          PlayerData[player] = {} 
          And when you are done do:
          PHP Code:
          PlayerData[player] = nil 
          Thanks for the comment, apparently I already set to nil when the player leaves, only haven't initialized the table.


          I have updated the source code to comply with the directory structure, as well as added & modified the scoreboard from (https://github.com/BlueMountainsIO/O...master/horizon) so all who uses this script as their base will have a default scoreboard to start with.

          Comment


            #6
            Nice, you even handled the licensing thing header.

            Comment


              #7
              Originally posted by Talos View Post
              Nice, you even handled the licensing thing header.
              Yes, keeping it legal before you take down my repo.

              I also tried to explain as many things as possible on-code and a few readme's so it will be nicer to browse the directories on github, haven't tho, added as much explanation on the gamemode file itself.

              Comment


                #8
                Thanks, cannot wait to start
                French developper | Onset Life Roleplay

                Comment


                  #9
                  This looks really cool, look forward to trying it out!

                  Comment


                    #10
                    I'm testing it, and I can't start the server, it is crashing instantly without any crash logs
                    please help.

                    Comment


                      #11
                      I proposed 2 pull requests that should fix the issues most are having. They were just small mistakes that could easily go overlooked.

                      Comment


                        #12
                        Do I just copy paste this into a clean Onset server and then it should work?

                        Comment


                          #13
                          Originally posted by CarsonK View Post
                          I proposed 2 pull requests that should fix the issues most are having. They were just small mistakes that could easily go overlooked.
                          Sorry that it took some time to review the pull requests, for some reason my own repo wasn't set to `watching` by default.

                          Thank you for taking the time to reviewing the code and fixing the issues existing within it.

                          Comment

                          Working...
                          X