@gta5urban/types-server 2.1.9 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +70 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1889,6 +1889,68 @@ declare interface NetworkMp {
|
|
|
1889
1889
|
endBatch(): void;
|
|
1890
1890
|
}
|
|
1891
1891
|
|
|
1892
|
+
declare interface SyncMp {
|
|
1893
|
+
rate: number;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* CommandsMp interfaces
|
|
1899
|
+
*/
|
|
1900
|
+
|
|
1901
|
+
declare interface CommandsMpInterface {
|
|
1902
|
+
name: string;
|
|
1903
|
+
aliases?: string[];
|
|
1904
|
+
args?: CommandsMpArgs[];
|
|
1905
|
+
adminLevel?: number;
|
|
1906
|
+
cooldown?: number;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
declare type CommandsMpArgType = {
|
|
1910
|
+
string: string;
|
|
1911
|
+
number: number;
|
|
1912
|
+
player: PlayerMp;
|
|
1913
|
+
};
|
|
1914
|
+
|
|
1915
|
+
declare interface CommandsMpArgDefinition<K extends keyof CommandsMpArgType = keyof CommandsMpArgType> {
|
|
1916
|
+
name: string;
|
|
1917
|
+
type: K;
|
|
1918
|
+
optional?: boolean;
|
|
1919
|
+
rest?: boolean;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
declare interface CommandsMpOptions<
|
|
1923
|
+
T extends readonly CommandsMpArgDefinition[] = readonly CommandsMpArgDefinition[]
|
|
1924
|
+
> {
|
|
1925
|
+
name: string;
|
|
1926
|
+
aliases?: string[];
|
|
1927
|
+
args?: T;
|
|
1928
|
+
adminLevel?: number;
|
|
1929
|
+
cooldown?: number;
|
|
1930
|
+
|
|
1931
|
+
execute: (
|
|
1932
|
+
player: PlayerMp,
|
|
1933
|
+
args: {
|
|
1934
|
+
[P in T[number] as P["name"]]: CommandsMpArgType[P["type"]];
|
|
1935
|
+
}
|
|
1936
|
+
) => void;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
declare interface CommandsMpArgs<K extends keyof CommandsMpArgType = keyof CommandsMpArgType> {
|
|
1940
|
+
name: string;
|
|
1941
|
+
type: K;
|
|
1942
|
+
optional?: boolean;
|
|
1943
|
+
rest?: boolean;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
declare interface CommandsMp {
|
|
1947
|
+
add: <T extends CommandsMpArgs[]>(command: CommandsMpOptions<T>) => void;
|
|
1948
|
+
execute: (player: PlayerMp, raw: string) => void;
|
|
1949
|
+
commands: Map<string, CommandsMpOptions & { lastUse: Map<number, number> }>;
|
|
1950
|
+
getCommands: (player: PlayerMp) => CommandsMpInterface[];
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
|
|
1892
1954
|
declare interface Mp {
|
|
1893
1955
|
Player: typeof PlayerMp;
|
|
1894
1956
|
players: PlayerMpPool;
|
|
@@ -1929,6 +1991,14 @@ declare interface Mp {
|
|
|
1929
1991
|
|
|
1930
1992
|
joaat(str: string): number;
|
|
1931
1993
|
joaat(strs: string[]): number[];
|
|
1994
|
+
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* custom command entities
|
|
1998
|
+
*/
|
|
1999
|
+
|
|
2000
|
+
commands: CommandsMp;
|
|
2001
|
+
|
|
1932
2002
|
}
|
|
1933
2003
|
|
|
1934
2004
|
declare const mp: Mp;
|