Hi guys,
so im trying to get back into scripting, trying to figure out everything by my own wont work.
I used to script but somehow im really rust.
I have this script where i just want the player to be able to do the /armyduty command when he is in a colshape&Marker and not when he is outside.
I found some usefull information on the wiki but i keep on getting "Nope" as an answer.
const Armymarker = mp.markers.new(1, new mp.Vector3(-2126.56128, 3285.96265, 37.7325134), 3,
{
color: [255, 165, 0, 50],
visible: true,
});
let ArmyColShape = mp.colshapes.newSphere(-2126.56128, 3285.96265, 37.7325134, 5);
mp.events.addCommand('armyduty', (player, shape) => {
if(shape == ArmyColShape) {
player.outputChatBox(`${player.name} duty Army`);
} else {
player.outputChatBox(`${player.name} Nope`);
}
});
Thats the script, but i cant figure out what im doing wrong that i cant execute the command in the colshape.
Im grateful for every tips and tricks.
Cheers,
R1Z