Jump to content

Server -> Client (JS)


Recommended Posts

Thanks guys, I will pay more attention next time, I managed to solve the problem in a simple way, after many hours.


I was saving the hair in the database, I called the event at the time I needed it and when the user enters the character he changes the hair according to the database.

mp.events.add("hairIde"function (playeridTest) {
    connection.query("SELECT hairID FROM char_test WHERE user_login = ?", [player.socialClub], function (eresults) {
        if (results.length > 0) {
            Object.keys(results).forEach(function (key) {
                let row = results[key];
                idTeste = row.hairID;
        } else {
            console.log("nao funciona");


  • 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...