[Release] NUI Server Join Tutorial [HTML/CSS]

Here we have a tutorial for your players when they join. This script is coded using HTML and CSS meaning it is easy to add and remove text as you need.

Features:

  • Title and Media Details (e.g. website link)
  • Rules
  • Tips
  • Close Button
  • Infinite number of rules/tips possible - if it exceeds the container a scroller will be placed.

To-Come:

  • background images
  • open only on player’s first join.

Instructions:

  1. Extract to your server’s resource folder
  2. Ensure folders name is backtobasics-tutorial any other name will break it!
  3. Add start backtobasics-tutorial to your server’s .cfg file
  4. Edit the index.html to your liking (Don’t forget, there is no limit to the number of rules or tips you can have :slight_smile:)
Images

The download to this resource can be found on our github here.

8 Likes

when i click exit it stays on my screen

1 Like

Script has under gone multiple stages of testing, and this isn’t an issue we have run into. Have you edited the code in any way?

nope just renamed the folder

Please read the install directions. Renaming the file will break it. You need to rename the file back to backtobasics-tutorial. This is because the html will need to make a http request to the script, and if you rename the folder then it cannot find the code it needs to run the request to.

rename the folder and let me know if it works.

Firstly, it’s always polite to thank somebody for releasing a script before discussing functionality or issues. Even if it’s not working for you, they’ve taken the time to create something AND make it available for others.

Second, if you must rename the folder for a script that uses NUI callbacks (meaning it uses HTML or JS) and the original script writer didn’t write it to function with any script name (by sending GetCurrentResourceName() to the JS file), then you must rename any instance of the original script name in the JS file post methods.

In this case, change line 31 of index.js from;
$.post('https://backtobasics-tutorial/exit', JSON.stringify({}));
to
$.post('https://NEW_NAME_HERE/exit', JSON.stringify({}));

Obviously replacing NEW_NAME_HERE with the new script name.

4 Likes

hey man no need to attack me

1 Like

people like you take the others jobs and sell it on fiveer u.u

great script by the way what command is it to open it or how can you get it to to stay open as soon as other players join so they can read through it

From looking at the nui.lua, it looks like “/tutorial” will allow it to open on demand.

1 Like

Good Script!

1 Like

Is there a way to change the name of the menu were it says the server name and the discord? if so how do you do it?

It’s all in the index.html. Just head into there and look for the details you want to change. :slight_smile:

I cant edit the index.html. How would I do that?

It opens up into google chrome

If you have a code editor then right click and select open with then select your code editor (e.g. sublime text, visual studio code, brackets, notepad++, ect.)

I dint get that option. I get a view/edit which I click and most files open in Notepad++

I got it I think

in that case change the .html to a different file extension e.g. .txt. Then once you have done your changes, change it back

Attack you? All I said was that it’s polite to thank somebody for their work before discussing functionality or issues. Then I helped you do what you wanted to do and get it working with a new script name (for whatever reason you wanted to do that). I am trying to help you learn, not attack you haha