Gameplay::clearAreaLeaveVehicleHealth

From RAGE Multiplayer Wiki
Revision as of 15:41, 29 April 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| Clears all cars and peds within the given area but does not change the vehicle health ===Required Params=== *'''x:''' {{RageType|Float}} *'''y:''' {{RageType|Float}} *'''z:''' {{RageType|Float}} *'''radius:''' {{RageType|Float}} *'''deleteProjectiles:''' {{RageType|Float}} *'''leaveCarGens:''' {{RageType|Float}} *'''clearPickups:''' {{RageType|Float}} *'''broadcast:''' {{RageType|Float}} ===Return value=== *''' {{RageType|number}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Clears all cars and peds within the given area but does not change the vehicle health

Required Params

  • x: Float
  • y: Float
  • z: Float
  • radius: Float
  • deleteProjectiles: Float
  • leaveCarGens: Float
  • clearPickups: Float
  • broadcast: Float

Return value

  • number

Syntax

mp.game.gameplay.clearAreaLeaveVehicleHealth(x, y, z, radius, deleteProjectiles, leaveCarGens, clearPickups, broadcast);

Example

const {x, y, z} = mp.players.local.position;
const radius = 50.0;
mp.game.gameplay.clearAreaLeaveVehicleHealth(x, y, z, radius, false, false, false, false); //clears cars and peds within the player's position with a radius of 50.0


See also