Jump to content

HTML | Registration system and authorization


Recommended Posts

I'll give a brief explanation.

Make an HTML page for your login and registration. Place these html files inside your server-files/client_packages. Inside you HTML use JavaScript to check if the input text field are not empty. If they are empty then show an error using jQuery to edit a tag using it's ID attribute. If the input text is not empty then inside the HTML use mp.trigger to invoke a function inside your client side script. In the client side script use Event.Add inside the class' constructor. When the function is called in the client-side script use RAGE.Events.CallRemote to invoke a function in your server-side script. Inside the server-side script make a RemoteFunction attribute and use this to fetch the data from the client-side script in your server-side. Inside the server-side when the data is fetched, manipulate the data however you want. Like storing it in a file or databasethen from the server-side invoke a NAPI.Clientevent.TriggerClientEvent to invoke a function in your client-side script. And inside the client-side script when you fetch the call from the server, disable the CEF that you created in the constructor of the client-side class.



  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...