Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function onRangeChange(callback) {
if (networkingEntityClient == null) {
log("call create(webview) first");
return;
}
networkingEntityClient.onRangeChange = (entity, oldRange, newRange) => {
callback(entity, oldRange, newRange);
};
}
function startInterval(key, value) {
if (key !== 'pedflags') return;
alt.off('meta:Changed', startInterval);
const intervalID = alt.setInterval(disableCombat, 0);
alt.log(`combat.js ${intervalID}`);
}
function kick(args) {
const player = alt.Player.all.find(player => player.data.name.includes(args[0]));
if (!player) {
alt.log('Player was not found.');
return;
}
player.kick();
}
export function onPositionChange(callback) {
if (networkingEntityClient == null) {
log("call create(webview) first");
return;
}
networkingEntityClient.onPositionChange = (entity, oldPosition, newPosition) => {
callback(entity, oldPosition, newPosition);
};
}
export function onDataChange(callback) {
if (networkingEntityClient == null) {
log("call create(webview) first");
return;
}
networkingEntityClient.onDataChange = (entity, newData) => {
callback(entity, newData);
};
}