@nativewrappers/server 0.0.76 → 0.0.78
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/entities/BaseEntity.d.ts +3 -0
- package/enum/OrphanMode.d.ts +5 -0
- package/enum/index.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +68 -0
- package/package.json +1 -1
- package/common/index.js +0 -1481
package/entities/BaseEntity.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { PopulationType } from "../enum/PopulationType";
|
|
|
4
4
|
import type { Hash } from "../type/Hash";
|
|
5
5
|
import { Vector4 } from "../utils";
|
|
6
6
|
import { Vector3 } from "../utils";
|
|
7
|
+
import { OrphanMode } from "server/enum";
|
|
7
8
|
export declare class BaseEntity {
|
|
8
9
|
protected handle: number;
|
|
9
10
|
protected type: ClassTypes;
|
|
@@ -44,5 +45,7 @@ export declare class BaseEntity {
|
|
|
44
45
|
get IsVisible(): boolean;
|
|
45
46
|
get NetworkId(): number;
|
|
46
47
|
get IsNoLongerNeeded(): boolean;
|
|
48
|
+
get OrphanMode(): OrphanMode;
|
|
49
|
+
set OrphanMode(orphanMode: OrphanMode);
|
|
47
50
|
delete(): void;
|
|
48
51
|
}
|
package/enum/index.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./utils";
|
|
|
2
2
|
export * from "./Events";
|
|
3
3
|
export * from "./Game";
|
|
4
4
|
export { Convar, Kvp, Resource, Command } from "./common/index";
|
|
5
|
+
export * from "./enum/index";
|
|
5
6
|
export * from "./utils/index";
|
|
6
7
|
export * from "./entities/index";
|
|
7
8
|
export * from "./cfx/index";
|
package/index.js
CHANGED
|
@@ -823,6 +823,12 @@ var BaseEntity = class _BaseEntity {
|
|
|
823
823
|
get IsNoLongerNeeded() {
|
|
824
824
|
return HasEntityBeenMarkedAsNoLongerNeeded(this.handle);
|
|
825
825
|
}
|
|
826
|
+
get OrphanMode() {
|
|
827
|
+
return GetEntityOrphanMode(this.Handle);
|
|
828
|
+
}
|
|
829
|
+
set OrphanMode(orphanMode) {
|
|
830
|
+
SetEntityOrphanMode(this.Handle, orphanMode);
|
|
831
|
+
}
|
|
826
832
|
delete() {
|
|
827
833
|
if (this.Exists) {
|
|
828
834
|
DeleteEntity(this.handle);
|
|
@@ -1753,6 +1759,63 @@ var Resource = class {
|
|
|
1753
1759
|
return GetNumResources();
|
|
1754
1760
|
}
|
|
1755
1761
|
};
|
|
1762
|
+
|
|
1763
|
+
// src/server/enum/eEntityType.ts
|
|
1764
|
+
var eEntityType = /* @__PURE__ */ ((eEntityType2) => {
|
|
1765
|
+
eEntityType2[eEntityType2["Ped"] = 1] = "Ped";
|
|
1766
|
+
eEntityType2[eEntityType2["Automobile"] = 2] = "Automobile";
|
|
1767
|
+
eEntityType2[eEntityType2["Prop"] = 3] = "Prop";
|
|
1768
|
+
return eEntityType2;
|
|
1769
|
+
})(eEntityType || {});
|
|
1770
|
+
|
|
1771
|
+
// src/server/enum/PopulationType.ts
|
|
1772
|
+
var PopulationType = /* @__PURE__ */ ((PopulationType2) => {
|
|
1773
|
+
PopulationType2[PopulationType2["Unknown"] = 0] = "Unknown";
|
|
1774
|
+
PopulationType2[PopulationType2["RandomPermanent"] = 1] = "RandomPermanent";
|
|
1775
|
+
PopulationType2[PopulationType2["RandomParked"] = 2] = "RandomParked";
|
|
1776
|
+
PopulationType2[PopulationType2["Randompatrol"] = 3] = "Randompatrol";
|
|
1777
|
+
PopulationType2[PopulationType2["RandomScenario"] = 4] = "RandomScenario";
|
|
1778
|
+
PopulationType2[PopulationType2["RandomAmbient"] = 5] = "RandomAmbient";
|
|
1779
|
+
PopulationType2[PopulationType2["Permanent"] = 6] = "Permanent";
|
|
1780
|
+
PopulationType2[PopulationType2["Mission"] = 7] = "Mission";
|
|
1781
|
+
PopulationType2[PopulationType2["Replay"] = 8] = "Replay";
|
|
1782
|
+
PopulationType2[PopulationType2["Cache"] = 9] = "Cache";
|
|
1783
|
+
PopulationType2[PopulationType2["Tool"] = 10] = "Tool";
|
|
1784
|
+
return PopulationType2;
|
|
1785
|
+
})(PopulationType || {});
|
|
1786
|
+
|
|
1787
|
+
// src/server/enum/VehicleLockStatus.ts
|
|
1788
|
+
var VehicleLockStatus = /* @__PURE__ */ ((VehicleLockStatus2) => {
|
|
1789
|
+
VehicleLockStatus2[VehicleLockStatus2["None"] = 0] = "None";
|
|
1790
|
+
VehicleLockStatus2[VehicleLockStatus2["Locked"] = 2] = "Locked";
|
|
1791
|
+
VehicleLockStatus2[VehicleLockStatus2["LockedForPlayer"] = 3] = "LockedForPlayer";
|
|
1792
|
+
VehicleLockStatus2[VehicleLockStatus2["StickPlayerInside"] = 4] = "StickPlayerInside";
|
|
1793
|
+
VehicleLockStatus2[VehicleLockStatus2["CanBeBrokenInto"] = 7] = "CanBeBrokenInto";
|
|
1794
|
+
VehicleLockStatus2[VehicleLockStatus2["CanBeBrokenIntoPersist"] = 8] = "CanBeBrokenIntoPersist";
|
|
1795
|
+
VehicleLockStatus2[VehicleLockStatus2["CannotBeTriedToEnter"] = 10] = "CannotBeTriedToEnter";
|
|
1796
|
+
return VehicleLockStatus2;
|
|
1797
|
+
})(VehicleLockStatus || {});
|
|
1798
|
+
|
|
1799
|
+
// src/server/enum/VehicleType.ts
|
|
1800
|
+
var VehicleType = /* @__PURE__ */ ((VehicleType2) => {
|
|
1801
|
+
VehicleType2["Automobile"] = "automobile";
|
|
1802
|
+
VehicleType2["Bike"] = "bike";
|
|
1803
|
+
VehicleType2["Boat"] = "boat";
|
|
1804
|
+
VehicleType2["Heli"] = "heli";
|
|
1805
|
+
VehicleType2["Plane"] = "plane";
|
|
1806
|
+
VehicleType2["Submarine"] = "submarine";
|
|
1807
|
+
VehicleType2["Trailer"] = "trailer";
|
|
1808
|
+
VehicleType2["Train"] = "train";
|
|
1809
|
+
return VehicleType2;
|
|
1810
|
+
})(VehicleType || {});
|
|
1811
|
+
|
|
1812
|
+
// src/server/enum/OrphanMode.ts
|
|
1813
|
+
var OrphanMode = /* @__PURE__ */ ((OrphanMode2) => {
|
|
1814
|
+
OrphanMode2[OrphanMode2["DeleteWhenNotRelevant"] = 0] = "DeleteWhenNotRelevant";
|
|
1815
|
+
OrphanMode2[OrphanMode2["DeleteOnOwnerDisconnect"] = 1] = "DeleteOnOwnerDisconnect";
|
|
1816
|
+
OrphanMode2[OrphanMode2["KeepEntity"] = 2] = "KeepEntity";
|
|
1817
|
+
return OrphanMode2;
|
|
1818
|
+
})(OrphanMode || {});
|
|
1756
1819
|
export {
|
|
1757
1820
|
Color,
|
|
1758
1821
|
Command,
|
|
@@ -1763,8 +1826,10 @@ export {
|
|
|
1763
1826
|
Game,
|
|
1764
1827
|
Kvp,
|
|
1765
1828
|
Maths,
|
|
1829
|
+
OrphanMode,
|
|
1766
1830
|
Ped,
|
|
1767
1831
|
Player2 as Player,
|
|
1832
|
+
PopulationType,
|
|
1768
1833
|
Prop,
|
|
1769
1834
|
Quaternion,
|
|
1770
1835
|
Resource,
|
|
@@ -1772,7 +1837,10 @@ export {
|
|
|
1772
1837
|
Vector3,
|
|
1773
1838
|
Vector4,
|
|
1774
1839
|
Vehicle,
|
|
1840
|
+
VehicleLockStatus,
|
|
1841
|
+
VehicleType,
|
|
1775
1842
|
cleanPlayerName,
|
|
1843
|
+
eEntityType,
|
|
1776
1844
|
enumValues,
|
|
1777
1845
|
getStringFromUInt8Array,
|
|
1778
1846
|
getUInt32FromUint8Array
|