hdrtop Posted April 26, 2020 Posted April 26, 2020 (edited) Hello! I'm creating a Business system using MySQL. I can load the business from MySQL and it automatically creates the Marker but not the Colshape. trying the code outside the event, the colshape is created. JS/Serverside var bMarkers; var bShapes; mp.events.add("CreateShops", (id, ex, ey, ez, type, dimension) => { bMarkers[id] = mp.markers.new(1, new mp.Vector3(ex, ey, ez), 0.5, { direction: 1, rotation: 0, color: [174, 219, 242, 150], visible: true, dimension: dimension }); // THIS DONT WORK INSIDE THE EVENT bShapes[id] = mp.colshapes.newSphere(ex, ey, ez, 4); }); // THIS WORKS OUTSIDE THE EVENT mp.colshapes.newSphere(428.67, -800.08, 28.49, 4); mp.events.add("playerExitColshape", (player, shape) => { player.outputChatBox("outside"); }); mp.events.add("playerEnterColshape", (player, shape) => { player.outputChatBox("inside"); }); SOLVED Please close Edited April 26, 2020 by hdrtop Solved
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