linglingthething Posted January 27, 2019 Share Posted January 27, 2019 (edited) Hello i run into a problem on my server. I just have created a marker and a colshape. When i stand in the colShape and i type the command /presi -141.1987, -620.913, 168.8205, ex_dt1_02_office_02b he ports me to a place where i fall through the ground. my Clientside looks like this: mp.events.add("loadPresi", (x,y,z,IPLName) => { var interior = mp.game.interior.getInteriorAtCoords(x, y, z); mp.game.interior.enableInteriorProp(interior, IPLName); mp.game.streaming.requestIpl(IPLName); mp.game.interior.refreshInterior(interior); }); my Serverside looks like this: mp.events.addCommand("presi", (player, fullText, x, y, z, ipl) if(PresiColShape.isPointWithin(player.position)) { player.outputChatBox("Du hast das Haus des Bürgermeisters betreten"); player.position = new mp.Vector3(x,y,z); player.call('loadInterior', [x,y,z, ipl]); console.log('x: ' + x + ' y: ' + y + ' z: ' + z + ' ipl: ' + ipl); } else { player.notify("Du stehst nicht vor der Tür des Bürgermeisters!"); } }); function playerEnterColshapeHandler(player, shape) { if(shape == PresiColShape) { player.notify("Du stehst vor der Tür des Bürgermeisters! Gebe /presi ein um das Haus zu betreten!"); } } mp.events.add("playerEnterColshape", playerEnterColshapeHandler); function playerExitColshapeHandler(player, shape) { if(shape == PresiColShape) { player.notify("Du hast den Eingangsbereich wieder verlassen!"); } } mp.events.add("playerExitColshape", playerExitColshapeHandler); Edited January 27, 2019 by linglingthething Link to comment Share on other sites More sharing options...
Solib Posted January 27, 2019 Share Posted January 27, 2019 Same question Link to comment Share on other sites More sharing options...
State Valentin Posted January 27, 2019 Share Posted January 27, 2019 Try to parse the coords. x = parseInt(x), y = parseInt(y), z = parseInt(z); Link to comment Share on other sites More sharing options...
linglingthething Posted January 28, 2019 Author Share Posted January 28, 2019 (edited) I got it working now. i will Post it for you Guys to unterstand it. Serverside: //Shapes let PresiColShape = mp.colshapes.newSphere(-544.73876953125, -204.69960021972656, 38.215152740478516, 1, 0); //Marker const presimarker = mp.markers.new(2, new mp.Vector3(-544.73876953125, -204.69960021972656, 38.215152740478516),1, { color: [255, 165, 0, 50], visible: true, dimension: 0 }); //PRESI COMMAND mp.events.addCommand("presi", (player, fullText, x, y, z) => { if(PresiColShape.isPointWithin(player.position)) { player.position = new mp.Vector3(-141.78150939941406, -617.6240844726562, 168.82052612304688); player.call("loadPresiEingang", [x,y,z]); player.notify("Sie haben das Haus des Bürgermeisters betreten!"); } }); //BETRITT COLSHAPE function playerEnterColshapeHandlerEingang(player, shape) { if(shape == PresiColShape) { player.notify("Du stehst vor der Tür des Bürgermeisters! Gebe /presi ein um das Haus zu betreten!"); } } mp.events.add("playerEnterColshape", playerEnterColshapeHandlerEingang); clientside: //presi haus eingang mp.events.add("loadPresiEingang", (x,y,z,IPLName) => { var interior = mp.game.interior.getInteriorAtCoords(-786.8195, 315.5634, 187.9137); //pkt wo der spieler im interior spawnt mp.game.streaming.requestIpl("apa_v_mp_h_02_c"); // interior name(IPL) mp.game.interior.refreshInterior(interior); // Lädt das Interior neu }); This will work. Edited January 28, 2019 by linglingthething 1 Link to comment Share on other sites More sharing options...
stalinalexandru Posted May 9, 2019 Share Posted May 9, 2019 (edited) Hi, try this. CLIENTSIDE function loadInt(x,y,z, ipl) { var interior = mp.game.interior.getInteriorAtCoords(x,y,z); //pkt wo der spieler im interior spawnt mp.game.streaming.requestIpl('"'+ipl+'"'); // interior name(IPL) mp.game.interior.refreshInterior(interior); } mp.events.add('cInterior:loadInt', loadInt); SERVERSIDE mp.events.addCommand('testint', (player, allText, x, y, z, iplNAME) => { let position = new mp.Vector3(parseFloat(x), parseFloat(y), parseFloat(z)); player.position = position; player.call("cInterior:loadInt",[position.x, position.y, position.z, iplNAME]); }); Good luck ! Edited May 9, 2019 by stalinalexandru 1 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