Sign in to follow this  
jugew

Solution for waypoint

Recommended Posts

let waypoint;

mp.events.add('render', () => {
  // Waypoint
  if (waypoint !== mp.game.invoke('0x1DD1F58F493F1DA5')) {
    waypoint = mp.game.invoke('0x1DD1F58F493F1DA5');
    let blipIterator = mp.game.invoke('0x186E5D252FA50E7D');
    let FirstInfoId = mp.game.invoke('0x1BEDE233E6CD2A1F', blipIterator);
    let NextInfoId = mp.game.invoke('0x14F96AA50D6FBEA7', blipIterator);
    for (let i = FirstInfoId; mp.game.invoke('0xA6DB27D19ECBB7DA', i) != 0; i = NextInfoId) {
      if (mp.game.invoke('0xBE9B0959FFD0779B', i) == 4 ) {
        var coord = mp.game.ui.getBlipInfoIdCoord(i);
        mp.events.call("playerCreateWaypoint", coord, Boolean(waypoint));
        mp.events.callRemote("playerCreateWaypoint", JSON.stringify(coord), Boolean(waypoint));
      };
    };
  };
});

Client-side

mp.events.add('playerCreateWaypoint', (position, toogle) => {
    console.log(position, toogle);
});

Server-side

mp.events.add('playerCreateWaypoint', (player, position, toogle) => {
    console.log(position, toogle);
});
  • Like 1

Share this post


Link to post
Share on other sites

How about just using a keybind?

Share this post


Link to post
Share on other sites

 

Thanks a lot guy! You helped me a lot! Now I can tell the taxi drivers where I need to go without any words!

Share this post


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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.