Jump to content

Recommended Posts

Posted
hello guys i m using vue.js for cefs and when i m trying to call mp.trigger in the vue component doesn t work (error: "'mp' is not defined no-undef")
 
 
 
 
Message #general

 

Posted
On 5/11/2021 at 9:41 PM, alexxnder.dev said:
hello guys i m using vue.js for cefs and when i m trying to call mp.trigger in the vue component doesn t work (error: "'mp' is not defined no-undef")
 
 
 
 
 
Message #general

 

show us the code

Posted (edited)
6 hours ago, Justiofed said:

if u are using eslint at vue cli use /*global mp*/

it works but why i need to use global.mp.trigger instead of mp.trigger? 

Edited by alexxnder.dev
Posted

We use VueJS.

We use RPC calls for example:

on the vue

            startDrivingTest: function () {
                this.$rpc.callServer("drivingSchool:startDrivingTest")
            },

Server Side:

 

rpc.register("drivingSchool:startDrivingTest", (_, { player }) => { }


Good luck,

 

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