How to use the alt.on function in alt

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-Chat-Extended / client.js View on Github external
export function pushLine(text) {
	pushMessage(null, text);
}

export function isChatHidden() {
	return hidden;
}

export function isChatOpen() {
	return opened;
}

alt.onServer('chatmessage', pushMessage);

alt.on('keyup', (key) => {
	if (!loaded)
		return;

	if (!opened && key === 0x54 && alt.gameControlsEnabled()) {
		opened = true;
		view.emit('openChat', false);
		alt.emit('chatOpened');
		alt.toggleGameControls(false);
	}
	else if (!opened && key === 0xBF && alt.gameControlsEnabled()) {
		opened = true;
		view.emit('openChat', true);
		alt.emit('chatOpened');
		alt.toggleGameControls(false);
	}
	else if (opened && key == 0x1B) {
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / client / events / keybinds.js View on Github external
function loadInterval(key) {
    if (key !== 'loggedin') return;
    alt.off('meta:Changed', loadInterval);
    alt.on('keyup', keyup);
    alt.on('keydown', keydown);
}
github Stuyk / altV-Open-Roleplay-altLife-Official / resources / orp / client / events / keybinds.js View on Github external
function loadInterval(key) {
    if (key !== 'loggedin') return;
    alt.off('meta:Changed', loadInterval);
    alt.on('keyup', keyup);
    alt.on('keydown', keydown);
}

alt

A flux implementation

MIT
Latest version published 8 years ago

Package Health Score

52 / 100
Full package analysis

Popular alt functions