@schmoker/rageenginebridge 0.1.0 → 0.2.0

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/dist/ragemp.cjs CHANGED
@@ -234,6 +234,217 @@ var RageMpEntity = class {
234
234
  isVisible() {
235
235
  return mp.game.entity.isVisible(this.raw.handle);
236
236
  }
237
+ // --- Rotation / Transform ---
238
+ getRotation(rotationOrder = 2) {
239
+ const r = mp.game.entity.getRotation(this.raw.handle, rotationOrder);
240
+ return { x: r.x, y: r.y, z: r.z };
241
+ }
242
+ getQuaternion() {
243
+ const q = mp.game.entity.getQuaternion(this.raw.handle);
244
+ return { x: q.x, y: q.y, z: q.z, w: q.w };
245
+ }
246
+ setQuaternion(x, y, z, w) {
247
+ mp.game.entity.setQuaternion(this.raw.handle, x, y, z, w);
248
+ }
249
+ setCoordsNoOffset(x, y, z, alive = false, deadFlag = false, ragdollFlag = false) {
250
+ mp.game.entity.setCoordsNoOffset(this.raw.handle, x, y, z, alive, deadFlag, ragdollFlag);
251
+ }
252
+ // --- Attachment ---
253
+ attachTo(entity, boneIndex, xPos, yPos, zPos, xRot, yRot, zRot, useSoftPinning, collision, isPed, vertexIndex, fixedRot) {
254
+ mp.game.entity.attachToEntity(
255
+ this.raw.handle,
256
+ entity,
257
+ boneIndex,
258
+ xPos,
259
+ yPos,
260
+ zPos,
261
+ xRot,
262
+ yRot,
263
+ zRot,
264
+ false,
265
+ useSoftPinning,
266
+ collision,
267
+ isPed,
268
+ vertexIndex,
269
+ fixedRot
270
+ );
271
+ }
272
+ attachToPhysically(entity, boneIndex1, boneIndex2, xOff1, yOff1, zOff1, xOff2, yOff2, zOff2, xRot, yRot, zRot, breakForce, fixedRot, collision, teleport, order) {
273
+ mp.game.entity.attachToEntityPhysically(
274
+ this.raw.handle,
275
+ entity,
276
+ boneIndex1,
277
+ boneIndex2,
278
+ xOff1,
279
+ yOff1,
280
+ zOff1,
281
+ xOff2,
282
+ yOff2,
283
+ zOff2,
284
+ xRot,
285
+ yRot,
286
+ zRot,
287
+ breakForce,
288
+ fixedRot,
289
+ false,
290
+ collision,
291
+ teleport,
292
+ order
293
+ );
294
+ }
295
+ detach(dynamic, collision) {
296
+ mp.game.entity.detach(this.raw.handle, dynamic, collision);
297
+ }
298
+ isAttached() {
299
+ return mp.game.entity.isAttached(this.raw.handle);
300
+ }
301
+ isAttachedTo(entity) {
302
+ return mp.game.entity.isAttachedToEntity(this.raw.handle, entity);
303
+ }
304
+ // --- Physics / Forces ---
305
+ applyForceTo(forceType, x, y, z, offX, offY, offZ, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13) {
306
+ mp.game.entity.applyForceTo(
307
+ this.raw.handle,
308
+ forceType,
309
+ x,
310
+ y,
311
+ z,
312
+ offX,
313
+ offY,
314
+ offZ,
315
+ boneIndex,
316
+ isDirectionRel,
317
+ ignoreUpVec,
318
+ isForceRel,
319
+ p12,
320
+ p13
321
+ );
322
+ }
323
+ applyForceToCenterOfMass(forceType, x, y, z, p5, isDirectionRel, isForceRel, p8) {
324
+ mp.game.entity.applyForceToCenterOfMass(
325
+ this.raw.handle,
326
+ forceType,
327
+ x,
328
+ y,
329
+ z,
330
+ p5,
331
+ isDirectionRel,
332
+ isForceRel,
333
+ p8
334
+ );
335
+ }
336
+ setHasGravity(toggle) {
337
+ mp.game.entity.setHasGravity(this.raw.handle, toggle);
338
+ }
339
+ setDynamic(toggle) {
340
+ mp.game.entity.setDynamic(this.raw.handle, toggle);
341
+ }
342
+ // --- Collision / Interaction ---
343
+ hasCollidedWithAnything() {
344
+ return mp.game.entity.hasCollidedWithAnything(this.raw.handle);
345
+ }
346
+ isTouching(entity) {
347
+ return mp.game.entity.isTouchingEntity(this.raw.handle, entity);
348
+ }
349
+ isTouchingModel(modelHash) {
350
+ return mp.game.entity.isTouchingModel(this.raw.handle, modelHash);
351
+ }
352
+ setNoCollision(entity, toggle) {
353
+ mp.game.entity.setNoCollisionEntity(this.raw.handle, entity, toggle);
354
+ }
355
+ // --- Animation ---
356
+ isPlayingAnim(animDict, animName, taskFlag) {
357
+ return mp.game.entity.isPlayingAnim(this.raw.handle, animDict, animName, taskFlag);
358
+ }
359
+ stopAnim(animDict, animName, p3) {
360
+ mp.game.entity.stopAnim(this.raw.handle, animDict, animName, p3);
361
+ }
362
+ // --- Rendering / LOD ---
363
+ setLodDist(value) {
364
+ mp.game.entity.setLodDist(this.raw.handle, value);
365
+ }
366
+ getLodDist() {
367
+ return mp.game.entity.getLodDist(this.raw.handle);
368
+ }
369
+ isOccluded() {
370
+ return mp.game.entity.isOccluded(this.raw.handle);
371
+ }
372
+ setMotionBlur(toggle) {
373
+ mp.game.entity.setMotionBlur(this.raw.handle, toggle);
374
+ }
375
+ setAlwaysPrerender(toggle) {
376
+ mp.game.entity.setAlwaysPrerender(this.raw.handle, toggle);
377
+ }
378
+ // --- Proofs ---
379
+ setProofs(bulletProof, fireProof, explosionProof, collisionProof, meleeProof, p6, p7, drownProof) {
380
+ mp.game.entity.setProofs(
381
+ this.raw.handle,
382
+ bulletProof,
383
+ fireProof,
384
+ explosionProof,
385
+ collisionProof,
386
+ meleeProof,
387
+ p6,
388
+ p7,
389
+ drownProof
390
+ );
391
+ }
392
+ // --- Height / Submersion ---
393
+ getHeightAboveGround() {
394
+ return mp.game.entity.getHeightAboveGround(this.raw.handle);
395
+ }
396
+ getSubmergedLevel() {
397
+ return mp.game.entity.getSubmergedLevel(this.raw.handle);
398
+ }
399
+ // --- Rotation Velocity ---
400
+ getRotationVelocity() {
401
+ const v = mp.game.entity.getRotationVelocity(this.raw.handle);
402
+ return { x: v.x, y: v.y, z: v.z };
403
+ }
404
+ // --- Animation (extended) ---
405
+ getAnimCurrentTime(animDict, animName) {
406
+ return mp.game.entity.getAnimCurrentTime(this.raw.handle, animDict, animName);
407
+ }
408
+ getAnimTotalTime(animDict, animName) {
409
+ return mp.game.entity.getAnimTotalTime(this.raw.handle, animDict, animName);
410
+ }
411
+ setAnimCurrentTime(animDict, animName, time) {
412
+ mp.game.entity.setAnimCurrentTime(this.raw.handle, animDict, animName, time);
413
+ }
414
+ setAnimSpeed(animDict, animName, speedMultiplier) {
415
+ mp.game.entity.setAnimSpeed(this.raw.handle, animDict, animName, speedMultiplier);
416
+ }
417
+ // --- Damage Tracking ---
418
+ hasBeenDamagedByEntity(entity, p2 = true) {
419
+ return mp.game.entity.hasBeenDamagedByEntity(this.raw.handle, entity, p2);
420
+ }
421
+ clearLastDamageEntity() {
422
+ mp.game.entity.clearLastDamageEntity(this.raw.handle);
423
+ }
424
+ // --- Line of Sight ---
425
+ hasClearLosToEntity(entity, traceType = 17) {
426
+ return mp.game.entity.hasClearLosToEntity(this.raw.handle, entity, traceType);
427
+ }
428
+ // --- Offset / Position ---
429
+ getOffsetFromInWorldCoords(offsetX, offsetY, offsetZ) {
430
+ const v = mp.game.entity.getOffsetFromInWorldCoords(this.raw.handle, offsetX, offsetY, offsetZ);
431
+ return { x: v.x, y: v.y, z: v.z };
432
+ }
433
+ // --- Orientation Checks ---
434
+ isUpright(angle) {
435
+ return mp.game.entity.isUpright(this.raw.handle, angle);
436
+ }
437
+ isUpsidedown() {
438
+ return mp.game.entity.isUpsidedown(this.raw.handle);
439
+ }
440
+ // --- Physics Check ---
441
+ doesHavePhysics() {
442
+ return mp.game.entity.doesHavePhysics(this.raw.handle);
443
+ }
444
+ // --- Mission Entity ---
445
+ setAsMissionEntity(p1 = true, p2 = false) {
446
+ mp.game.entity.setAsMissionEntity(this.raw.handle, p1, p2);
447
+ }
237
448
  };
238
449
 
239
450
  // src/ragemp/RageMpPlayer.ts
@@ -417,6 +628,142 @@ var RageMpPlayer = class extends RageMpEntity {
417
628
  setRagdollOnCollision(toggle) {
418
629
  mp.game.ped.setRagdollOnCollision(this.raw.handle, toggle);
419
630
  }
631
+ // --- Wanted Level ---
632
+ setWantedLevel(level) {
633
+ mp.game.player.setWantedLevel(level, false);
634
+ }
635
+ getWantedLevel() {
636
+ return mp.game.player.getWantedLevel();
637
+ }
638
+ clearWantedLevel() {
639
+ mp.game.player.clearWantedLevel();
640
+ }
641
+ // --- Control ---
642
+ setControl(toggle, flags = 0) {
643
+ mp.game.player.setControl(toggle, flags);
644
+ }
645
+ isControlOn() {
646
+ return mp.game.player.isControlOn();
647
+ }
648
+ // --- Ignore ---
649
+ setEveryoneIgnore(toggle) {
650
+ mp.game.player.setEveryoneIgnore(toggle);
651
+ }
652
+ setPoliceIgnore(toggle) {
653
+ mp.game.player.setPoliceIgnore(toggle);
654
+ }
655
+ // --- Damage Modifiers ---
656
+ setWeaponDamageModifier(modifier) {
657
+ mp.game.player.setWeaponDamageModifier(modifier);
658
+ }
659
+ setVehicleDamageModifier(modifier) {
660
+ mp.game.player.setVehicleDamageModifier(modifier);
661
+ }
662
+ setMeleeWeaponDamageModifier(modifier) {
663
+ mp.game.player.setMeleeWeaponDamageModifier(modifier, false);
664
+ }
665
+ // --- Abilities ---
666
+ resetStamina() {
667
+ mp.game.player.resetStamina();
668
+ }
669
+ setCanDoDriveBy(toggle) {
670
+ mp.game.player.setCanDoDriveBy(toggle);
671
+ }
672
+ setCanUseCover(toggle) {
673
+ mp.game.player.setCanUseCover(toggle);
674
+ }
675
+ // --- Armour (extended) ---
676
+ getMaxArmour() {
677
+ return mp.game.player.getMaxArmour();
678
+ }
679
+ setMaxArmour(value) {
680
+ mp.game.player.setMaxArmour(value);
681
+ }
682
+ // --- Misc ---
683
+ getInvincible() {
684
+ return mp.game.player.getInvincible();
685
+ }
686
+ setParachuteTintIndex(tintIndex) {
687
+ mp.game.player.setParachuteTintIndex(tintIndex);
688
+ }
689
+ getParachuteTintIndex() {
690
+ return mp.game.player.getParachuteTintIndex();
691
+ }
692
+ // --- Wanted Level (extended) ---
693
+ setMaxWantedLevel(maxWantedLevel) {
694
+ mp.game.player.setMaxWantedLevel(maxWantedLevel);
695
+ }
696
+ setWantedLevelNow(p1 = false) {
697
+ mp.game.player.setWantedLevelNow(p1);
698
+ }
699
+ // --- Police ---
700
+ setDispatchCopsFor(toggle) {
701
+ mp.game.player.setDispatchCopsFor(toggle);
702
+ }
703
+ setAllRandomPedsFlee(toggle) {
704
+ mp.game.player.setAllRandomPedsFlee(toggle);
705
+ }
706
+ setAllRandomPedsFleeThisFrame() {
707
+ mp.game.player.setAllRandomPedsFleeThisFrame();
708
+ }
709
+ // --- Aiming / Targeting ---
710
+ isFreeAiming() {
711
+ return mp.game.player.isFreeAiming();
712
+ }
713
+ isFreeAimingAtEntity(entity) {
714
+ return mp.game.player.isFreeAimingAtEntity(entity);
715
+ }
716
+ getTargetEntity() {
717
+ return mp.game.player.getTargetEntity();
718
+ }
719
+ // --- Movement Multipliers ---
720
+ setRunSprintMultiplierFor(multiplier) {
721
+ mp.game.player.setRunSprintMultiplierFor(multiplier);
722
+ }
723
+ setSwimMultiplierFor(multiplier) {
724
+ mp.game.player.setSwimMultiplierFor(multiplier);
725
+ }
726
+ // --- Health Regen ---
727
+ setHealthRechargeMultiplier(regenRate) {
728
+ mp.game.player.setHealthRechargeMultiplier(regenRate);
729
+ }
730
+ getHealthRechargeLimit() {
731
+ return mp.game.player.getHealthRechargeLimit();
732
+ }
733
+ setHealthRechargeLimit(limit) {
734
+ mp.game.player.setHealthRechargeLimit(limit);
735
+ }
736
+ // --- Defense Modifiers ---
737
+ setWeaponDefenseModifier(modifier) {
738
+ mp.game.player.setWeaponDefenseModifier(modifier);
739
+ }
740
+ setMeleeWeaponDefenseModifier(modifier) {
741
+ mp.game.player.setMeleeWeaponDefenseModifier(modifier);
742
+ }
743
+ setVehicleDefenseModifier(modifier) {
744
+ mp.game.player.setVehicleDefenseModifier(modifier);
745
+ }
746
+ // --- Firing ---
747
+ disableFiring(toggle) {
748
+ mp.game.player.disableFiring(toggle);
749
+ }
750
+ setForcedAim(toggle) {
751
+ mp.game.player.setForcedAim(toggle);
752
+ }
753
+ // --- Timestamps ---
754
+ getTimeSinceLastArrest() {
755
+ return mp.game.player.getTimeSinceLastArrest();
756
+ }
757
+ getTimeSinceLastDeath() {
758
+ return mp.game.player.getTimeSinceLastDeath();
759
+ }
760
+ // --- Vehicle / Group ---
761
+ getPlayersLastVehicle() {
762
+ return mp.game.player.getPlayersLastVehicle();
763
+ }
764
+ getGroup() {
765
+ return mp.game.player.getGroup();
766
+ }
420
767
  };
421
768
 
422
769
  // src/ragemp/RageMpVehicle.ts
@@ -653,6 +1000,246 @@ var RageMpVehicle = class extends RageMpEntity {
653
1000
  setSuspensionHeight(height) {
654
1001
  mp.game.vehicle.setSuspensionHeight(this.raw.handle, height);
655
1002
  }
1003
+ // --- Windows ---
1004
+ smashWindow(index) {
1005
+ mp.game.vehicle.smashWindow(this.raw.handle, index);
1006
+ }
1007
+ fixWindow(index) {
1008
+ mp.game.vehicle.fixWindow(this.raw.handle, index);
1009
+ }
1010
+ removeWindow(index) {
1011
+ mp.game.vehicle.removeWindow(this.raw.handle, index);
1012
+ }
1013
+ rollDownWindow(index) {
1014
+ mp.game.vehicle.rollDownWindow(this.raw.handle, index);
1015
+ }
1016
+ rollUpWindow(index) {
1017
+ mp.game.vehicle.rollUpWindow(this.raw.handle, index);
1018
+ }
1019
+ rollDownWindows() {
1020
+ mp.game.vehicle.rollDownWindows(this.raw.handle);
1021
+ }
1022
+ isWindowIntact(index) {
1023
+ return mp.game.vehicle.isWindowIntact(this.raw.handle, index);
1024
+ }
1025
+ areAllWindowsIntact() {
1026
+ return mp.game.vehicle.areAllWindowsIntact(this.raw.handle);
1027
+ }
1028
+ // --- Door Locking ---
1029
+ setDoorsLocked(lockStatus) {
1030
+ mp.game.vehicle.setDoorsLocked(this.raw.handle, lockStatus);
1031
+ }
1032
+ getDoorLockStatus() {
1033
+ return mp.game.vehicle.getDoorLockStatus(this.raw.handle);
1034
+ }
1035
+ setDoorControl(doorIndex, speed, angle) {
1036
+ mp.game.vehicle.setDoorControl(this.raw.handle, doorIndex, speed, angle);
1037
+ }
1038
+ setDoorsShut(closeInstantly) {
1039
+ mp.game.vehicle.setDoorsShut(this.raw.handle, closeInstantly);
1040
+ }
1041
+ // --- Siren / Alarm ---
1042
+ isSirenOn() {
1043
+ return mp.game.vehicle.isSirenOn(this.raw.handle);
1044
+ }
1045
+ setSiren(toggle) {
1046
+ mp.game.vehicle.setSiren(this.raw.handle, toggle);
1047
+ }
1048
+ isAlarmActivated() {
1049
+ return mp.game.vehicle.isAlarmActivated(this.raw.handle);
1050
+ }
1051
+ setAlarm(toggle) {
1052
+ mp.game.vehicle.setAlarm(this.raw.handle, toggle);
1053
+ }
1054
+ // --- Convertible ---
1055
+ isConvertible() {
1056
+ return mp.game.vehicle.isAConvertible(this.raw.handle, false);
1057
+ }
1058
+ lowerConvertibleRoof(instantly = false) {
1059
+ mp.game.vehicle.lowerConvertibleRoof(this.raw.handle, instantly);
1060
+ }
1061
+ raiseConvertibleRoof(instantly = false) {
1062
+ mp.game.vehicle.raiseConvertibleRoof(this.raw.handle, instantly);
1063
+ }
1064
+ // --- Speed / Movement ---
1065
+ setForwardSpeed(speed) {
1066
+ mp.game.vehicle.setForwardSpeed(this.raw.handle, speed);
1067
+ }
1068
+ setMaxSpeed(maxSpeed) {
1069
+ mp.game.vehicle.setMaxSpeed(this.raw.handle, maxSpeed);
1070
+ }
1071
+ setHandbrake(toggle) {
1072
+ mp.game.vehicle.setHandbrake(this.raw.handle, toggle);
1073
+ }
1074
+ // --- Lights (extended) ---
1075
+ setIndicatorLights(index, toggle) {
1076
+ mp.game.vehicle.setIndicatorLights(this.raw.handle, index, toggle);
1077
+ }
1078
+ setInteriorLight(toggle) {
1079
+ mp.game.vehicle.setInteriorlight(this.raw.handle, toggle);
1080
+ }
1081
+ setFullbeam(toggle) {
1082
+ mp.game.vehicle.setFullbeam(this.raw.handle, toggle);
1083
+ }
1084
+ setSearchlight(toggle, canBeUsedByAI) {
1085
+ mp.game.vehicle.setSearchlight(this.raw.handle, toggle, canBeUsedByAI);
1086
+ }
1087
+ setLightMultiplier(multiplier) {
1088
+ mp.game.vehicle.setLightMultiplier(this.raw.handle, multiplier);
1089
+ }
1090
+ // --- Colours (extended) ---
1091
+ setExtraColours(pearlescent, wheel) {
1092
+ mp.game.vehicle.setExtraColours(this.raw.handle, pearlescent, wheel);
1093
+ }
1094
+ getExtraColours() {
1095
+ const c = mp.game.vehicle.getExtraColours(this.raw.handle);
1096
+ return { pearlescent: _nullishCoalesce(c.pearlescentColor, () => ( c[0])), wheel: _nullishCoalesce(c.wheelColor, () => ( c[1])) };
1097
+ }
1098
+ setTyreSmokeColor(r, g, b) {
1099
+ mp.game.vehicle.setTyreSmokeColor(this.raw.handle, r, g, b);
1100
+ }
1101
+ getTyreSmokeColor() {
1102
+ const c = mp.game.vehicle.getTyreSmokeColor(this.raw.handle);
1103
+ return { r: _nullishCoalesce(c.r, () => ( c[0])), g: _nullishCoalesce(c.g, () => ( c[1])), b: _nullishCoalesce(c.b, () => ( c[2])) };
1104
+ }
1105
+ // --- Vehicle State ---
1106
+ getClass() {
1107
+ return mp.game.vehicle.getClass(this.raw.handle);
1108
+ }
1109
+ explode(isAudible, isInvisible) {
1110
+ mp.game.vehicle.explode(this.raw.handle, isAudible, isInvisible);
1111
+ }
1112
+ isDamaged() {
1113
+ return mp.game.vehicle.isDamaged(this.raw.handle);
1114
+ }
1115
+ isStolen() {
1116
+ return mp.game.vehicle.isStolen(this.raw.handle);
1117
+ }
1118
+ setIsStolen(toggle) {
1119
+ mp.game.vehicle.setIsStolen(this.raw.handle, toggle);
1120
+ }
1121
+ isStopped() {
1122
+ return mp.game.vehicle.isStopped(this.raw.handle);
1123
+ }
1124
+ setOnGroundProperly() {
1125
+ return mp.game.vehicle.setOnGroundProperly(this.raw.handle, 5);
1126
+ }
1127
+ setDeformationFixed() {
1128
+ mp.game.vehicle.setDeformationFixed(this.raw.handle);
1129
+ }
1130
+ isBumperBrokenOff(front) {
1131
+ return mp.game.vehicle.isBumperBrokenOff(this.raw.handle, front);
1132
+ }
1133
+ // --- Towing ---
1134
+ attachToTowTruck(towTruck, rear, hookOffsetX, hookOffsetY, hookOffsetZ) {
1135
+ mp.game.vehicle.attachToTowTruck(towTruck, this.raw.handle, rear, hookOffsetX, hookOffsetY, hookOffsetZ);
1136
+ }
1137
+ detachFromTowTruck(towTruck) {
1138
+ mp.game.vehicle.detachFromTowTruck(towTruck, this.raw.handle);
1139
+ }
1140
+ detachFromAnyTowTruck() {
1141
+ mp.game.vehicle.detachFromAnyTowTruck(this.raw.handle);
1142
+ }
1143
+ // --- Cargobob ---
1144
+ attachToCargobob(cargobob, p1, x, y, z) {
1145
+ mp.game.vehicle.attachToCargobob(this.raw.handle, cargobob, p1, x, y, z);
1146
+ }
1147
+ detachFromCargobob(cargobob) {
1148
+ mp.game.vehicle.detachFromCargobob(this.raw.handle, cargobob);
1149
+ }
1150
+ detachFromAnyCargobob() {
1151
+ mp.game.vehicle.detachFromAnyCargobob(this.raw.handle);
1152
+ }
1153
+ // --- Train ---
1154
+ setTrainSpeed(speed) {
1155
+ mp.game.vehicle.setTrainSpeed(this.raw.handle, speed);
1156
+ }
1157
+ setTrainCruiseSpeed(speed) {
1158
+ mp.game.vehicle.setTrainCruiseSpeed(this.raw.handle, speed);
1159
+ }
1160
+ // --- Performance Stats ---
1161
+ getAcceleration() {
1162
+ return mp.game.vehicle.getAcceleration(this.raw.handle);
1163
+ }
1164
+ getMaxBraking() {
1165
+ return mp.game.vehicle.getMaxBraking(this.raw.handle);
1166
+ }
1167
+ getMaxTraction() {
1168
+ return mp.game.vehicle.getMaxTraction(this.raw.handle);
1169
+ }
1170
+ // --- Headlight Damage ---
1171
+ getIsLeftHeadlightDamaged() {
1172
+ return mp.game.vehicle.getIsLeftHeadlightDamaged(this.raw.handle);
1173
+ }
1174
+ getIsRightHeadlightDamaged() {
1175
+ return mp.game.vehicle.getIsRightHeadlightDamaged(this.raw.handle);
1176
+ }
1177
+ // --- Mod Colors ---
1178
+ getModColor1() {
1179
+ const c = mp.game.vehicle.getModColor1(this.raw.handle);
1180
+ return { paintType: _nullishCoalesce(c.paintType, () => ( c[0])), color: _nullishCoalesce(c.color, () => ( c[1])), pearlescentColor: _nullishCoalesce(c.pearlescentColor, () => ( c[2])) };
1181
+ }
1182
+ getModColor2() {
1183
+ const c = mp.game.vehicle.getModColor2(this.raw.handle);
1184
+ return { paintType: _nullishCoalesce(c.paintType, () => ( c[0])), color: _nullishCoalesce(c.color, () => ( c[1])) };
1185
+ }
1186
+ // --- Convertible (extended) ---
1187
+ getConvertibleRoofState() {
1188
+ return mp.game.vehicle.getConvertibleRoofState(this.raw.handle);
1189
+ }
1190
+ // --- Wheel Contact / Driveable ---
1191
+ isOnAllWheels() {
1192
+ return mp.game.vehicle.isOnAllWheels(this.raw.handle);
1193
+ }
1194
+ isDriveable(isOnFireCheck = false) {
1195
+ return mp.game.vehicle.isDriveable(this.raw.handle, isOnFireCheck);
1196
+ }
1197
+ // --- Trailer ---
1198
+ detachFromTrailer() {
1199
+ mp.game.vehicle.detachFromTrailer(this.raw.handle);
1200
+ }
1201
+ isAttachedToTrailer() {
1202
+ return mp.game.vehicle.isAttachedToTrailer(this.raw.handle);
1203
+ }
1204
+ getTrailerVehicle() {
1205
+ return mp.game.vehicle.getTrailerVehicle(this.raw.handle);
1206
+ }
1207
+ // --- Helicopter ---
1208
+ getHeliMainRotorHealth() {
1209
+ return mp.game.vehicle.getHeliMainRotorHealth(this.raw.handle);
1210
+ }
1211
+ getHeliTailRotorHealth() {
1212
+ return mp.game.vehicle.getHeliTailRotorHealth(this.raw.handle);
1213
+ }
1214
+ // --- Landing Gear ---
1215
+ getLandingGearState() {
1216
+ return mp.game.vehicle.getLandingGearState(this.raw.handle);
1217
+ }
1218
+ // --- Deformation ---
1219
+ getDeformationAtPos(offsetX, offsetY, offsetZ) {
1220
+ const v = mp.game.vehicle.getDeformationAtPos(this.raw.handle, offsetX, offsetY, offsetZ);
1221
+ return { x: v.x, y: v.y, z: v.z };
1222
+ }
1223
+ // --- Boat ---
1224
+ setBoatAnchor(toggle) {
1225
+ mp.game.vehicle.setBoatAnchor(this.raw.handle, toggle);
1226
+ }
1227
+ isBoatAnchoredAndFrozen() {
1228
+ return mp.game.vehicle.isBoatAnchoredAndFrozen(this.raw.handle);
1229
+ }
1230
+ // --- Vehicle Info ---
1231
+ getLayoutHash() {
1232
+ return mp.game.vehicle.getLayoutHash(this.raw.handle);
1233
+ }
1234
+ isBig() {
1235
+ return mp.game.vehicle.isBig(this.raw.handle);
1236
+ }
1237
+ isInBurnout() {
1238
+ return mp.game.vehicle.isInBurnout(this.raw.handle);
1239
+ }
1240
+ doesHaveRoof() {
1241
+ return mp.game.vehicle.doesHaveRoof(this.raw.handle);
1242
+ }
656
1243
  };
657
1244
 
658
1245
  // src/ragemp/RageMpPed.ts
@@ -750,6 +1337,280 @@ var RageMpPed = class extends RageMpEntity {
750
1337
  setRagdollOnCollision(toggle) {
751
1338
  mp.game.ped.setRagdollOnCollision(this.raw.handle, toggle);
752
1339
  }
1340
+ // --- State Checks ---
1341
+ isDucking() {
1342
+ return mp.game.ped.isDucking(this.raw.handle);
1343
+ }
1344
+ isProne() {
1345
+ return mp.game.ped.isProne(this.raw.handle);
1346
+ }
1347
+ isOnFoot() {
1348
+ return mp.game.ped.isOnFoot(this.raw.handle);
1349
+ }
1350
+ isRunning() {
1351
+ return mp.game.ped.isRunning(this.raw.handle);
1352
+ }
1353
+ isWalking() {
1354
+ return mp.game.ped.isWalking(this.raw.handle);
1355
+ }
1356
+ isSprinting() {
1357
+ return mp.game.ped.isSprinting(this.raw.handle);
1358
+ }
1359
+ isStopped() {
1360
+ return mp.game.ped.isStopped(this.raw.handle);
1361
+ }
1362
+ // --- Combat Tasks ---
1363
+ taskCombat(targetPed, p2 = 0, p3 = 16) {
1364
+ mp.game.task.combatPed(this.raw.handle, targetPed, p2, p3);
1365
+ }
1366
+ taskCombatHatedTargetsInArea(x, y, z, radius, p5 = 0) {
1367
+ mp.game.task.combatHatedTargetsInArea(this.raw.handle, x, y, z, radius, p5);
1368
+ }
1369
+ taskAimGunAtCoord(x, y, z, time, p5 = false, p6 = false) {
1370
+ mp.game.task.aimGunAtCoord(this.raw.handle, x, y, z, time, p5, p6);
1371
+ }
1372
+ taskAimGunAtEntity(entity, duration, p3 = false) {
1373
+ mp.game.task.aimGunAtEntity(this.raw.handle, entity, duration, p3);
1374
+ }
1375
+ // --- Movement Tasks ---
1376
+ taskFollowNavMeshToCoord(x, y, z, speed, timeout, stoppingRange, persistFollowing, unk) {
1377
+ mp.game.task.followNavMeshToCoord(this.raw.handle, x, y, z, speed, timeout, stoppingRange, persistFollowing, unk);
1378
+ }
1379
+ taskGoToCoordAnyMeans(x, y, z, speed, p5, p6, walkingStyle, p8) {
1380
+ mp.game.task.goToCoordAnyMeans(this.raw.handle, x, y, z, speed, p5, p6, walkingStyle, p8);
1381
+ }
1382
+ // --- Vehicle Tasks ---
1383
+ taskEnterVehicle(vehicle, timeout, seat, speed, p5, p6) {
1384
+ mp.game.task.enterVehicle(this.raw.handle, vehicle, timeout, seat, speed, p5, p6);
1385
+ }
1386
+ taskLeaveVehicle(vehicle, flags) {
1387
+ mp.game.task.leaveVehicle(this.raw.handle, vehicle, flags);
1388
+ }
1389
+ // --- Scenario Tasks ---
1390
+ taskStartScenarioAtPosition(scenarioName, x, y, z, heading, duration, sittingScenario, teleport) {
1391
+ mp.game.task.startScenarioAtPosition(this.raw.handle, scenarioName, x, y, z, heading, duration, sittingScenario, teleport);
1392
+ }
1393
+ taskStartScenarioInPlace(scenarioName, unkDelay, playEnterAnim) {
1394
+ mp.game.task.startScenarioInPlace(this.raw.handle, scenarioName, unkDelay, playEnterAnim);
1395
+ }
1396
+ // --- Look Tasks ---
1397
+ taskLookAtCoord(x, y, z, duration, p5, p6) {
1398
+ mp.game.task.lookAtCoord(this.raw.handle, x, y, z, duration, p5, p6);
1399
+ }
1400
+ taskLookAtEntity(entity, duration, p3, p4) {
1401
+ mp.game.task.lookAtEntity(this.raw.handle, entity, duration, p3, p4);
1402
+ }
1403
+ // --- Relationship Groups ---
1404
+ setRelationshipGroupHash(groupHash) {
1405
+ mp.game.ped.setRelationshipGroupHash(this.raw.handle, groupHash);
1406
+ }
1407
+ getRelationshipGroupHash() {
1408
+ return mp.game.ped.getRelationshipGroupHash(this.raw.handle);
1409
+ }
1410
+ // --- Decorations / Blood ---
1411
+ addDecorationFromHashes(collection, overlay) {
1412
+ mp.game.ped.addDecorationFromHashes(this.raw.handle, collection, overlay);
1413
+ }
1414
+ clearDecorations() {
1415
+ mp.game.ped.clearDecorations(this.raw.handle);
1416
+ }
1417
+ applyBlood(boneIndex, xRot, yRot, zRot, woundType) {
1418
+ mp.game.ped.applyBlood(this.raw.handle, boneIndex, xRot, yRot, zRot, woundType);
1419
+ }
1420
+ clearBloodDamage() {
1421
+ mp.game.ped.clearBloodDamage(this.raw.handle);
1422
+ }
1423
+ applyDamageTo(damageAmount, p2, p3) {
1424
+ mp.game.ped.applyDamageTo(this.raw.handle, damageAmount, p2, p3);
1425
+ }
1426
+ // --- Ragdoll (extended) ---
1427
+ setToRagdoll(time1, time2, ragdollType, p4, p5, p6) {
1428
+ return mp.game.ped.setToRagdoll(this.raw.handle, time1, time2, ragdollType, p4, p5, p6);
1429
+ }
1430
+ isRagdoll() {
1431
+ return mp.game.ped.isRagdoll(this.raw.handle);
1432
+ }
1433
+ // --- Cover / Combat State ---
1434
+ isInCover(exceptUseWeapon = false) {
1435
+ return mp.game.ped.isInCover(this.raw.handle, exceptUseWeapon);
1436
+ }
1437
+ isGoingIntoCover() {
1438
+ return mp.game.ped.isGoingIntoCover(this.raw.handle);
1439
+ }
1440
+ isInMeleeCombat() {
1441
+ return mp.game.ped.isInMeleeCombat(this.raw.handle);
1442
+ }
1443
+ isDoingDriveby() {
1444
+ return mp.game.ped.isDoingDriveby(this.raw.handle);
1445
+ }
1446
+ isFleeing() {
1447
+ return mp.game.ped.isFleeing(this.raw.handle);
1448
+ }
1449
+ // --- Injury / Death ---
1450
+ isFatallyInjured() {
1451
+ return mp.game.ped.isFatallyInjured(this.raw.handle);
1452
+ }
1453
+ isInjured() {
1454
+ return mp.game.ped.isInjured(this.raw.handle);
1455
+ }
1456
+ isDeadOrDying(p1 = true) {
1457
+ return mp.game.ped.isDeadOrDying(this.raw.handle, p1);
1458
+ }
1459
+ getSourceOfDeath() {
1460
+ return mp.game.ped.getSourceOfDeath(this.raw.handle);
1461
+ }
1462
+ getCauseOfDeath() {
1463
+ return mp.game.ped.getCauseOfDeath(this.raw.handle);
1464
+ }
1465
+ getLastDamageBone() {
1466
+ return mp.game.ped.getLastDamageBone(this.raw.handle);
1467
+ }
1468
+ clearLastDamageBone() {
1469
+ mp.game.ped.clearLastDamageBone(this.raw.handle);
1470
+ }
1471
+ // --- Accuracy / Firing ---
1472
+ setAccuracy(accuracy) {
1473
+ mp.game.ped.setAccuracy(this.raw.handle, accuracy);
1474
+ }
1475
+ getAccuracy() {
1476
+ return mp.game.ped.getAccuracy(this.raw.handle);
1477
+ }
1478
+ setFiringPattern(patternHash) {
1479
+ mp.game.ped.setFiringPattern(this.raw.handle, patternHash);
1480
+ }
1481
+ setShootRate(shootRate) {
1482
+ mp.game.ped.setShootRate(this.raw.handle, shootRate);
1483
+ }
1484
+ // --- Targeting ---
1485
+ setCanBeTargetted(toggle) {
1486
+ mp.game.ped.setCanBeTargetted(this.raw.handle, toggle);
1487
+ }
1488
+ setCanBeTargettedByTeam(team, toggle) {
1489
+ mp.game.ped.setCanBeTargettedByTeam(this.raw.handle, team, toggle);
1490
+ }
1491
+ setCanBeTargettedByPlayer(player, toggle) {
1492
+ mp.game.ped.setCanBeTargettedByPlayer(this.raw.handle, player, toggle);
1493
+ }
1494
+ // --- Damage Conditions ---
1495
+ setSuffersCriticalHits(toggle) {
1496
+ mp.game.ped.setSuffersCriticalHits(this.raw.handle, toggle);
1497
+ }
1498
+ setDiesInWater(toggle) {
1499
+ mp.game.ped.setDiesInWater(this.raw.handle, toggle);
1500
+ }
1501
+ setDiesInSinkingVehicle(toggle) {
1502
+ mp.game.ped.setDiesInSinkingVehicle(this.raw.handle, toggle);
1503
+ }
1504
+ // --- Type Checks ---
1505
+ isMale() {
1506
+ return mp.game.ped.isMale(this.raw.handle);
1507
+ }
1508
+ isHuman() {
1509
+ return mp.game.ped.isHuman(this.raw.handle);
1510
+ }
1511
+ // --- Perception ---
1512
+ setSeeingRange(value) {
1513
+ mp.game.ped.setSeeingRange(this.raw.handle, value);
1514
+ }
1515
+ setHearingRange(value) {
1516
+ mp.game.ped.setHearingRange(this.raw.handle, value);
1517
+ }
1518
+ // --- Ducking ---
1519
+ setDucking(toggle) {
1520
+ mp.game.ped.setDucking(this.raw.handle, toggle);
1521
+ }
1522
+ // --- Money ---
1523
+ getMoney() {
1524
+ return mp.game.ped.getMoney(this.raw.handle);
1525
+ }
1526
+ setMoney(amount) {
1527
+ mp.game.ped.setMoney(this.raw.handle, amount);
1528
+ }
1529
+ // --- Stealth ---
1530
+ setStealthMovement(p1, action) {
1531
+ mp.game.ped.setStealthMovement(this.raw.handle, p1, action);
1532
+ }
1533
+ getStealthMovement() {
1534
+ return mp.game.ped.getStealthMovement(this.raw.handle);
1535
+ }
1536
+ // --- Vehicle Intent ---
1537
+ getSeatIsTryingToEnter() {
1538
+ return mp.game.ped.getSeatIsTryingToEnter(this.raw.handle);
1539
+ }
1540
+ getVehicleIsTryingToEnter() {
1541
+ return mp.game.ped.getVehicleIsTryingToEnter(this.raw.handle);
1542
+ }
1543
+ getVehicleIsUsing() {
1544
+ return mp.game.ped.getVehicleIsUsing(this.raw.handle);
1545
+ }
1546
+ // --- Group System ---
1547
+ setAsGroupLeader(groupId) {
1548
+ mp.game.ped.setAsGroupLeader(this.raw.handle, groupId);
1549
+ }
1550
+ setAsGroupMember(groupId) {
1551
+ mp.game.ped.setAsGroupMember(this.raw.handle, groupId);
1552
+ }
1553
+ removeFromGroup() {
1554
+ mp.game.ped.removeFromGroup(this.raw.handle);
1555
+ }
1556
+ isGroupMember(groupId) {
1557
+ return mp.game.ped.isGroupMember(this.raw.handle, groupId);
1558
+ }
1559
+ isInGroup() {
1560
+ return mp.game.ped.isInGroup(this.raw.handle);
1561
+ }
1562
+ // --- Additional Tasks ---
1563
+ taskStandStill(time) {
1564
+ mp.game.task.standStill(this.raw.handle, time);
1565
+ }
1566
+ taskWanderStandard(p1 = 10, p2 = 10) {
1567
+ mp.game.task.wanderStandard(this.raw.handle, p1, p2);
1568
+ }
1569
+ taskWanderInArea(x, y, z, radius, minimalLength, timeBetweenWalks) {
1570
+ mp.game.task.wanderInArea(this.raw.handle, x, y, z, radius, minimalLength, timeBetweenWalks);
1571
+ }
1572
+ taskSmartFleeCoord(x, y, z, distance, time, p6 = false, p7 = false) {
1573
+ mp.game.task.smartFleeCoord(this.raw.handle, x, y, z, distance, time, p6, p7);
1574
+ }
1575
+ taskPatrol(p1, p2, p3, p4) {
1576
+ mp.game.task.patrol(this.raw.handle, p1, p2, p3, p4);
1577
+ }
1578
+ taskHandsUp(duration, facingPed, p3, p4) {
1579
+ mp.game.task.handsUp(this.raw.handle, duration, facingPed, p3, p4);
1580
+ }
1581
+ taskPlayPhoneGestureAnimation(animDict, animation, boneMaskType, p4, p5, p6, p7) {
1582
+ mp.game.task.playPhoneGestureAnimation(this.raw.handle, animDict, animation, boneMaskType, p4, p5, p6, p7);
1583
+ }
1584
+ taskStopPhoneGestureAnimation(p1 = 0) {
1585
+ mp.game.task.stopPhoneGestureAnimation(this.raw.handle, p1);
1586
+ }
1587
+ taskClimbLadder(p1) {
1588
+ mp.game.task.climbLadder(this.raw.handle, p1);
1589
+ }
1590
+ taskSwapWeapon(p1) {
1591
+ mp.game.task.swapWeapon(this.raw.handle, p1);
1592
+ }
1593
+ taskReloadWeapon(unused) {
1594
+ mp.game.task.reloadWeapon(this.raw.handle, unused);
1595
+ }
1596
+ taskUseMobilePhone(p1, p2 = 0) {
1597
+ mp.game.task.useMobilePhone(this.raw.handle, p1, p2);
1598
+ }
1599
+ taskUseMobilePhoneTimed(duration) {
1600
+ mp.game.task.useMobilePhoneTimed(this.raw.handle, duration);
1601
+ }
1602
+ // --- Movement Blend ---
1603
+ setMaxMoveBlendRatio(value) {
1604
+ mp.game.ped.setMaxMoveBlendRatio(this.raw.handle, value);
1605
+ }
1606
+ // --- Resurrect ---
1607
+ resurrect() {
1608
+ mp.game.ped.resurrect(this.raw.handle);
1609
+ }
1610
+ // --- Secondary Task ---
1611
+ clearSecondaryTask() {
1612
+ mp.game.ped.clearSecondaryTask(this.raw.handle);
1613
+ }
753
1614
  };
754
1615
 
755
1616
  // src/ragemp/RageMpObject.ts
@@ -769,6 +1630,27 @@ var RageMpObject = class extends RageMpEntity {
769
1630
  setTargetable(targetable) {
770
1631
  mp.game.object.setTargettable(this.raw.handle, targetable);
771
1632
  }
1633
+ // --- Physics ---
1634
+ setPhysicsParams(weight, p1, p2, p3, p4, gravity, p6, p7, p8, p9, buoyancy) {
1635
+ mp.game.object.setPhysicsParams(
1636
+ this.raw.handle,
1637
+ weight,
1638
+ p1,
1639
+ p2,
1640
+ p3,
1641
+ p4,
1642
+ gravity,
1643
+ p6,
1644
+ p7,
1645
+ p8,
1646
+ p9,
1647
+ buoyancy
1648
+ );
1649
+ }
1650
+ // --- Lifecycle ---
1651
+ markForDeletion() {
1652
+ mp.game.object.markForDeletion(this.raw.handle);
1653
+ }
772
1654
  };
773
1655
 
774
1656
  // src/ragemp/RageMpBlip.ts
@@ -1445,19 +2327,831 @@ var RageMpNativesBridge = class {
1445
2327
  }
1446
2328
  };
1447
2329
 
1448
- // src/ragemp/RageMpEngine.ts
1449
- var RageMpEngine = (_class4 = class {
1450
-
1451
-
1452
-
1453
-
1454
-
1455
-
1456
-
1457
-
1458
-
1459
-
1460
-
2330
+ // src/ragemp/RageMpWeapon.ts
2331
+ var RageMpWeapon = class {
2332
+ // --- Give / Remove ---
2333
+ giveComponentToPed(ped, weaponHash, componentHash) {
2334
+ mp.game.weapon.giveComponentToPed(ped, weaponHash, componentHash);
2335
+ }
2336
+ removeComponentFromPed(ped, weaponHash, componentHash) {
2337
+ mp.game.weapon.removeComponentFromPed(ped, weaponHash, componentHash);
2338
+ }
2339
+ hasPedGotComponent(ped, weaponHash, componentHash) {
2340
+ return mp.game.weapon.hasPedGotComponent(ped, weaponHash, componentHash);
2341
+ }
2342
+ isPedComponentActive(ped, weaponHash, componentHash) {
2343
+ return mp.game.weapon.isPedComponentActive(ped, weaponHash, componentHash);
2344
+ }
2345
+ removeFromPed(ped, weaponHash) {
2346
+ mp.game.weapon.removeFromPed(ped, weaponHash);
2347
+ }
2348
+ // --- Ammo ---
2349
+ setPedInfiniteAmmo(ped, toggle, weaponHash) {
2350
+ mp.game.weapon.setPedInfiniteAmmo(ped, toggle, weaponHash);
2351
+ }
2352
+ setPedInfiniteAmmoClip(ped, toggle) {
2353
+ mp.game.weapon.setPedInfiniteAmmoClip(ped, toggle);
2354
+ }
2355
+ getMaxAmmo(ped, weaponHash) {
2356
+ return mp.game.weapon.getMaxAmmo(ped, weaponHash);
2357
+ }
2358
+ getMaxAmmoInClip(ped, weaponHash, p2 = false) {
2359
+ return mp.game.weapon.getMaxAmmoInClip(ped, weaponHash, p2);
2360
+ }
2361
+ getClipSize(weaponHash) {
2362
+ return mp.game.weapon.getClipSize(weaponHash);
2363
+ }
2364
+ getAmmoInPed(ped, weaponHash) {
2365
+ return mp.game.weapon.getAmmoInPed(ped, weaponHash);
2366
+ }
2367
+ addAmmoToPed(ped, weaponHash, ammo) {
2368
+ mp.game.weapon.addAmmoToPed(ped, weaponHash, ammo);
2369
+ }
2370
+ setPedAmmo(ped, weaponHash, ammo, p3 = false) {
2371
+ mp.game.weapon.setPedAmmo(ped, weaponHash, ammo, p3);
2372
+ }
2373
+ // --- Current Weapon ---
2374
+ getCurrentPed(ped, p2 = true) {
2375
+ return mp.game.weapon.getCurrentPed(ped, p2);
2376
+ }
2377
+ setCurrentPed(ped, weaponHash, bForceInHand = true) {
2378
+ mp.game.weapon.setCurrentPed(ped, weaponHash, bForceInHand);
2379
+ }
2380
+ // --- Tint ---
2381
+ setPedTintIndex(ped, weaponHash, tintIndex) {
2382
+ mp.game.weapon.setPedTintIndex(ped, weaponHash, tintIndex);
2383
+ }
2384
+ getPedTintIndex(ped, weaponHash) {
2385
+ return mp.game.weapon.getPedTintIndex(ped, weaponHash);
2386
+ }
2387
+ // --- Damage ---
2388
+ hasPedBeenDamagedBy(ped, weaponHash, weaponType) {
2389
+ return mp.game.weapon.hasPedBeenDamagedBy(ped, weaponHash, weaponType);
2390
+ }
2391
+ clearPedLastDamage(ped) {
2392
+ mp.game.weapon.clearPedLastDamage(ped);
2393
+ }
2394
+ getDamage(weaponHash, componentHash) {
2395
+ return mp.game.weapon.getDamage(weaponHash, componentHash);
2396
+ }
2397
+ getTimeBetweenShots(weaponHash) {
2398
+ return mp.game.weapon.getTimeBetweenShots(weaponHash);
2399
+ }
2400
+ // --- Drops ---
2401
+ setPedDropsWeaponsWhenDead(ped, toggle) {
2402
+ mp.game.weapon.setPedDropsWeaponsWhenDead(ped, toggle);
2403
+ }
2404
+ setPedDrops(ped) {
2405
+ mp.game.weapon.setPedDrops(ped);
2406
+ }
2407
+ // --- Actions ---
2408
+ makePedReload(ped) {
2409
+ return mp.game.weapon.makePedReload(ped);
2410
+ }
2411
+ isPedArmed(ped, typeFlags) {
2412
+ return mp.game.weapon.isPedArmed(ped, typeFlags);
2413
+ }
2414
+ // --- Weapon Info ---
2415
+ hasPedGot(ped, weaponHash, p2 = false) {
2416
+ return mp.game.weapon.hasPedGot(ped, weaponHash, p2);
2417
+ }
2418
+ getWeapontypeGroup(weaponHash) {
2419
+ return mp.game.weapon.getWeapontypeGroup(weaponHash);
2420
+ }
2421
+ setCurrentDamageEventAmount(amount) {
2422
+ mp.game.weapon.setCurrentDamageEventAmount(amount);
2423
+ }
2424
+ };
2425
+
2426
+ // src/ragemp/RageMpStreaming.ts
2427
+ var RageMpStreaming = class {
2428
+ // --- Model Loading ---
2429
+ requestModel(model) {
2430
+ mp.game.streaming.requestModel(model);
2431
+ }
2432
+ hasModelLoaded(model) {
2433
+ return mp.game.streaming.hasModelLoaded(model);
2434
+ }
2435
+ setModelAsNoLongerNeeded(model) {
2436
+ mp.game.streaming.setModelAsNoLongerNeeded(model);
2437
+ }
2438
+ isModelValid(model) {
2439
+ return mp.game.streaming.isModelValid(model);
2440
+ }
2441
+ isModelAPed(model) {
2442
+ return mp.game.streaming.isModelAPed(model);
2443
+ }
2444
+ isModelAVehicle(model) {
2445
+ return mp.game.streaming.isModelAVehicle(model);
2446
+ }
2447
+ // --- Animation Dicts ---
2448
+ requestAnimDict(animDict) {
2449
+ mp.game.streaming.requestAnimDict(animDict);
2450
+ }
2451
+ hasAnimDictLoaded(animDict) {
2452
+ return mp.game.streaming.hasAnimDictLoaded(animDict);
2453
+ }
2454
+ removeAnimDict(animDict) {
2455
+ mp.game.streaming.removeAnimDict(animDict);
2456
+ }
2457
+ // --- Animation Sets ---
2458
+ requestAnimSet(animSet) {
2459
+ mp.game.streaming.requestAnimSet(animSet);
2460
+ }
2461
+ hasAnimSetLoaded(animSet) {
2462
+ return mp.game.streaming.hasAnimSetLoaded(animSet);
2463
+ }
2464
+ removeAnimSet(animSet) {
2465
+ mp.game.streaming.removeAnimSet(animSet);
2466
+ }
2467
+ // --- Clip Sets ---
2468
+ requestClipSet(clipSet) {
2469
+ mp.game.streaming.requestClipSet(clipSet);
2470
+ }
2471
+ hasClipSetLoaded(clipSet) {
2472
+ return mp.game.streaming.hasClipSetLoaded(clipSet);
2473
+ }
2474
+ removeClipSet(clipSet) {
2475
+ mp.game.streaming.removeClipSet(clipSet);
2476
+ }
2477
+ // --- IPL ---
2478
+ requestIpl(iplName) {
2479
+ mp.game.streaming.requestIpl(iplName);
2480
+ }
2481
+ removeIpl(iplName) {
2482
+ mp.game.streaming.removeIpl(iplName);
2483
+ }
2484
+ isIplActive(iplName) {
2485
+ return mp.game.streaming.isIplActive(iplName);
2486
+ }
2487
+ // --- Particle Effects ---
2488
+ requestNamedPtfxAsset(fxName) {
2489
+ mp.game.streaming.requestNamedPtfxAsset(fxName);
2490
+ }
2491
+ hasNamedPtfxAssetLoaded(fxName) {
2492
+ return mp.game.streaming.hasNamedPtfxAssetLoaded(fxName);
2493
+ }
2494
+ removeNamedPtfxAsset(fxName) {
2495
+ mp.game.streaming.removeNamedPtfxAsset(fxName);
2496
+ }
2497
+ // --- Collision ---
2498
+ requestCollisionAtCoord(x, y, z) {
2499
+ mp.game.streaming.requestCollisionAtCoord(x, y, z);
2500
+ }
2501
+ hasCollisionForModelLoaded(model) {
2502
+ return mp.game.streaming.hasCollisionForModelLoaded(model);
2503
+ }
2504
+ };
2505
+
2506
+ // src/ragemp/RageMpWorld.ts
2507
+ var RageMpWorld = class {
2508
+ // --- Clock ---
2509
+ setClockTime(hour, minute, second) {
2510
+ mp.game.clock.setTime(hour, minute, second);
2511
+ }
2512
+ getClockHours() {
2513
+ return mp.game.clock.getHours();
2514
+ }
2515
+ getClockMinutes() {
2516
+ return mp.game.clock.getMinutes();
2517
+ }
2518
+ getClockSeconds() {
2519
+ return mp.game.clock.getSeconds();
2520
+ }
2521
+ setClockDate(day, month, year) {
2522
+ mp.game.clock.setDate(day, month, year);
2523
+ }
2524
+ getClockDayOfWeek() {
2525
+ return mp.game.clock.getDayOfWeek();
2526
+ }
2527
+ getClockDayOfMonth() {
2528
+ return mp.game.clock.getDayOfMonth();
2529
+ }
2530
+ getClockMonth() {
2531
+ return mp.game.clock.getMonth();
2532
+ }
2533
+ getClockYear() {
2534
+ return mp.game.clock.getYear();
2535
+ }
2536
+ pauseClock(toggle) {
2537
+ mp.game.clock.pause(toggle);
2538
+ }
2539
+ advanceClockTimeTo(hour, minute, second) {
2540
+ mp.game.clock.advanceTimeTo(hour, minute, second);
2541
+ }
2542
+ addToClockTime(hours, minutes, seconds) {
2543
+ mp.game.clock.addToTime(hours, minutes, seconds);
2544
+ }
2545
+ getMillisecondsPerGameMinute() {
2546
+ return mp.game.clock.getMillisecondsPerGameMinute();
2547
+ }
2548
+ // --- Fire ---
2549
+ addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage) {
2550
+ mp.game.fire.addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage);
2551
+ }
2552
+ addOwnedExplosion(ped, x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake) {
2553
+ mp.game.fire.addOwnedExplosion(ped, x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);
2554
+ }
2555
+ startEntityFire(entity) {
2556
+ return mp.game.fire.startEntity(entity);
2557
+ }
2558
+ stopEntityFire(entity) {
2559
+ mp.game.fire.stopEntity(entity);
2560
+ }
2561
+ isEntityOnFire(entity) {
2562
+ return mp.game.fire.isEntityOn(entity);
2563
+ }
2564
+ getNumberOfFiresInRange(x, y, z, radius) {
2565
+ return mp.game.fire.getNumberOfFiresInRange(x, y, z, radius);
2566
+ }
2567
+ stopFireInRange(x, y, z, radius) {
2568
+ mp.game.fire.stopInRange(x, y, z, radius);
2569
+ }
2570
+ isExplosionInArea(explosionType, x1, y1, z1, x2, y2, z2) {
2571
+ return mp.game.fire.isExplosionInArea(explosionType, x1, y1, z1, x2, y2, z2);
2572
+ }
2573
+ isExplosionInSphere(explosionType, x, y, z, radius) {
2574
+ return mp.game.fire.isExplosionInSphere(explosionType, x, y, z, radius);
2575
+ }
2576
+ // --- Water ---
2577
+ getWaterHeight(x, y, z) {
2578
+ return mp.game.water.getHeight(x, y, z);
2579
+ }
2580
+ getWaterHeightNoWaves(x, y, z) {
2581
+ return mp.game.water.getHeightNoWaves(x, y, z);
2582
+ }
2583
+ testVerticalProbeAgainstAllWater(x, y, z, p3) {
2584
+ return mp.game.water.testVerticalProbeAgainstAll(x, y, z, p3);
2585
+ }
2586
+ // --- Interior ---
2587
+ getInteriorAtCoords(x, y, z) {
2588
+ return mp.game.interior.getAtCoords(x, y, z);
2589
+ }
2590
+ getInteriorAtCoordsWithType(x, y, z, interiorType) {
2591
+ return mp.game.interior.getAtCoordsWithType(x, y, z, interiorType);
2592
+ }
2593
+ getInteriorFromEntity(entity) {
2594
+ return mp.game.interior.getFromEntity(entity);
2595
+ }
2596
+ activateInteriorEntitySet(interior, entitySetName) {
2597
+ mp.game.interior.activateEntitySet(interior, entitySetName);
2598
+ }
2599
+ deactivateInteriorEntitySet(interior, entitySetName) {
2600
+ mp.game.interior.deactivateEntitySet(interior, entitySetName);
2601
+ }
2602
+ isInteriorEntitySetActive(interior, entitySetName) {
2603
+ return mp.game.interior.isEntitySetActive(interior, entitySetName);
2604
+ }
2605
+ pinInteriorInMemory(interior) {
2606
+ mp.game.interior.pinInMemory(interior);
2607
+ }
2608
+ unpinInterior(interior) {
2609
+ mp.game.interior.unpin(interior);
2610
+ }
2611
+ isInteriorReady(interior) {
2612
+ return mp.game.interior.isReady(interior);
2613
+ }
2614
+ refreshInterior(interior) {
2615
+ mp.game.interior.refresh(interior);
2616
+ }
2617
+ // --- Zone ---
2618
+ getZoneAtCoords(x, y, z) {
2619
+ return mp.game.zone.getAtCoords(x, y, z);
2620
+ }
2621
+ getZoneFromNameId(zoneName) {
2622
+ return mp.game.zone.getFromNameId(zoneName);
2623
+ }
2624
+ getNameOfZone(x, y, z) {
2625
+ return mp.game.zone.getNameOf(x, y, z);
2626
+ }
2627
+ // --- Weather ---
2628
+ setWeatherTypeNow(weatherType) {
2629
+ mp.game.misc.setWeatherTypeNow(weatherType);
2630
+ }
2631
+ setWeatherTypePersist(weatherType) {
2632
+ mp.game.misc.setWeatherTypePersist(weatherType);
2633
+ }
2634
+ setWeatherTypeOverTime(weatherType, time) {
2635
+ mp.game.misc.setWeatherTypeOverTime(weatherType, time);
2636
+ }
2637
+ clearWeatherTypePersist() {
2638
+ mp.game.misc.clearWeatherTypePersist();
2639
+ }
2640
+ setOverrideWeather(weatherType) {
2641
+ mp.game.misc.setOverrideWeather(weatherType);
2642
+ }
2643
+ clearOverrideWeather() {
2644
+ mp.game.misc.clearOverrideWeather();
2645
+ }
2646
+ setWindSpeed(speed) {
2647
+ mp.game.misc.setWindSpeed(speed);
2648
+ }
2649
+ getWindSpeed() {
2650
+ return mp.game.misc.getWindSpeed();
2651
+ }
2652
+ getWindDirection() {
2653
+ const v = mp.game.misc.getWindDirection();
2654
+ return { x: v.x, y: v.y, z: v.z };
2655
+ }
2656
+ getRainLevel() {
2657
+ return mp.game.misc.getRainLevel();
2658
+ }
2659
+ getSnowLevel() {
2660
+ return mp.game.misc.getSnowLevel();
2661
+ }
2662
+ // --- Water (extended) ---
2663
+ setDeepOceanScaler(intensity) {
2664
+ mp.game.water.setDeepOceanScaler(intensity);
2665
+ }
2666
+ // --- Interior (extended) ---
2667
+ enableInteriorProp(interior, propName) {
2668
+ mp.game.interior.enableInteriorProp(interior, propName);
2669
+ }
2670
+ // --- Scenario ---
2671
+ setScenarioTypeEnabled(scenarioType, toggle) {
2672
+ mp.game.task.setScenarioTypeEnabled(scenarioType, toggle);
2673
+ }
2674
+ // --- GXT ---
2675
+ setGxtEntry(labelNameOrHash, newLabelValue) {
2676
+ mp.game.gxt.set(labelNameOrHash, newLabelValue);
2677
+ }
2678
+ // --- Stats ---
2679
+ statSetInt(statName, value, save = true) {
2680
+ return mp.game.stats.statSetInt(statName, value, save);
2681
+ }
2682
+ // --- Object Natives ---
2683
+ createObject(modelHash, x, y, z, isNetwork, bScriptHostObj, dynamic) {
2684
+ return mp.game.object.createObject(modelHash, x, y, z, isNetwork, bScriptHostObj, dynamic);
2685
+ }
2686
+ deleteObject(object) {
2687
+ mp.game.object.deleteObject(object);
2688
+ }
2689
+ getObjectOffsetFromCoords(xPos, yPos, zPos, heading, xOffset, yOffset, zOffset) {
2690
+ const v = mp.game.object.getObjectOffsetFromCoords(xPos, yPos, zPos, heading, xOffset, yOffset, zOffset);
2691
+ return { x: v.x, y: v.y, z: v.z };
2692
+ }
2693
+ // --- Shapetest ---
2694
+ startShapeTestLosProbe(x1, y1, z1, x2, y2, z2, flags, entity, p8) {
2695
+ return mp.game.shapetest.startExpensiveSynchronousShapeTestLosProbe(x1, y1, z1, x2, y2, z2, flags, entity, p8);
2696
+ }
2697
+ getShapeTestResult(shapeTestHandle) {
2698
+ const r = mp.game.shapetest.getShapeTestResult(shapeTestHandle);
2699
+ return {
2700
+ hit: _nullishCoalesce(r.hit, () => ( false)),
2701
+ endCoords: { x: _nullishCoalesce(_optionalChain([r, 'access', _4 => _4.endCoords, 'optionalAccess', _5 => _5.x]), () => ( 0)), y: _nullishCoalesce(_optionalChain([r, 'access', _6 => _6.endCoords, 'optionalAccess', _7 => _7.y]), () => ( 0)), z: _nullishCoalesce(_optionalChain([r, 'access', _8 => _8.endCoords, 'optionalAccess', _9 => _9.z]), () => ( 0)) },
2702
+ surfaceNormal: { x: _nullishCoalesce(_optionalChain([r, 'access', _10 => _10.surfaceNormal, 'optionalAccess', _11 => _11.x]), () => ( 0)), y: _nullishCoalesce(_optionalChain([r, 'access', _12 => _12.surfaceNormal, 'optionalAccess', _13 => _13.y]), () => ( 0)), z: _nullishCoalesce(_optionalChain([r, 'access', _14 => _14.surfaceNormal, 'optionalAccess', _15 => _15.z]), () => ( 0)) },
2703
+ entityHit: _nullishCoalesce(r.entityHit, () => ( 0)),
2704
+ result: _nullishCoalesce(r.result, () => ( 0))
2705
+ };
2706
+ }
2707
+ // --- Graphics ---
2708
+ getScreenCoordFromWorldCoord(worldX, worldY, worldZ) {
2709
+ const result = mp.game.graphics.getScreenCoordFromWorldCoord(worldX, worldY, worldZ);
2710
+ if (typeof result === "boolean") {
2711
+ return { success: false, screenX: 0, screenY: 0 };
2712
+ }
2713
+ return { success: true, screenX: _nullishCoalesce(result.x, () => ( result[0])), screenY: _nullishCoalesce(result.y, () => ( result[1])) };
2714
+ }
2715
+ getActiveScreenResolution() {
2716
+ const r = mp.game.graphics.getActiveScreenResolution();
2717
+ return { x: _nullishCoalesce(r.x, () => ( r[0])), y: _nullishCoalesce(r.y, () => ( r[1])) };
2718
+ }
2719
+ getScreenResolution() {
2720
+ const r = mp.game.graphics.getScreenResolution();
2721
+ return { x: _nullishCoalesce(r.x, () => ( r[0])), y: _nullishCoalesce(r.y, () => ( r[1])) };
2722
+ }
2723
+ };
2724
+
2725
+ // src/ragemp/RageMpGameplay.ts
2726
+ var RageMpGameplay = class {
2727
+ // --- Hashing ---
2728
+ getHashKey(string) {
2729
+ return mp.game.misc.getHashKey(string);
2730
+ }
2731
+ // --- Distance ---
2732
+ getDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, useZ) {
2733
+ return mp.game.misc.getDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, useZ);
2734
+ }
2735
+ // --- Ground ---
2736
+ getGroundZFor3dCoord(x, y, z, ignoreWater = false, p5 = false) {
2737
+ return mp.game.misc.getGroundZFor3dCoord(x, y, z, ignoreWater, p5);
2738
+ }
2739
+ // --- Timer ---
2740
+ getGameTimer() {
2741
+ return mp.game.misc.getGameTimer();
2742
+ }
2743
+ getFrameTime() {
2744
+ return mp.game.misc.getFrameTime();
2745
+ }
2746
+ getFrameCount() {
2747
+ return mp.game.misc.getFrameCount();
2748
+ }
2749
+ // --- Bullets ---
2750
+ shootSingleBulletBetweenCoords(x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed) {
2751
+ mp.game.misc.shootSingleBulletBetweenCoords(x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed);
2752
+ }
2753
+ // --- Clear Area ---
2754
+ clearAreaOfEverything(x, y, z, radius, p4 = false, p5 = false, p6 = false, p7 = false) {
2755
+ mp.game.misc.clearAreaOfEverything(x, y, z, radius, p4, p5, p6, p7);
2756
+ }
2757
+ clearAreaOfVehicles(x, y, z, radius, p4 = false, p5 = false, p6 = false, p7 = false, p8 = false, p9 = false) {
2758
+ mp.game.misc.clearAreaOfVehicles(x, y, z, radius, p4, p5, p6, p7, p8, p9);
2759
+ }
2760
+ clearAreaOfPeds(x, y, z, radius, flags = 0) {
2761
+ mp.game.misc.clearAreaOfPeds(x, y, z, radius, flags);
2762
+ }
2763
+ clearAreaOfObjects(x, y, z, radius, flags = 0) {
2764
+ mp.game.misc.clearAreaOfObjects(x, y, z, radius, flags);
2765
+ }
2766
+ // --- Heading ---
2767
+ getHeadingFromVector2d(dx, dy) {
2768
+ return mp.game.misc.getHeadingFromVector2d(dx, dy);
2769
+ }
2770
+ // --- Death ---
2771
+ setFadeOutAfterDeath(toggle) {
2772
+ mp.game.misc.setFadeOutAfterDeath(toggle);
2773
+ }
2774
+ // --- Random Events ---
2775
+ setRandomEventFlag(toggle) {
2776
+ mp.game.misc.setRandomEventFlag(toggle);
2777
+ }
2778
+ };
2779
+
2780
+ // src/ragemp/RageMpHUD.ts
2781
+ var RageMpHUD = class {
2782
+ // --- Display Control ---
2783
+ displayHud(toggle) {
2784
+ mp.game.hud.displayHud(toggle);
2785
+ }
2786
+ displayRadar(toggle) {
2787
+ mp.game.hud.displayRadar(toggle);
2788
+ }
2789
+ isRadarHidden() {
2790
+ return mp.game.hud.isRadarHidden();
2791
+ }
2792
+ isMinimapRendering() {
2793
+ return mp.game.hud.isMinimapRendering();
2794
+ }
2795
+ setRadarBigmapEnabled(toggleBigMap, showFullMap) {
2796
+ mp.game.hud.setRadarBigmapEnabled(toggleBigMap, showFullMap);
2797
+ }
2798
+ // --- HUD Components ---
2799
+ isHudComponentActive(id) {
2800
+ return mp.game.hud.isHudComponentActive(id);
2801
+ }
2802
+ hideHudComponentThisFrame(id) {
2803
+ mp.game.hud.hideHudComponentThisFrame(id);
2804
+ }
2805
+ showHudComponentThisFrame(id) {
2806
+ mp.game.hud.showHudComponentThisFrame(id);
2807
+ }
2808
+ // --- Waypoint ---
2809
+ isWaypointActive() {
2810
+ return mp.game.hud.isWaypointActive();
2811
+ }
2812
+ deleteWaypoint() {
2813
+ mp.game.hud.deleteWaypoint();
2814
+ }
2815
+ setNewWaypoint(x, y) {
2816
+ mp.game.hud.setNewWaypoint(x, y);
2817
+ }
2818
+ // --- Text Rendering ---
2819
+ beginTextCommandDisplayText(text) {
2820
+ mp.game.hud.beginTextCommandDisplayText(text);
2821
+ }
2822
+ endTextCommandDisplayText(x, y, p2 = 0) {
2823
+ mp.game.hud.endTextCommandDisplayText(x, y, p2);
2824
+ }
2825
+ addTextComponentSubstringPlayerName(text) {
2826
+ mp.game.hud.addTextComponentSubstringPlayerName(text);
2827
+ }
2828
+ setTextScale(scale, size) {
2829
+ mp.game.hud.setTextScale(scale, size);
2830
+ }
2831
+ setTextFont(fontType) {
2832
+ mp.game.hud.setTextFont(fontType);
2833
+ }
2834
+ setTextColour(red, green, blue, alpha) {
2835
+ mp.game.hud.setTextColour(red, green, blue, alpha);
2836
+ }
2837
+ setTextCentre(align) {
2838
+ mp.game.hud.setTextCentre(align);
2839
+ }
2840
+ setTextDropShadow() {
2841
+ mp.game.hud.setTextDropShadow();
2842
+ }
2843
+ setTextOutline() {
2844
+ mp.game.hud.setTextOutline();
2845
+ }
2846
+ setTextWrap(start, end) {
2847
+ mp.game.hud.setTextWrap(start, end);
2848
+ }
2849
+ // --- Notifications ---
2850
+ beginTextCommandThefeedPost(text) {
2851
+ mp.game.hud.beginTextCommandThefeedPost(text);
2852
+ }
2853
+ endTextCommandThefeedPostMessagetext(txdName, textureName, flash, iconType, sender, subject) {
2854
+ return mp.game.hud.endTextCommandThefeedPostMessagetext(txdName, textureName, flash, iconType, sender, subject);
2855
+ }
2856
+ endTextCommandThefeedPostMessagetextTu(txdName, textureName, flash, iconType, sender, subject, duration) {
2857
+ return mp.game.hud.endTextCommandThefeedPostMessagetextTu(txdName, textureName, flash, iconType, sender, subject, duration);
2858
+ }
2859
+ // --- Labels ---
2860
+ getLabelText(labelName) {
2861
+ return mp.game.hud.getLabelText(labelName);
2862
+ }
2863
+ // --- Text (extended) ---
2864
+ setTextJustification(justifyType) {
2865
+ mp.game.hud.setTextJustification(justifyType);
2866
+ }
2867
+ setTextRightJustify(toggle) {
2868
+ mp.game.hud.setTextRightJustify(toggle);
2869
+ }
2870
+ // --- HUD Colours ---
2871
+ replaceColour(hudColorIndex, hudColorIndex2) {
2872
+ mp.game.hud.replaceColour(hudColorIndex, hudColorIndex2);
2873
+ }
2874
+ };
2875
+
2876
+ // src/ragemp/RageMpAudio.ts
2877
+ var RageMpAudio = class {
2878
+ // --- Sound IDs ---
2879
+ getSoundId() {
2880
+ return mp.game.audio.getSoundId();
2881
+ }
2882
+ releaseSoundId(soundId) {
2883
+ mp.game.audio.releaseSoundId(soundId);
2884
+ }
2885
+ // --- Sound Playback ---
2886
+ playSoundFrontend(soundId, audioName, audioRef, p3 = false) {
2887
+ mp.game.audio.playSoundFrontend(soundId, audioName, audioRef, p3);
2888
+ }
2889
+ playSound(soundId, audioName, audioRef, p3 = false, p4 = 0, p5 = false) {
2890
+ mp.game.audio.playSound(soundId, audioName, audioRef, p3, p4, p5);
2891
+ }
2892
+ stopSound(soundId) {
2893
+ mp.game.audio.stopSound(soundId);
2894
+ }
2895
+ hasSoundFinished(soundId) {
2896
+ return mp.game.audio.hasSoundFinished(soundId);
2897
+ }
2898
+ // --- Speech ---
2899
+ playAmbientSpeechWithVoice(ped, speechName, voiceName, speechParam, p4 = false) {
2900
+ mp.game.audio.playAmbientSpeechWithVoice(ped, speechName, voiceName, speechParam, p4);
2901
+ }
2902
+ // --- Audio Banks ---
2903
+ requestScriptAudioBank(p0, p1 = false, p2 = -1) {
2904
+ return mp.game.audio.requestScriptAudioBank(p0, p1, p2);
2905
+ }
2906
+ releaseNamedScriptAudioBank(audioBank) {
2907
+ mp.game.audio.releaseNamedScriptAudioBank(audioBank);
2908
+ }
2909
+ // --- Audio Scenes ---
2910
+ startAudioScene(scene) {
2911
+ return mp.game.audio.startAudioScene(scene);
2912
+ }
2913
+ stopAudioScene(scene) {
2914
+ mp.game.audio.stopAudioScene(scene);
2915
+ }
2916
+ isAudioSceneActive(scene) {
2917
+ return mp.game.audio.isAudioSceneActive(scene);
2918
+ }
2919
+ // --- Audio Flags ---
2920
+ setAudioFlag(flagName, toggle) {
2921
+ mp.game.audio.setAudioFlag(flagName, toggle);
2922
+ }
2923
+ // --- Ringtones ---
2924
+ playPedRingtone(ringtoneName, ped, p2 = false) {
2925
+ mp.game.audio.playPedRingtone(ringtoneName, ped, p2);
2926
+ }
2927
+ stopPedRingtone(ped) {
2928
+ mp.game.audio.stopPedRingtone(ped);
2929
+ }
2930
+ // --- Ambient Zones ---
2931
+ setAmbientZoneListStatePersistent(ambientZone, p1, p2) {
2932
+ mp.game.audio.setAmbientZoneListStatePersistent(ambientZone, p1, p2);
2933
+ }
2934
+ setAmbientZoneState(zoneName, p1, p2) {
2935
+ mp.game.audio.setAmbientZoneState(zoneName, p1, p2);
2936
+ }
2937
+ setStaticEmitterEnabled(emitterName, toggle) {
2938
+ mp.game.audio.setStaticEmitterEnabled(emitterName, toggle);
2939
+ }
2940
+ };
2941
+
2942
+ // src/ragemp/RageMpGraphics.ts
2943
+ var RageMpGraphics = class {
2944
+ // --- Particle Effects ---
2945
+ useParticleFxAsset(name) {
2946
+ mp.game.graphics.useParticleFxAsset(name);
2947
+ }
2948
+ startParticleFxNonLoopedAtCoord(effectName, xPos, yPos, zPos, xRot, yRot, zRot, scale, xAxis = false, yAxis = false, zAxis = false) {
2949
+ return mp.game.graphics.startParticleFxNonLoopedAtCoord(effectName, xPos, yPos, zPos, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis);
2950
+ }
2951
+ startParticleFxNonLoopedOnEntity(effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX = false, axisY = false, axisZ = false) {
2952
+ return mp.game.graphics.startParticleFxNonLoopedOnEntity(effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX, axisY, axisZ);
2953
+ }
2954
+ startParticleFxLoopedAtCoord(effectName, x, y, z, xRot, yRot, zRot, scale, xAxis = false, yAxis = false, zAxis = false, p11 = false) {
2955
+ return mp.game.graphics.startParticleFxLoopedAtCoord(effectName, x, y, z, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis, p11);
2956
+ }
2957
+ startParticleFxLoopedOnEntity(effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, xAxis = false, yAxis = false, zAxis = false) {
2958
+ return mp.game.graphics.startParticleFxLoopedOnEntity(effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis);
2959
+ }
2960
+ stopParticleFxLooped(ptfxHandle, p1 = false) {
2961
+ mp.game.graphics.stopParticleFxLooped(ptfxHandle, p1);
2962
+ }
2963
+ removeParticleFx(ptfxHandle, p1 = false) {
2964
+ mp.game.graphics.removeParticleFx(ptfxHandle, p1);
2965
+ }
2966
+ doesParticleFxLoopedExist(ptfxHandle) {
2967
+ return mp.game.graphics.doesParticleFxLoopedExist(ptfxHandle);
2968
+ }
2969
+ setParticleFxLoopedColour(ptfxHandle, r, g, b, p4 = false) {
2970
+ mp.game.graphics.setParticleFxLoopedColour(ptfxHandle, r, g, b, p4);
2971
+ }
2972
+ setParticleFxLoopedAlpha(ptfxHandle, alpha) {
2973
+ mp.game.graphics.setParticleFxLoopedAlpha(ptfxHandle, alpha);
2974
+ }
2975
+ setParticleFxLoopedScale(ptfxHandle, scale) {
2976
+ mp.game.graphics.setParticleFxLoopedScale(ptfxHandle, scale);
2977
+ }
2978
+ // --- Drawing ---
2979
+ drawLine(x1, y1, z1, x2, y2, z2, red, green, blue, alpha) {
2980
+ mp.game.graphics.drawLine(x1, y1, z1, x2, y2, z2, red, green, blue, alpha);
2981
+ }
2982
+ drawPoly(x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha) {
2983
+ mp.game.graphics.drawPoly(x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha);
2984
+ }
2985
+ drawRect(x, y, width, height, r, g, b, a, p8 = false) {
2986
+ mp.game.graphics.drawRect(x, y, width, height, r, g, b, a, p8);
2987
+ }
2988
+ drawSprite(textureDict, textureName, screenX, screenY, width, height, heading, red, green, blue, alpha, p11 = false) {
2989
+ mp.game.graphics.drawSprite(textureDict, textureName, screenX, screenY, width, height, heading, red, green, blue, alpha, p11);
2990
+ }
2991
+ // --- Screen Effects ---
2992
+ animpostfxPlay(effectName, duration, looped) {
2993
+ mp.game.graphics.animpostfxPlay(effectName, duration, looped);
2994
+ }
2995
+ animpostfxStop(effectName) {
2996
+ mp.game.graphics.animpostfxStop(effectName);
2997
+ }
2998
+ animpostfxIsRunning(effectName) {
2999
+ return mp.game.graphics.animpostfxIsRunning(effectName);
3000
+ }
3001
+ animpostfxStopAll() {
3002
+ mp.game.graphics.animpostfxStopAll();
3003
+ }
3004
+ // --- Timecycle ---
3005
+ setTimecycleModifier(modifierName) {
3006
+ mp.game.graphics.setTimecycleModifier(modifierName);
3007
+ }
3008
+ setTimecycleModifierStrength(strength) {
3009
+ mp.game.graphics.setTimecycleModifierStrength(strength);
3010
+ }
3011
+ clearTimecycleModifier() {
3012
+ mp.game.graphics.clearTimecycleModifier();
3013
+ }
3014
+ // --- Markers ---
3015
+ drawMarker(type, posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, red, green, blue, alpha, bobUpAndDown, faceCamera, p19, rotate, textureDict, textureName, drawOnEnts) {
3016
+ mp.game.graphics.drawMarker(type, posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, red, green, blue, alpha, bobUpAndDown, faceCamera, p19, rotate, textureDict, textureName, drawOnEnts);
3017
+ }
3018
+ // --- Screen ---
3019
+ getAspectRatio(b = false) {
3020
+ return mp.game.graphics.getAspectRatio(b);
3021
+ }
3022
+ getSafeZoneSize() {
3023
+ return mp.game.graphics.getSafeZoneSize();
3024
+ }
3025
+ // --- Scaleform ---
3026
+ requestScaleformMovie(scaleformName) {
3027
+ return mp.game.graphics.requestScaleformMovie(scaleformName);
3028
+ }
3029
+ beginScaleformMovieMethod(scaleform, methodName) {
3030
+ return mp.game.graphics.beginScaleformMovieMethod(scaleform, methodName);
3031
+ }
3032
+ endScaleformMovieMethod() {
3033
+ mp.game.graphics.endScaleformMovieMethod();
3034
+ }
3035
+ scaleformMovieMethodAddParamInt(value) {
3036
+ mp.game.graphics.scaleformMovieMethodAddParamInt(value);
3037
+ }
3038
+ // --- Textures ---
3039
+ requestStreamedTextureDict(textureDict, p1 = false) {
3040
+ mp.game.graphics.requestStreamedTextureDict(textureDict, p1);
3041
+ }
3042
+ hasStreamedTextureDictLoaded(textureDict) {
3043
+ return mp.game.graphics.hasStreamedTextureDictLoaded(textureDict);
3044
+ }
3045
+ };
3046
+
3047
+ // src/ragemp/RageMpGameplayCamera.ts
3048
+ var RageMpGameplayCamera = class {
3049
+ // --- Position / Rotation / FOV ---
3050
+ getCoord() {
3051
+ const v = mp.game.cam.getGameplayCoord();
3052
+ return { x: v.x, y: v.y, z: v.z };
3053
+ }
3054
+ getRot(rotationOrder = 2) {
3055
+ const v = mp.game.cam.getGameplayRot(rotationOrder);
3056
+ return { x: v.x, y: v.y, z: v.z };
3057
+ }
3058
+ getFov() {
3059
+ return mp.game.cam.getGameplayFov();
3060
+ }
3061
+ // --- Relative Heading/Pitch ---
3062
+ getRelativeHeading() {
3063
+ return mp.game.cam.getGameplayCamRelativeHeading();
3064
+ }
3065
+ setRelativeHeading(heading) {
3066
+ mp.game.cam.setGameplayCamRelativeHeading(heading);
3067
+ }
3068
+ getRelativePitch() {
3069
+ return mp.game.cam.getGameplayCamRelativePitch();
3070
+ }
3071
+ setRelativePitch(angle, scalingFactor = 1) {
3072
+ mp.game.cam.setGameplayCamRelativePitch(angle, scalingFactor);
3073
+ }
3074
+ // --- Shaking ---
3075
+ shake(shakeName, intensity) {
3076
+ mp.game.cam.shakeGameplayCam(shakeName, intensity);
3077
+ }
3078
+ isShaking() {
3079
+ return mp.game.cam.isGameplayShaking();
3080
+ }
3081
+ setShakeAmplitude(amplitude) {
3082
+ mp.game.cam.setGameplayCamShakeAmplitude(amplitude);
3083
+ }
3084
+ stopShaking(p0 = true) {
3085
+ mp.game.cam.stopGameplayCamShaking(p0);
3086
+ }
3087
+ // --- Script Camera Rendering ---
3088
+ renderScriptCams(render, ease, easeTime, p3, p4) {
3089
+ mp.game.cam.renderScriptCams(render, ease, easeTime, p3, p4);
3090
+ }
3091
+ stopRenderingScriptCamsUsingCatchUp(render, p1, p2, p3) {
3092
+ mp.game.cam.stopRenderingScriptCamsUsingCatchUp(render, p1, p2, p3);
3093
+ }
3094
+ // --- Final Rendered Camera ---
3095
+ getFinalRenderedCoord() {
3096
+ const v = mp.game.cam.getFinalRenderedCoord();
3097
+ return { x: v.x, y: v.y, z: v.z };
3098
+ }
3099
+ getFinalRenderedRot(rotationOrder = 2) {
3100
+ const v = mp.game.cam.getFinalRenderedRot(rotationOrder);
3101
+ return { x: v.x, y: v.y, z: v.z };
3102
+ }
3103
+ getFinalRenderedFov() {
3104
+ return mp.game.cam.getFinalRenderedFov();
3105
+ }
3106
+ };
3107
+
3108
+ // src/ragemp/RageMpControls.ts
3109
+ var RageMpControls = class {
3110
+ disableAllControlActions(padIndex) {
3111
+ mp.game.controls.disableAllControlActions(padIndex);
3112
+ }
3113
+ disableControlAction(padIndex, control, disable) {
3114
+ mp.game.controls.disableControlAction(padIndex, control, disable);
3115
+ }
3116
+ enableControlAction(padIndex, control, enable) {
3117
+ mp.game.controls.enableControlAction(padIndex, control, enable);
3118
+ }
3119
+ isControlPressed(padIndex, control) {
3120
+ return mp.game.controls.isControlPressed(padIndex, control);
3121
+ }
3122
+ isDisabledControlJustPressed(padIndex, control) {
3123
+ return mp.game.controls.isDisabledControlJustPressed(padIndex, control);
3124
+ }
3125
+ isDisabledControlPressed(padIndex, control) {
3126
+ return mp.game.controls.isDisabledControlPressed(padIndex, control);
3127
+ }
3128
+ getDisabledControlNormal(padIndex, control) {
3129
+ return mp.game.controls.getDisabledControlNormal(padIndex, control);
3130
+ }
3131
+ };
3132
+
3133
+ // src/ragemp/RageMpEngine.ts
3134
+ var RageMpEngine = (_class4 = class {
3135
+
3136
+
3137
+
3138
+
3139
+
3140
+
3141
+
3142
+
3143
+
3144
+
3145
+
3146
+
3147
+
3148
+
3149
+
3150
+
3151
+
3152
+
3153
+
3154
+
1461
3155
 
1462
3156
 
1463
3157
 
@@ -1584,6 +3278,15 @@ var RageMpEngine = (_class4 = class {
1584
3278
  this.system = new RageMpSystem();
1585
3279
  this.user = new RageMpUser();
1586
3280
  this.natives = new RageMpNativesBridge();
3281
+ this.weapon = new RageMpWeapon();
3282
+ this.streaming = new RageMpStreaming();
3283
+ this.world = new RageMpWorld();
3284
+ this.gameplay = new RageMpGameplay();
3285
+ this.hud = new RageMpHUD();
3286
+ this.audio = new RageMpAudio();
3287
+ this.graphics = new RageMpGraphics();
3288
+ this.gameplayCamera = new RageMpGameplayCamera();
3289
+ this.controls = new RageMpControls();
1587
3290
  }
1588
3291
  get localPlayer() {
1589
3292
  if (!this._localPlayer) {
@@ -1609,5 +3312,14 @@ var RageMpEngine = (_class4 = class {
1609
3312
 
1610
3313
 
1611
3314
 
1612
- exports.RageMpBlip = RageMpBlip; exports.RageMpBrowser = RageMpBrowser; exports.RageMpCamera = RageMpCamera; exports.RageMpCheckpoint = RageMpCheckpoint; exports.RageMpColshape = RageMpColshape; exports.RageMpCreatablePool = RageMpCreatablePool; exports.RageMpEngine = RageMpEngine; exports.RageMpEntity = RageMpEntity; exports.RageMpEntityPool = RageMpEntityPool; exports.RageMpMarker = RageMpMarker; exports.RageMpObject = RageMpObject; exports.RageMpPed = RageMpPed; exports.RageMpPickup = RageMpPickup; exports.RageMpPlayer = RageMpPlayer; exports.RageMpTextLabel = RageMpTextLabel; exports.RageMpVehicle = RageMpVehicle;
3315
+
3316
+
3317
+
3318
+
3319
+
3320
+
3321
+
3322
+
3323
+
3324
+ exports.RageMpAudio = RageMpAudio; exports.RageMpBlip = RageMpBlip; exports.RageMpBrowser = RageMpBrowser; exports.RageMpCamera = RageMpCamera; exports.RageMpCheckpoint = RageMpCheckpoint; exports.RageMpColshape = RageMpColshape; exports.RageMpControls = RageMpControls; exports.RageMpCreatablePool = RageMpCreatablePool; exports.RageMpEngine = RageMpEngine; exports.RageMpEntity = RageMpEntity; exports.RageMpEntityPool = RageMpEntityPool; exports.RageMpGameplay = RageMpGameplay; exports.RageMpGameplayCamera = RageMpGameplayCamera; exports.RageMpGraphics = RageMpGraphics; exports.RageMpHUD = RageMpHUD; exports.RageMpMarker = RageMpMarker; exports.RageMpObject = RageMpObject; exports.RageMpPed = RageMpPed; exports.RageMpPickup = RageMpPickup; exports.RageMpPlayer = RageMpPlayer; exports.RageMpStreaming = RageMpStreaming; exports.RageMpTextLabel = RageMpTextLabel; exports.RageMpVehicle = RageMpVehicle; exports.RageMpWeapon = RageMpWeapon; exports.RageMpWorld = RageMpWorld;
1613
3325
  //# sourceMappingURL=ragemp.cjs.map