User contributions for Shr0x

Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)

26 April 2024

  • 09:0809:08, 26 April 2024 diff hist +544 N Graphics::getLightsStateCreated page with "{{ClientsideJsFunction}} {{JSContainer| ===Required Params=== *'''lightid:''' {{RageType|Number}} ===Return value=== *''{{RageType|Boolean}}'' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.graphics.getLightsState(lightId); </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> mp.game.graphics.setLightsState(1, true); const lightState = mp.game.graphics.getLightsState(1); mp.console.logInfo(`Light id 1 state is ${lightState}`); </syntaxhighlight>..." current
  • 09:0309:03, 26 April 2024 diff hist +463 N Graphics::resetLightsStateCreated page with "{{ClientsideJsFunction}} {{JSContainer| ===Return value=== *'''void''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.graphics.resetLightsState(); </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> mp.game.graphics.setLightsState(1, true); //reset lights state after 5 seconds. setTimeout(() => { mp.game.graphics.resetLightsState(); }, 5000); </syntaxhighlight> }} ==See also== {{Graphics_s_function_c}} Category:Clientside API" current

25 April 2024

  • 20:1120:11, 25 April 2024 diff hist +22 Graphics::registerTextFontIdchanged return value current
  • 19:3819:38, 25 April 2024 diff hist +139 Template:EntityPool functionNo edit summary current
  • 19:3219:32, 25 April 2024 diff hist +51 Template:Event functionsNo edit summary
  • 19:3019:30, 25 April 2024 diff hist +89 Template:Event functionsNo edit summary
  • 19:2919:29, 25 April 2024 diff hist +72 Template:Event functionsNo edit summary
  • 08:1808:18, 25 April 2024 diff hist +672 N Weapon::canUseOnParachuteCreated page with "{{ClientsideJsFunction}} {{JSContainer| Checks whether given weapon can be used while parachuting. === Required Params === *'''handle''' {{RageType|number}} === Return Value === *{{RageType|boolean}} ==Syntax== <pre> mp.game.weapon.canUseOnParachute(handle); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const weapon = mp.players.local.weapon; const canUseOnParachute = mp.game.weapon.canUseOnParachute(weapon); mp.console.logInfo(`Players weap..." current
  • 08:1408:14, 25 April 2024 diff hist −10 Weapon::getDamageTypeNo edit summary current
  • 08:1408:14, 25 April 2024 diff hist +1,169 N Weapon::getDamageTypeCreated page with "{{ClientsideJsFunction}} {{JSContainer| Checks whether ped's current weapon flashlight is on or off. === Required Params === *'''handle''' {{RageType|number}} === Return Value === *'''type''' {{RageType|number}} === Damage Types === <pre> const damageTypes = [ "unknown", "none", "melee", "bullet", "rubber bullet", "explosive", "fire", "collision", "fall", "drown", "electric", "barbed wire", "fire extinguisher", "smoke", "water cannon", "tranquilizer"..."
  • 08:1008:10, 25 April 2024 diff hist −4 Weapon::isFlashLightOnNo edit summary current
  • 08:0808:08, 25 April 2024 diff hist +630 N Weapon::isFlashLightOnCreated page with "{{ClientsideJsFunction}} {{JSContainer| Checks whether ped's current weapon flashlight is on or off. === Required Params === *'''handle''' {{RageType|number}} === Return Value === *'''toggled''' {{RageType|boolean}} ==Syntax== <pre> mp.game.weapon.isFlashLightOn(handle); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const weaponSilenced = mp.game.weapon.isFlashLightOn(mp.players.local.handle); mp.console.logInfo(`Players weapon flashlight i..."
  • 08:0608:06, 25 April 2024 diff hist +654 N Weapon::isPedCurrentSilencedCreated page with "{{ClientsideJsFunction}} {{JSContainer| Checks whether ped's current weapon is silenced or not. === Required Params === *'''playerHandle''' {{RageType|number}} === Return Value === *'''silenced''' {{RageType|boolean}} ==Syntax== <pre> mp.game.weapon.isPedCurrentSilenced(playerHandle); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const weaponSilenced = mp.game.weapon.isPedCurrentSilenced(mp.players.local.handle); mp.console.logInfo(`Players..." current
  • 07:4607:46, 25 April 2024 diff hist +790 N Weapon::getPedTintIndexCreated page with "{{ClientsideJsFunction}} {{JSContainer| Gets given weapon tint index === Required Params === *'''handle''' {{RageType|number}} *'''weaponhash''' {{RageType|number}} ==Syntax== <pre> mp.game.weapon.getPedTintIndex(handle, weaponhash); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> mp.players.local.giveWeapon(mp.game.joaat("WEAPON_PISTOL"), 1000, true); mp.game.weapon.setPedTintIndex(mp.players.local.handle, mp.game.joaat("WEAPON_PISTOL"), 1);..." current
  • 07:4307:43, 25 April 2024 diff hist +628 N Weapon::setPedTintIndexCreated page with "{{ClientsideJsFunction}} {{JSContainer| Set given weapon tint index === Required Params === *'''handle''' {{RageType|number}} *'''weaponhash''' {{RageType|number}} *'''tint''' {{RageType|number}} ==Syntax== <pre> mp.game.weapon.setPedTintIndex(handle, weaponhash, tint); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> mp.players.local.giveWeapon(mp.game.joaat("WEAPON_PISTOL"), 1000, true); mp.game.weapon.setPedTintIndex(mp.players.local.handle,..." current
  • 07:3807:38, 25 April 2024 diff hist +1,005 N Weapon::giveLoadoutToPedCreated page with "{{ClientsideJsFunction}} {{JSContainer| Give the specified ped a set of weapons based on loadout hash. === Required Params === *'''handle''' {{RageType|number}} *'''hash''' {{RageType|number}} ==Loadouts== <pre> loadouts = [ "LOADOUT_DEFAULT", "LOADOUT_LOST", "LOADOUT_LOST_L1", "LOADOUT_LOST_L2", "LOADOUT_LOST_L3", "LOADOUT_MEXICAN", "LOADOUT_MEXICAN_L1", "LOADOUT_MEXICAN_L2", "LOADOUT_MEXICAN_L3", "LOADOUT_FAMILY", "LOADOUT_A..." current
  • 04:5704:57, 25 April 2024 diff hist +112 Ru:Getting Started with Server→‎Установка сервера current
  • 04:5404:54, 25 April 2024 diff hist +66 Ru:Getting Started with ServerNo edit summary
  • 04:3604:36, 25 April 2024 diff hist +565 N Ui::getCurrentAreaNameLabelCreated page with "{{ClientsideJsFunction}} {{JSContainer| Gets area name label based on current player position. === Return Value === *'''label''' {{RageType|string}} ==Syntax== <pre> mp.game.hud.getCurrentAreaNameLabel(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const areaNameLabel = mp.game.hud.getCurrentAreaNameLabel(); //eg output: 'WVINE' mp.console.logWarning(`Area name label is: ${areaNameLabel}`); </syntaxhighlight> }} }} ==See also== {{Ui_s_funct..." current
  • 04:3404:34, 25 April 2024 diff hist +544 N Ui::getCurrentStreetNameHashCreated page with "{{ClientsideJsFunction}} {{JSContainer| Gets street name hash based on current player position. === Return Value === *'''hash''' {{RageType|number}} ==Syntax== <pre> mp.game.hud.getCurrentStreetNameHash(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const streetNameHash = mp.game.hud.getCurrentStreetNameHash(); mp.console.logWarning(`Street name hash is: ${streetName}`) </syntaxhighlight> }} }} ==See also== {{Ui_s_function_c}} Category:C..." current
  • 04:3304:33, 25 April 2024 diff hist +540 N Ui::getCurrentStreetNameStringCreated page with "{{ClientsideJsFunction}} {{JSContainer| Gets street name based on current player position. === Return Value === *'''streetname''' {{RageType|string}} ==Syntax== <pre> mp.game.hud.getCurrentStreetNameString(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const streetName = mp.game.hud.getCurrentStreetNameString(); mp.console.logWarning(`Street name is: ${streetName}`) </syntaxhighlight> }} }} ==See also== {{Ui_s_function_c}} Category:Clien..." current
  • 04:3204:32, 25 April 2024 diff hist +530 N Ui::getCurrentAreaNameStringCreated page with "{{ClientsideJsFunction}} {{JSContainer| Gets area name based on current player position. === Return Value === *'''areaname''' {{RageType|string}} ==Syntax== <pre> mp.game.hud.getCurrentAreaNameString(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const areaName = mp.game.hud.getCurrentAreaNameString(); mp.console.logWarning(`Area name is: ${areaNameHash}`) </syntaxhighlight> }} }} ==See also== {{Ui_s_function_c}} [[Category:Clientside API]..." current
  • 04:3104:31, 25 April 2024 diff hist +533 N Ui::getCurrentAreaNameHashCreated page with "{{ClientsideJsFunction}} {{JSContainer| Gets area name hash based on current player position. === Return Value === *'''hash''' {{RageType|number}} ==Syntax== <pre> mp.game.hud.getCurrentAreaNameHash(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const areaNameHash = mp.game.hud.getCurrentAreaNameHash(); mp.console.logWarning(`Area name hash: ${areaNameHash}`) </syntaxhighlight> }} }} ==See also== {{Ui_s_function_c}} Category:Clientside A..." current
  • 04:2604:26, 25 April 2024 diff hist +900 N Ui::applyShowHudComponentsThisFrameBatchCreated page with "{{ClientsideJsFunction}} {{JSContainer| Hides, shows, or resets component based on https://wiki.rage.mp/index.php?title=Ui::setShowHudComponentsThisFrameBatch setShowHudComponentsThisFrameBatch === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> mp.game.hud.applyShowHudComponentsThisFrameBatch(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const hudComponents = { HUD_WANTED_STARS: 1, HUD_WEAPON_ICON: 2, HUD_..." current
  • 04:2304:23, 25 April 2024 diff hist +1,243 N Ui::setShowHudComponentsThisFrameBatchCreated page with "{{ClientsideJsFunction}} {{JSContainer| === Required Params === *'''show''' {{RageType|Boolean}} *'''components''' {{RageType|Number[]}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> mp.game.hud.setShowHudComponentsThisFrameBatch(show, components); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const hudComponents = { HUD_WANTED_STARS: 1, HUD_WEAPON_ICON: 2, HUD_CASH: 3, HUD_MP_CASH: 4 } //hide hud comp..." current
  • 04:1304:13, 25 April 2024 diff hist +1,033 N Controls::applyDisableControlActionBatchCreated page with "{{ClientsideJsFunction}} {{JSContainer| Applies disabled control given in https://wiki.rage.mp/index.php?title=Controls::setDisableControlActionBatch setDisableControlActionBatch === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> mp.game.controls.applyDisableControlActionBatch(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const disablePlayerControls = [ 0, 30, 31, 21, 36, 22, 44, 38, 71, 72, 59, 60, 42, 43, 85, 8..."
  • 04:1104:11, 25 April 2024 diff hist +1,033 N Controls::setDisableControlActionBatchCreated page with "{{ClientsideJsFunction}} {{JSContainer| === Required Params === *'''isMoveOrLookInputGroup''' {{RageType|Boolean}} *'''controls''' {{RageType|Number[]}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> mp.game.controls.setDisableControlActionBatch(isMoveOrLookInputGroup, controls); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const disablePlayerControls = [ 0, 30, 31, 21, 36, 22, 44, 38, 71, 72, 59, 60, 42, 43, 85, 8..."
  • 03:5003:50, 25 April 2024 diff hist +406 PlayerExitCheckpointNo edit summary current

24 April 2024

23 April 2024

  • 18:2118:21, 23 April 2024 diff hist +787 N Vehicle::setLiveryTextureCreated page with "{{ClientsideJsFunction}} {{JSContainer| Set a custom texture livery to the given vehicle. === Required Params === *'''textureDict:''' {{RageType|string}} *'''textureName:''' {{RageType|string}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> vehicle.setLiveryTexture(textureDict, textureName); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.atRemoteId(0); if (!vehicle || !mp.vehicles.exists(vehicl..." current
  • 18:1618:16, 23 April 2024 diff hist +2,990 N Cursor.registerCustomIconCreated page with "{{ClientsideJsFunction}} {{JSContainer| Register a custom cursor. === Required Params === *'''type:''' {{RageType|Number}} *'''packageFilePath:''' {{RageType|String}} *'''offsetX:''' {{RageType|Float}} *'''offsetY:''' {{RageType|Float}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== //This types are taken from here: https://rage.mp/files/file/495-windows-style-cursor-pack/ <pre> const MAP_CURSOR_NAME_TO_TYPE = { CT_POINTER: 0, CT_CROSS: 1, C..."
  • 18:1018:10, 23 April 2024 diff hist +368 Vehicle::isBumperBrokenOffNo edit summary current
  • 18:0618:06, 23 April 2024 diff hist +650 N Vehicle::fixBumperCreated page with "{{ClientsideJsFunction}} {{JSContainer| Fixes given front or back bumper of a vehicle. === Required Params === *'''front:''' {{RageType|Boolean}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> vehicle.fixBumper(front); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.atRemoteId(0); if (!vehicle || !mp.vehicles.exists(vehicle)) return; vehicle.fixBumper(true); //fixes vehicle's front bumper. </syn..." current
  • 18:0418:04, 23 April 2024 diff hist +780 N Vehicle::breakOffBumperCreated page with "{{ClientsideJsFunction}} {{JSContainer| Breaks off front or back bumper of the vehicle. === Required Params === *'''front:''' {{RageType|Boolean}} *'''deleteMapObject:''' {{RageType|Boolean}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> vehicle.breakOffBumper(front, deleteMapObject); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.atRemoteId(0); if (!vehicle || !mp.vehicles.exists(vehicle)) re..." current
  • 18:0218:02, 23 April 2024 diff hist +715 N Vehicle::isWheelBrokenOffCreated page with "{{ClientsideJsFunction}} {{JSContainer| Check whether the given wheel id of the vehicle is broken or not. === Required Params === *'''wheelId:''' {{RageType|Number}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> vehicle.isWheelBrokenOff(wheelId); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.atRemoteId(0); if (!vehicle || !mp.vehicles.exists(vehicle)) return; mp.console.logInfo(`Wheel id 1 is..." current
  • 18:0018:00, 23 April 2024 diff hist +613 N Vehicle::fixWheelCreated page with "{{ClientsideJsFunction}} {{JSContainer| Fixes broken given wheel id of the vehicle. === Required Params === *'''wheelId:''' {{RageType|Number}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> vehicle.fixWheel(wheelId); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.atRemoteId(0); if (!vehicle || !mp.vehicles.exists(vehicle)) return; vehicle.fixWheel(1); </syntaxhighlight> }} }} ==See also== {{V..." current
  • 17:5917:59, 23 April 2024 diff hist +750 N Vehicle::breakOffWheelCreated page with "{{ClientsideJsFunction}} {{JSContainer| Breaks specified wheel from vehicle. === Required Params === *'''wheelId:''' {{RageType|Number}} *'''removeFromWorld:''' {{RageType|Boolean}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> vehicle.breakOffWheel(wheelId, removeFromWorld); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.atRemoteId(0); if (!vehicle || !mp.vehicles.exists(vehicle)) return; veh..." current
  • 17:3317:33, 23 April 2024 diff hist +479 Rope::deleteRopeNo edit summary
  • 17:3117:31, 23 April 2024 diff hist +6 Rope::addRopeNo edit summary
  • 17:2917:29, 23 April 2024 diff hist −649 Rope::addRopeNo edit summary
  • 10:4310:43, 23 April 2024 diff hist +734 N Streaming::forceStreamingUpdateCreated page with "__NOTOC__ {{ClientsideJsFunction}} Forcefully update ('reload') streaming. {{JSContainer| === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> mp.game.streaming.forceStreamingUpdate(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const [position, dimension, heading] = [mp.players.local.position, mp.players.local.dimension, mp.players.local.getHeading()]; const ped = mp.peds.new(mp.game.joaat("mp_m_freemode_01"), position, hea..." current
  • 10:3610:36, 23 April 2024 diff hist +554 N Streaming::setRenderHdOnlyCreated page with "__NOTOC__ {{ClientsideJsFunction}} Enable or disable the game to only render HD models {{JSContainer| === Required Arguments === *'''enable:''' {{RageType|Boolean}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> mp.game.streaming.setRenderHdOnly(enable); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> mp.game.streaming.setRenderHdOnly(true); //enable HD models only to render </syntaxhighlight> }} }} ==See also== {{Streami..." current
  • 10:1810:18, 23 April 2024 diff hist +662 N Audio::playPoliceCrimeReportCreated page with "__NOTOC__ {{ClientsideJsFunction}} {{JSContainer| === Required Arguments === *'''position:''' {{RageType|Vector3}} *'''crimeIndex:''' {{RageType|Number}} *'''playDelay:''' {{RageType|Number}} *'''localPlayer:''' {{RageType|Boolean}} === Return Value === *'''void:''' {{RageType|void}} ==Syntax== <pre> mp.game.streaming.playPoliceCrimeReport(position, crimeIndex, playDelay, localPlayer); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const pos..."
  • 10:0610:06, 23 April 2024 diff hist +951 N Streaming::streamvolCreateFrustumCreated page with "__NOTOC__ {{ClientsideJsFunction}} {{JSContainer| Creates a new frustum streaming volume for the specified asset types. === Required Arguments === *'''x''' {{RageType|Float}} *'''y''' {{RageType|Float}} *'''z''' {{RageType|Float}} *'''dirX''' {{RageType|Float}} *'''dirY''' {{RageType|Float}} *'''dirZ''' {{RageType|Float}} *'''flag''' {{RageType|Number}} *'''lodFlag''' {{RageType|Number}} === Return Value === *'''handle''' {{RageType|Handle}} ==Syntax== <pre> mp.game.s..." current
  • 10:0510:05, 23 April 2024 diff hist +4 Streaming::streamvolCreateLinecorrected return value current
  • 10:0410:04, 23 April 2024 diff hist +885 N Streaming::streamvolCreateLineCreated page with "__NOTOC__ {{ClientsideJsFunction}} {{JSContainer| Creates a new line streaming volume for the specified asset types. === Required Arguments === *'''x1''' {{RageType|Float}} *'''y1''' {{RageType|Float}} *'''z1''' {{RageType|Float}} *'''x2''' {{RageType|Float}} *'''y2''' {{RageType|Float}} *'''z2''' {{RageType|Float}} *'''flag''' {{RageType|Number}} === Return Value === *'''void''' {{RageType|Void}} ==Syntax== <pre> mp.game.streaming.streamvolCreateLine(x1, y1, z1, x2,..."
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)