Jump to content
RAGE Multiplayer Community

Triggering markers


Jengas
 Share

Recommended Posts

Hello! I am developing a server and I have a problem. 
I have made a marker (pickup) 

mp.markers.new(29, new mp.Vector3(248.28216552734375, 222.77394104003906, 106), 1, {
    direction: new mp.Vector3(247.1170196533203, 222.15045166015625, 106.28682708740234),
    rotation: new mp.Vector3(0, 0, 0),
    color: [46, 204, 113, 255],
    visible: true,
    dimension: 0
});

But then I wanted to trigger it when player stands on it. But I could not find this event to make a function. Is there a way to make a function when player stands on marker?

Edited by Jengas
Link to comment
Share on other sites

  • 4 months later...

First you create a Colshape:

Zitat

var circlesize = 1.5; // <-- For the Cicle size of Colshape or set direct in mp.Colshape
 const shape = mp.colshapes.newSphere(248.28216552734375, 222.77394104003906, 106, circlesize);

 

After this set a Event:

Zitat

            mp.events.add({
                "playerEnterColshape" : (player, shape) => {
                    if ( player.vehicle){  return; }
                    console.log("Now I do anything");
                },
            })

Here with "player.vehicle" (Request player is in a car)

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...