Skip to content

Commit 9b895d7

Browse files
authored
Merge pull request #82 from shr0x/main
Vehicle, entity & ped updates
2 parents 40446ce + 5ac15c7 commit 9b895d7

File tree

4 files changed

+51
-30
lines changed

4 files changed

+51
-30
lines changed

packages/client/game/entity.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ declare interface GameEntity extends GameEntityLegacy {
351351
setRotation(entity: number, pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void;
352352
setVisible(entity: number, toggle: boolean, unk: boolean): void;
353353
setVelocity(entity: number, x: number, y: number, z: number): void;
354+
setAngularVelocity(entity:number, x: number, y: number, z: number): void;
354355
setHasGravity(entity: number, toggle: boolean): void;
355356
setLodDist(entity: number, value: number): void;
356357
getLodDist(entity: number): number;

packages/client/game/hud.d.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,18 @@ declare interface GameHud extends GameHudLegacy {
853853
getCurrentStreetNameHash(): number;
854854
setShowHudComponentsThisFrameBatch(show: boolean, hudComponents: RageEnums.Hud.Component[]): void;
855855
applyShowHudComponentsThisFrameBatch(): void;
856-
856+
getBlipFadeStatus(blip: Handle): number;
857+
getBlipRotation(blip: Handle): number;
858+
setBlipAsMinimalOnEdge(blip: Handle, p1: boolean): void;
859+
setInteriorZoomLevelIncreased(toggle: boolean): void;
860+
setInteriorZoomLevelDecreased(toggle: boolean): void;
861+
setMainPlayerBlipColour(color: number): void;
862+
customMinimapSetActive(lock: boolean): void;
863+
customMinimapSetBlipObject(spriteId: number): void;
864+
customMinimapCreateBlip(x: number, y: number, z: number): Handle;
865+
customMinimapClearBlips(): void;
866+
enableDeathbloodSeethrough(p1: number): void;
867+
endTextComponent(): void;
857868
unk: GameHudUnk;
858869
}
859870

packages/client/game/vehicle.d.ts

+28-28
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ declare interface GameVehicleLegacy {
146146
skipToEndAndStopPlaybackRecordedVehicle(vehicle: number): void;
147147
startPlaybackRecordedVehicleUsingAi(vehicle: number, recording: number, script: string, speed: number, drivingStyle: number): void;
148148
skipTimeInPlaybackRecordedVehicle(vehicle: number, time: number): void;
149-
addVehicleStuckCheckWithWarp(p0: number, p1: number, p2: number, p3: boolean, p4: boolean, p5: boolean, p6: number): void;
149+
addVehicleStuckCheckWithWarp(vehicle: Handle, minMoveDist: number, checkFreq: number, wrapIfStucked: boolean, wrapIfUpsideDown: boolean, wrapIfInWater: boolean, wrapMethod: number): void;
150150
setVehicleModelIsSuppressed(model: number, suppressed: boolean): void;
151151
getRandomVehicleInSphere(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): number;
152-
getRandomVehicleFrontBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number;
153-
getRandomVehicleBackBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number;
152+
getRandomVehicleFrontBumperInSphere(x: number, y: number, z: number, radius: number, model: Hash, searchFlag: number, ignoreVehicle: Handle): number;
153+
getRandomVehicleBackBumperInSphere(x: number, y: number, z: number, radius: number, model: Hash, searchFlag: number, ignoreVehicle: Handle): number;
154154
getClosestVehicle(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): number;
155155
isThisModelAnEmergencyBoat(model: number): boolean;
156-
getRandomVehicleModelInMemory(p0: boolean): GetRandomVehicleModelInMemoryResult;
156+
getRandomVehicleModelInMemory(normalCars: boolean): GetRandomVehicleModelInMemoryResult;
157157
setVehicleDamage(vehicle: number, xOffset: number, yOffset: number, zOffset: number, damage: number, radius: number, focusOnModel: boolean): void;
158158
getDisplayNameFromVehicleModel(modelHash: number): string;
159159
isAnyVehicleNearPoint(x: number, y: number, z: number, radius: number): boolean;
@@ -170,7 +170,7 @@ declare interface GameVehicleLegacy {
170170
getVehicleClassMaxBraking(vehicleClass: number): number;
171171
setVehicleMod(vehicle: number, modType: number, modIndex: number, customTires: boolean): void;
172172
getVehicleMod(vehicle: number, modType: number): number;
173-
preloadVehicleMod(p0: number, modType: number, p2: number): void;
173+
preloadVehicleMod(vehicle: Handle, modType: number, modIndex: number): void;
174174
setVehicleShootAtTarget(driver: number, entity: number, xTarget: number, yTarget: number, zTarget: number): void;
175175
setCargobobHookPosition(cargobob: number, length1: number, length2: number, p3: boolean): void;
176176
disableVehicleWeapon(disabled: boolean, weaponHash: number, vehicle: number, owner: number): void;
@@ -283,9 +283,9 @@ declare interface GameVehicleUnk {
283283
_0xBA91D045575699AD(vehicle: number): boolean;
284284
_0x80E3357FDEF45C21(p0: number, p1: number): void;
285285
_0xB2E0C0D6922D31F2(vehicle: number, toggle: boolean): void;
286-
_0x3DE51E9C80B116CF(p0: number): number;
287-
_0x9D30687C57BAA0BB(p0: number): void;
288-
_0x41290B40FA63E6DA(p0: number): void;
286+
_0x3DE51E9C80B116CF(vehicle: Handle): number;
287+
_0x9D30687C57BAA0BB(enable: number): void;
288+
_0x41290B40FA63E6DA(toggle: number): void;
289289
_0x0419B167EE128F33(p0: number, p1: number): number;
290290
_0xF3B0E0AED097A3F5(p0: number, p1: number): number;
291291
_0xD3E51C0AB8C26EEE(p0: number, p1: number): number;
@@ -356,7 +356,7 @@ declare interface GameVehicle extends GameVehicleLegacy {
356356
setAllGeneratorsActive(): void;
357357
setAllLowPriorityGeneratorsActive(active: boolean): void;
358358
setOnGroundProperly(vehicle: number, p1: number): boolean;
359-
setUseCutsceneWheelCompression(p0: number, p1: boolean, p2: boolean, p3: boolean): number;
359+
setUseCutsceneWheelCompression(vehicle: Handle, wheelCompression: boolean, animateWheels: boolean, animateJoints: boolean): number;
360360
isStuckOnRoof(vehicle: number): boolean;
361361
addUpsidedownCheck(vehicle: number): void;
362362
removeUpsidedownCheck(vehicle: number): void;
@@ -418,7 +418,7 @@ declare interface GameVehicle extends GameVehicleLegacy {
418418
setBoatMovementResistance(vehicle: number, value: number): void;
419419
isBoatAnchoredAndFrozen(vehicle: number): boolean;
420420
setBoatSinksWhenWrecked(vehicle: number, toggle: boolean): void;
421-
setBoatIsSinking(p0: number): void;
421+
setBoatIsSinking(boat: Handle): void;
422422
setSiren(vehicle: number, toggle: boolean): void;
423423
isSirenOn(vehicle: number): boolean;
424424
isSirenAudioOn(vehicle: number): boolean;
@@ -486,7 +486,7 @@ declare interface GameVehicle extends GameVehicleLegacy {
486486
isAttachedToTrailer(vehicle: number): boolean;
487487
setTrailerInverseMassScale(vehicle: number, p1: number): void;
488488
setTrailerLegsRaised(vehicle: number): void;
489-
setTrailerLegsLowered(p0: number): void;
489+
setTrailerLegsLowered(trailer: Handle): void;
490490
setTyreFixed(vehicle: number, tyreIndex: number): void;
491491
setNumberPlateText(vehicle: number, plateText: string): void;
492492
getNumberPlateText(vehicle: number): string;
@@ -531,11 +531,11 @@ declare interface GameVehicle extends GameVehicleLegacy {
531531
setPlaybackToUseAi(vehicle: number, drivingStyle: number): void;
532532
setPlaybackToUseAiTryToRevertBackLater(vehicle: number, time: number, drivingStyle: number, p3: boolean): void;
533533
explodeInCutscene(vehicle: number, p1: boolean): void;
534-
addStuckCheckWithWarp(p0: number, p1: number, p2: number, p3: boolean, p4: boolean, p5: boolean, p6: number): void;
534+
addStuckCheckWithWarp(vehicle: Handle, minMoveDist: number, checkFreq: number, wrapIfstuckFlag: boolean, wrapIfUpsideDown: boolean, wrapIfInWater: boolean, wrapMethod: number): void;
535535
setModelIsSuppressed(model: number, suppressed: boolean): void;
536536
getRandomInSphere(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): number;
537-
getRandomFrontBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number;
538-
getRandomBackBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number;
537+
getRandomFrontBumperInSphere(x: number, y: number, z: number, radius: number, model: Hash, searchFlag: number, ignoreVehicle: Handle): number;
538+
getRandomBackBumperInSphere(x: number, y: number, z: number, radius: number, model: Hash, searchFlag: number, ignoreVehicle: Handle): number;
539539
getClosest(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): number;
540540
getTrainCarriage(train: number, trailerNumber: number): number;
541541
deleteMissionTrain(train: number): number;
@@ -579,7 +579,7 @@ declare interface GameVehicle extends GameVehicleLegacy {
579579
setXenonLightsColor(vehicle: number, colorIndex: number): void;
580580
getXenonLightsColor(vehicle: number): number;
581581
setIsConsideredByPlayer(vehicle: number, toggle: boolean): void;
582-
getRandomModelInMemory(p0: boolean): GetRandomVehicleModelInMemoryResult;
582+
getRandomModelInMemory(normalCars: boolean): GetRandomVehicleModelInMemoryResult;
583583
getDoorLockStatus(vehicle: number): number;
584584
getDoorDestroyType(vehicle: number, doorIndex: number): number;
585585
isDoorDamaged(veh: number, doorID: number): boolean;
@@ -751,8 +751,8 @@ declare interface GameVehicle extends GameVehicleLegacy {
751751
getLiveryName(vehicle: number, liveryIndex: number): string;
752752
getModModifierValue(vehicle: number, modType: number, modIndex: number): number;
753753
getModIdentifierHash(vehicle: number, modType: number, modIndex: number): number;
754-
preloadMod(p0: number, modType: number, p2: number): void;
755-
hasPreloadModsFinished(p0: number): boolean;
754+
preloadMod(vehicle: Handle, modType: number, modIndex: number): void;
755+
hasPreloadModsFinished(vehicle: Handle): boolean;
756756
releasePreloadMods(vehicle: number): void;
757757
setTyreSmokeColor(vehicle: number, r: number, g: number, b: number): void;
758758
getTyreSmokeColor(vehicle: number): GetVehicleTyreSmokeColorResult;
@@ -766,8 +766,8 @@ declare interface GameVehicle extends GameVehicleLegacy {
766766
isEngineOnFire(vehicle: number): boolean;
767767
modifyTopSpeed(vehicle: number, value: number): void;
768768
setMaxSpeed(vehicle: number, speed: number): void;
769-
addCombatAngledAvoidanceArea(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number;
770-
removeCombatAvoidanceArea(p0: number): void;
769+
addCombatAngledAvoidanceArea(startX: number, startY: number, startZ: number, endX: number, endY: number, endZ: number, width: number): number;
770+
removeCombatAvoidanceArea(index: number): void;
771771
isAnyPedRappellingFromHeli(vehicle: number): boolean;
772772
setCheatPowerIncrease(vehicle: number, value: number): void;
773773
setIsWanted(vehicle: number, state: boolean): void;
@@ -801,7 +801,7 @@ declare interface GameVehicle extends GameVehicleLegacy {
801801
getCurrentSlipstreamDraft(vehicle: number): number;
802802
isSlipstreamLeader(vehicle: number): boolean;
803803
setInactiveDuringPlayback(vehicle: number, toggle: boolean): void;
804-
setActiveDuringPlayback(p0: number, forceActive: boolean): void;
804+
setActiveDuringPlayback(vehicle: Handle, forceActive: boolean): void;
805805
isSprayable(vehicle: number): boolean;
806806
setEngineCanDegrade(vehicle: number, toggle: boolean): void;
807807
setShadowEffect(vehicle: number, p1: number, p2: number): void;
@@ -818,7 +818,7 @@ declare interface GameVehicle extends GameVehicleLegacy {
818818
detachEntityFromCargobob(cargobob: number, entity: number): number;
819819
isAttachedToCargobob(cargobob: number, vehicleAttached: number): boolean;
820820
getAttachedToCargobob(cargobob: number): number;
821-
getEntityAttachedToCargobob(p0: number): number;
821+
getEntityAttachedToCargobob(cargobob: Handle): number;
822822
attachToCargobob(vehicle: number, cargobob: number, p2: number, x: number, y: number, z: number): void;
823823
attachEntityToCargobob(cargoHandle: number, vehicleHandle: number, boneIndex: number, x: number, y: number, z: number): void;
824824
setCargobobHookCanDetach(cargobob: number, toggle: boolean): void;
@@ -876,18 +876,18 @@ declare interface GameVehicle extends GameVehicleLegacy {
876876
getSuspensionHeight(vehicle: number): number;
877877
setCarHighSpeedBumpSeverityMultiplier(multiplier: number): void;
878878
getNumberOfDoors(vehicle: number): number;
879-
setHydraulicRaised(p0: number, p1: number): void;
879+
setHydraulicRaised(vehicle: Handle, raised: boolean): void;
880880
getBodyHealth2(vehicle: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number;
881881
setKersAllowed(vehicle: number, toggle: boolean): void;
882882
getHasKers(vehicle: number): boolean;
883883
setHydraulicWheelValue(vehicle: number, wheelId: number, value: number): void;
884-
setCamberedWheelsDisabled(p0: number, p1: number): void;
885-
setHydraulicWheelState(p0: number, p1: number): void;
884+
setCamberedWheelsDisabled(vehicle: Handle, canUse: boolean): void;
885+
setHydraulicWheelState(vehicle: Handle, wheelIndex: number): void;
886886
setHydraulicWheelStateTransition(vehicle: number, wheelId: number, state: number, value: number, p4: number): void;
887887
setDamageModifier(vehicle: number, p1: number): number;
888888
setUnkDamageMultiplier(vehicle: number, multiplier: number): void;
889889
setControlsInverted(vehicle: number, state: boolean): void;
890-
setRampLaunchModifier(p0: number, p1: number): void;
890+
setRampLaunchModifier(vehicle: Handle, impulseScale: number): void;
891891
getIsDoorValid(vehicle: number, doorIndex: number): boolean;
892892
setRocketBoostRefillTime(vehicle: number, seconds: number): void;
893893
getHasRocketBoost(vehicle: number): boolean;
@@ -905,9 +905,9 @@ declare interface GameVehicle extends GameVehicleLegacy {
905905
getCanActivateParachute(vehicle: number): boolean;
906906
setParachuteActive(vehicle: number, active: boolean): void;
907907
setReceivesRampDamage(vehicle: number, toggle: boolean): void;
908-
setRampSidewaysLaunchMotion(p0: number, p1: number): void;
909-
setRampUpwardsLaunchMotion(p0: number, p1: number): void;
910-
setWeaponsDisabled(p0: number, p1: number): void;
908+
setRampSidewaysLaunchMotion(vehicle: Handle, takeDamage: number): void;
909+
setRampUpwardsLaunchMotion(vehicle: Handle, normalise: number): void;
910+
setWeaponsDisabled(vehicle: Handle, canTargetObjects: number): void;
911911
setParachuteModel(vehicle: number, modelHash: number): void;
912912
setParachuteTextureVariatiion(vehicle: number, textureVariation: number): void;
913913
getAllS(): GetAllVehiclesResult;

packages/client/index.d.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ declare class EntityMp {
570570
hasAnimEventFired(actionHash: Hash): boolean;
571571
hasAnimFinished(animDict: string, animName: string, p2: number): boolean;
572572
hasBeenDamagedBy(entity: Handle, p1: boolean): boolean;
573+
hasBeenDamagedByEntity(entity:Handle, p2:boolean): boolean;
573574
hasBeenDamagedByAnyObject(): boolean;
574575
hasBeenDamagedByAnyPed(): boolean;
575576
hasBeenDamagedByAnyVehicle(): boolean;
@@ -1458,6 +1459,10 @@ declare interface CameraMpPool extends EntityMpPool<CameraMp> {
14581459
}
14591460

14601461
declare interface PedMpBase extends EntityMp {
1462+
weapon: Hash;
1463+
weaponAmmo:number;
1464+
1465+
haveAllStreamingRequestsCompleted():boolean;
14611466
applyBlood(boneIndex: number, xRot: number, yRot: number, zRot: number, woundType: string): void;
14621467
applyBloodByZone(p1: any, p2: number, p3: number, p4: any): void;
14631468
applyBloodDamageByZone(p1: any, p2: number, p3: number, p4: any): void;
@@ -2281,6 +2286,10 @@ declare interface PedMpBase extends EntityMp {
22812286
}
22822287

22832288
declare interface PedMp extends PedMpBase {
2289+
/**
2290+
* Returns whether ped is dynamic or not.
2291+
*/
2292+
readonly isDynamic: boolean;
22842293
spawnPosition: Vector3;
22852294
/**
22862295
* Returns the player set as the ped's controller.
@@ -2348,7 +2357,7 @@ declare interface PlayerMp extends PedMpBase {
23482357
voiceAutoVolume: boolean;
23492358
voiceVolume: number;
23502359
voice3d: any;
2351-
weapon: Hash;
2360+
23522361
readonly action: string;
23532362
readonly aimTarget: boolean;
23542363
readonly ip: string;

0 commit comments

Comments
 (0)