Jump to content
RAGE Multiplayer Community

How i can read a html in a command


Recommended Posts

Hello, i'm tried to add a html content into a command.

Example:

mp.events.addCommand('report', (player) => {
    var browser = mp.browsers.new("package://login/report.html");

});

But not work.What can i do?

I use this gamemode:

 

Link to post
Share on other sites

You're mixing serverside and clientside code, you create the command serverside and you make the browser on the clientside
Read these
https://wiki.rage.mp/index.php?title=Getting_Started_with_Development

https://wiki.rage.mp/index.php?title=Getting_Started_with_Client-side

You can call a clientside event using https://wiki.rage.mp/index.php?title=Player::call

So you'd create a clientside event to create this browser

Link to post
Share on other sites
6 hours ago, MrPancakers said:

You're mixing serverside and clientside code, you create the command serverside and you make the browser on the clientside
Read these
https://wiki.rage.mp/index.php?title=Getting_Started_with_Development

https://wiki.rage.mp/index.php?title=Getting_Started_with_Client-side

You can call a clientside event using https://wiki.rage.mp/index.php?title=Player::call

So you'd create a clientside event to create this browser

ewwwww okk, thank you sir !!

I fixed the problem.

Link to post
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...