How to use alt - 10 common examples

To help you get started, we’ve selected a few alt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / client / panels / mdc.js View on Github external
}

function ready() {
    showCursor(true);
    alt.emitServer('mdc:GetData');
}

function turnIn(hash) {
    alt.emitServer('mdc:TurnIn', hash);
}

function pursue(hash) {
    alt.emitServer('mdc:Pursue', hash);
}

alt.on('keyup', key => {
    if (key === 'u'.charCodeAt(0)) {
        // showDialogue();
    }
});
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / systems / job2.js View on Github external
this.party.forEach(player => {
            if (lastObjective) {
                alt.emit('job:ObjectiveComplete', this.identifier, lastObjective, player);
            }

            player.playAudio('complete');
            objective.sync(player);
        });
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / systems / interaction.js View on Github external
exec(player) {
        if (!player || !player.valid) {
            return;
        }

        if (utilityVector.distance(player.pos, this.pos) > this.radius) {
            player.emitMeta('interaction', undefined);
            return;
        }

        alt.emit(this.serverEventName, player, this.indexValue);
    }
}
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / client / panels / inventory.js View on Github external
options.forEach(option => {
        const res = cache.get(option.name);
        const value = res === null ? true : res;
        alt.emit('option:Changed', option.name, value);
    });
}
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / systems / job2.js View on Github external
this.party.forEach(player => {
                player.send('The job has been complete.');
                player.job = undefined;
                player.playAudio('complete');
                alt.emitClient(player, 'objective:Info', null);
                this.removeJobVehicles(player, true);
                alt.emit('job:Complete', this.identifier, player);
            });
            return;
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / systems / inventory.js View on Github external
baseItem.eventcall.forEach(event => {
            if (event === '') {
                player.syncInventory();
                return;
            }

            alt.emit(event, player, item, hash);
        });
    } else {
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / discord / discord.js View on Github external
alt.Player.all.forEach(player => {
        if (player.loginTimeout !== undefined && player.loginTimeout !== null) {
            alt.emit('discord:CheckLoginTimeout', player);
        }
    });
}, 60000);
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / systems / factions.js View on Github external
currentPlayers.forEach(player => {
            player.send(
                `Faction ${faction.name} has neutralized turf ${colshapes[turfID].sector.name}.`
            );

            if (player.colshape && player.colshape === colshapes[turfID]) {
                alt.emit('entityEnterColshape', colshapes[turfID], player);
            }
        });
        return;
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / commands / factions.js View on Github external
chat.registerCmd('acceptfaction', player => {
    alt.emit('faction:AcceptMember', player);
});
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / server / systems / use.js View on Github external
export function exitDynamicDoor(player, id) {
    alt.emit('door:ExitDynamicDoor', player, id);
}

alt

A flux implementation

MIT
Latest version published 8 years ago

Package Health Score

52 / 100
Full package analysis

Popular alt functions