Skip to content

Commit 580ba5d

Browse files
authored
Merge pull request #80 from shr0x/main
General updates & fixes
2 parents 6bf4391 + 65984bc commit 580ba5d

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

packages/client/game/object.d.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,14 @@ declare interface GameObject extends GameObjectLegacy {
258258
* [Number model, Vector3 position, Vector3 rotation, Number distanceSquared(if includeDistance is set to true)]
259259
* [RAGE:MP Wiki article](https://wiki.rage.mp/index.php?title=Object::getAllInRange)
260260
*/
261-
getAllInRange(position: Vector3, range?: number, includeDistance?: boolean, sortByDistance?: boolean) : [number, Vector3, Vector3, number?][] | undefined;
261+
getAllInRange(position: Vector3, range?: number, includeDistance?: boolean, sortByDistance?: boolean): [number, Vector3, Vector3, number?][] | undefined;
262262
getAllByHash(hash: number): Vector3[];
263-
263+
setForceVehiclesToAvoid(object: Handle, enable: boolean): void;
264+
doorSystemGetAutomaticDistance(doorHash: Handle): number;
265+
clearObjectsInsideGarage(garage: Handle, vehicles: boolean, peds: boolean, objects: boolean, broadcast?: boolean): void;
266+
createNonNetworkedAmbientPickup(type: number, x: number, y: number, z: number, flags?: number, amount?: number, customModel?: number, scriptedObject?: boolean, hostObject?: boolean): Handle;
267+
createNonNetworkedPortablePickup(type: number, x: number, y: number, z: number, snaptoGround?: boolean, customModel?: number): Handle;
264268
unk: GameObjectUnk;
265269
}
266270

267-
declare interface GameObjectMp extends GameObject {}
271+
declare interface GameObjectMp extends GameObject { }

packages/client/index.d.ts

+24-19
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ declare interface IClientEvents {
11641164
boneIndex: number,
11651165
damage: number
11661166
) => void;
1167-
playerStartEnterVehicle: (vehicle: VehicleMp, seat: number) => void;
1167+
// playerStartEnterVehicle: (vehicle: VehicleMp, seat: number) => void;
11681168
playerEnterVehicle: (vehicle: VehicleMp, seat: number) => void;
11691169
playerLeaveVehicle: (vehicle: VehicleMp, seat: number) => void;
11701170
playerStartTalking: (player: PlayerMp) => void;
@@ -1253,8 +1253,8 @@ declare interface EventMpPool {
12531253
callRemoteProc<T = any>(procName: string, ...args: any[]): Promise<T>;
12541254

12551255
callRemoteUnreliable(eventName: string, ...args: any[]): void;
1256-
cancelPendingRpc(procName?: string): void;
1257-
hasPendingRpc(procName?: string): boolean;
1256+
cancelPendingProc(procName?: string): void;
1257+
hasPendingProc(procName?: string): boolean;
12581258

12591259
/**
12601260
* Removes the specified event from events tree.
@@ -1664,13 +1664,18 @@ declare interface PedMpBase extends EntityMp {
16641664
registerTarget(target: Handle): void;
16651665
removeDefensiveArea(toggle: boolean): void;
16661666
removeFromGroup(): void;
1667-
removeHelmet(p2: boolean): void;
1667+
/**
1668+
* Removes helmet from player
1669+
* @param forceRemove whether to force remove it or not
1670+
* @returns void
1671+
*/
1672+
removeHelmet(forceRemove: boolean): void;
16681673
removePreferredCoverSet(): void;
16691674
removeWeapon(weapon: RageEnums.Hashes.Weapon | Hash): void;
16701675
removeAllWeapons(): void;
16711676
resetInVehicleContext(): void;
16721677
resetLastVehicle(): void;
1673-
resetMovementClipset(p1: number): void;
1678+
resetMovementClipset(blendDuration: number): void;
16741679
resetRagdollTimer(): void;
16751680
resetStrafeClipset(): void;
16761681
resetVisibleDamage(): void;
@@ -1689,11 +1694,11 @@ declare interface PedMpBase extends EntityMp {
16891694
setAsEnemy(toggle: boolean): void;
16901695
setAsGroupLeader(groupId: number): void;
16911696
setAsGroupMember(groupId: number): void;
1692-
setBlendFromParents(p1: any, p2: any, p3: number, p4: number): void;
1697+
setBlendFromParents(firstPed: Handle, secondPed: Handle, blend: number, texBlend: number): void;
16931698
setBlockingOfNonTemporaryEvents(toggle: boolean): void;
1694-
setBoundsOrientation(p1: number, p2: number, p3: number, p4: number, p5: number): void;
1699+
setBoundsOrientation(pitch: number, heading: number, x: number, y: number, z: number): void;
16951700
setCanArmIk(toggle: boolean): void;
1696-
setCanAttackFriendly(toggle: boolean, p2: boolean): void;
1701+
setCanAttackFriendly(toggle: boolean, lockOnState: boolean): void;
16971702
setCanBeDraggedOut(toggle: boolean): void;
16981703
setCanBeKnockedOffVehicle(state: number): void;
16991704
setCanBeShotInVehicle(toggle: boolean): void;
@@ -1714,15 +1719,15 @@ declare interface PedMpBase extends EntityMp {
17141719
setCanPlayVisemeAnims(p1: boolean, p2: boolean): void;
17151720
setCanRagdoll(toggle: boolean): void;
17161721
setCanRagdollFromPlayerImpact(toggle: boolean): void;
1717-
setCanSmashGlass(p1: boolean, p2: boolean): void;
1722+
setCanSmashGlass(glassRagdoll: boolean, glassWeapon: boolean): void;
17181723
setCanSwitchWeapon(toggle: boolean): void;
17191724
setCanTeleportToGroupLeader(groupHandle: number, toggle: boolean): void;
17201725
setCanTorsoIk(toggle: boolean): void;
17211726
setCanUseAutoConversationLookat(toggle: boolean): void;
17221727
setCapsule(value: number): void;
17231728
setCombatAbility(p1: number): void;
17241729
setCombatAttributes(attributeIndex: number, enabled: boolean): void;
1725-
setCombatFloat(combatType: number, p2: number): void;
1730+
setCombatFloat(combatType: number, attribute: number): void;
17261731
setCombatMovement(combatMovement: number): void;
17271732
setCombatRange(p1: number): void;
17281733
setComponentVariation(componentId: number, drawableId: number, textureId: number, paletteId: number): void;
@@ -1734,15 +1739,15 @@ declare interface PedMpBase extends EntityMp {
17341739
setDefaultComponentVariation(): void;
17351740
setDefensiveAreaAttachedToPed(
17361741
attachPed: Handle,
1737-
p2: number,
1738-
p3: number,
1739-
p4: number,
1740-
p5: number,
1741-
p6: number,
1742-
p7: number,
1743-
p8: number,
1744-
p9: boolean,
1745-
p10: boolean
1742+
x1: number,
1743+
y1: number,
1744+
z1: number,
1745+
x2: number,
1746+
y2: number,
1747+
z2: number,
1748+
width: number,
1749+
orientate: boolean,
1750+
applyToSecondaryDefensiveArea: boolean
17461751
): void;
17471752
setDefensiveAreaDirection(p1: number, p2: number, p3: number, p4: boolean): void;
17481753
setDefensiveSphereAttachedToPed(p1: any, p2: number, p3: number, p4: number, p5: number, p6: boolean): void;

packages/server/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ declare class PlayerMp extends EntityMp {
578578
/**
579579
* TODO: docs
580580
*/
581-
public cancelPendingRpc(procName?: string): void;
581+
public cancelPendingProc(procName?: string): void;
582582

583583
/**
584584
* TODO: docs
@@ -678,7 +678,7 @@ declare class PlayerMp extends EntityMp {
678678
/**
679679
* TODO: docs
680680
*/
681-
public hasPendingRpc(procName?: string): boolean;
681+
public hasPendingProc(procName?: string): boolean;
682682

683683
/**
684684
* Used for check, player is located in stream distance for another player or not.

0 commit comments

Comments
 (0)