weaponschein fertig

This commit is contained in:
hydrant
2020-03-13 22:51:30 +01:00
parent 6467615a32
commit 359762965d
16 changed files with 1574 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ export default class RageEvents implements IEvents {
}
callServer(event: string, args?: any[] | any): void {
if (args) {
if (args !== null) {
if (typeof args === 'object') {
args.push(event);
} else {
@@ -41,7 +41,10 @@ export default class RageEvents implements IEvents {
} else {
args = [event];
}
mp.events.callRemote('CLIENT:Event', JSON.stringify(args));
var params = JSON.stringify(args);
mp.events.callRemote('CLIENT:Event', params);
}
bindKey(key: Key, hold: boolean, callback: Function) {

View File

@@ -2,6 +2,14 @@ import { IUi, IBrowser } from "../../game";
import { Menu } from "../../libs/NativeUI/index";
export default class RageUi implements IUi {
setHelpText(text: string): void {
mp.game.ui.setTextComponentFormat('STRING');
mp.game.ui.addTextComponentSubstringPlayerName(text);
mp.game.ui.displayHelpTextFromStringLabel(0, true, true, -1);
}
clearHelpText(): void {
mp.game.ui.clearHelp(true);
}
private _inMenu: boolean = false;
private _activeMenu: Menu = null;