weaponschein fertig
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user