rollback triggerBrowser

This commit is contained in:
Oleksandr Honcharov 2024-06-13 04:46:29 +03:00
parent 0520b869db
commit a0e8c0b461
2 changed files with 18 additions and 9 deletions

View File

@ -3,6 +3,9 @@ import rpc from 'rage-rpc'
import Logger from './logger'
import {
RageFW_CefArgs,
RageFW_CefEvent,
RageFW_CefReturn,
_ClientEventHasArgs,
_ServerEventHasArgs,
RageFW_ClientEvent,
@ -121,6 +124,14 @@ class Player {
): Promise<RageFW_ServerClientEventReturn<EventName>> {
return rpc.callClient(player, eventName, args)
}
public triggerBrowser<EventName extends RageFW_CefEvent>(
player: PlayerMp,
eventName: EventName,
args: RageFW_CefArgs<EventName>,
): Promise<RageFW_CefReturn<EventName>> {
return rpc.callBrowsers(player, eventName, args)
}
}
export const fw = {
@ -130,3 +141,7 @@ export const fw = {
log: new Logger(),
},
}
fw.system.log.info(
'Working on Rage Framework. RageFW © Powered by Entity Seven Group',
)

View File

@ -1,13 +1,7 @@
declare module 'rage-fw-shared-types' {
export interface RageFW_ICustomServerEvent {
customServerEvent(test: string, test2: number): void
}
export interface RageFW_ICustomServerEvent {}
export interface RageFW_ICustomClientEvent {
customClientEvent(test: string, test2: number): void
}
export interface RageFW_ICustomClientEvent {}
export interface RageFW_ICustomCefEvent {
customCefEvent(test: string, test2: number): void
}
export interface RageFW_ICustomCefEvent {}
}