Jengas Posted December 6, 2018 Share Posted December 6, 2018 (edited) 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 December 6, 2018 by Jengas Link to comment Share on other sites More sharing options...
Robson Posted December 7, 2018 Share Posted December 7, 2018 (edited) do it with a colshape Edited December 7, 2018 by Robson Link to comment Share on other sites More sharing options...
tonihenkel Posted April 20, 2019 Share Posted April 20, 2019 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 More sharing options...
Flow Posted April 28, 2019 Share Posted April 28, 2019 "request player is in a car" is simply wrong. If player would be in a car, nothing would be triggered. Also you can write if ( player.vehicle) return; instead of if ( player.vehicle){ return; } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now