### Simple Lua Script Example Source: https://wiki.blast.hk/ru/moonloader A basic example of a MoonLoader script that prints 'Hello, world!' to the console. This script defines a name and a main function that executes the print command. ```lua script_name("Example") function main() print("Hello, world!") end ``` -------------------------------- ### VS Code Lua Language Server Configuration Source: https://wiki.blast.hk/ru/moonloader Configuration settings for the 'sumneko/vscode-lua' extension in Visual Studio Code. This setup optimizes the environment for LuaJIT and MoonLoader development by specifying runtime versions, paths, and disabling certain diagnostics. ```json { "Lua.runtime.version": "LuaJIT", "Lua.runtime.path": [ "lib/?.lua", "lib/?/init.lua", "libstd/?.lua", "libstd/?/init.lua" ], "Lua.workspace.ignoreDir": [ "**", "!lib/", "!libstd/" ], "Lua.diagnostics.disable": [ "lowercase-global", "undefined-global" ] } ``` -------------------------------- ### Clothing and Player Info Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to get information about player clothing and HUD colors. ```APIDOC ## getClothesItem ### Description Retrieves the texture and model CRC for a player's clothing item. ### Method N/A (Script Function) ### Parameters - **player** (Player) - Required - The player. - **bodypart** (int) - Required - The body part index. ### Returns - **textureCRC** (int) - The CRC of the clothing texture. - **modelCRC** (int) - The CRC of the clothing model. ``` ```APIDOC ## getHudColour ### Description Retrieves the RGBA color values for a specific HUD interface element. ### Method N/A (Script Function) ### Parameters - **interface** (int) - Required - The HUD interface ID. ### Returns - **r** (int) - The red component. - **g** (int) - The green component. - **b** (int) - The blue component. - **a** (int) - The alpha component. ``` ```APIDOC ## setPlayerJumpButton ### Description Enables or disables the jump button for the player. ### Method N/A (Script Function) ### Parameters - **player** (Player) - Required - The player. - **enable** (bool) - Required - True to enable, false to disable. ``` -------------------------------- ### Zone Information Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to get information about zones. ```APIDOC ## getNameOfInfoZone ### Description Gets the name of the information zone at the given coordinates. ### Method N/A (Script Function) ### Parameters - **atX** (float) - Required - The X coordinate. - **atY** (float) - Required - The Y coordinate. - **atZ** (float) - Required - The Z coordinate. ### Returns - **nameB** (GxtString) - The name of the information zone. ``` -------------------------------- ### Vehicle Information Source: https://wiki.blast.hk/ru/moonloader/opcodes Function to get the class of a vehicle. ```APIDOC ## getVehicleClass ### Description Retrieves the class of a given vehicle. ### Method N/A (Script Function) ### Parameters - **car** (Vehicle) - Required - The vehicle to check. ### Returns - **class** (int) - The class ID of the vehicle. ``` ```APIDOC ## vehicleCanBeTargettedByHsMissile ### Description Determines if a vehicle can be targeted by homing missiles. ### Method N/A (Script Function) ### Parameters - **car** (Vehicle) - Required - The vehicle. - **targetable** (bool) - Required - Whether the vehicle can be targeted. ``` ```APIDOC ## setFreebiesInVehicle ### Description Sets whether a vehicle contains special items or 'freebies'. ### Method N/A (Script Function) ### Parameters - **car** (Vehicle) - Required - The vehicle. - **containsGoodies** (bool) - Required - True if the vehicle contains freebies, false otherwise. ``` -------------------------------- ### Quaternion Rotation Functions Source: https://wiki.blast.hk/ru/moonloader/changelog Functions for getting and setting the quaternion rotation of objects, vehicles, and characters. ```lua getObjectQuaternion setObjectQuaternion getVehicleQuaternion setVehicleQuaternion getCharQuaternion setCharQuaternion ``` -------------------------------- ### Territory Control Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to get information about territory control. ```APIDOC ## getTerritoryUnderControlPercentage ### Description Retrieves the percentage of territory currently under control. ### Method N/A (Script Function) ### Returns - **percentage** (int) - The percentage of territory controlled. ``` -------------------------------- ### Random Character Generation Source: https://wiki.blast.hk/ru/moonloader/opcodes Function to get a random character within a specified sphere. ```APIDOC ## getRandomCharInSphereNoBrain ### Description Gets a random character within a spherical area, excluding brain-dead characters. ### Method N/A (Script Function) ### Parameters - **X** (float) - Required - The center X coordinate. - **Y** (float) - Required - The center Y coordinate. - **Z** (float) - Required - The center Z coordinate. - **radius** (float) - Required - The radius of the sphere. ### Returns - **ped** (Ped) - The random character found, or null if none. ``` -------------------------------- ### INI Configuration Library Source: https://wiki.blast.hk/ru/moonloader/changelog Introduces the `inicfg` library for working with INI configuration files. ```lua inicfg ``` -------------------------------- ### Load Audio from Memory Functions Source: https://wiki.blast.hk/ru/moonloader/changelog New functions for loading audio files directly from memory. ```lua loadAudioStreamFromMemory load3dAudioStreamFromMemory ``` -------------------------------- ### Menu System Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions for creating, managing, and interacting with in-game menus. ```APIDOC ## createMenu ### Description Creates a new menu with specified properties. ### Method N/A (Script Function) ### Parameters - **title** (GxtString) - Required - The title of the menu. - **posX** (float) - Required - The X position of the menu. - **posY** (float) - Required - The Y position of the menu. - **width** (float) - Required - The width of the menu. - **columns** (int) - Required - The number of columns. - **interactive** (bool) - Required - Whether the menu is interactive. - **background** (bool) - Required - Whether the menu has a background. - **alignment** (int) - Required - The alignment of the menu. ### Returns - **menu** (int) - The ID of the created menu. ``` ```APIDOC ## setMenuColumnOrientation ### Description Sets the orientation alignment for a specific menu column. ### Method N/A (Script Function) ### Parameters - **menu** (int) - Required - The menu ID. - **column** (int) - Required - The column index. - **alignment** (int) - Required - The alignment value. ``` ```APIDOC ## getMenuItemSelected ### Description Gets the ID of the currently selected menu item. ### Method N/A (Script Function) ### Parameters - **menu** (int) - Required - The menu ID. ### Returns - **item** (int) - The ID of the selected item. ``` ```APIDOC ## getMenuItemAccepted ### Description Gets the ID of the menu item that was accepted (e.g., by pressing Enter). ### Method N/A (Script Function) ### Parameters - **menu** (int) - Required - The menu ID. ### Returns - **item** (int) - The ID of the accepted item. ``` ```APIDOC ## activateMenuItem ### Description Activates or deactivates a specific menu item. ### Method N/A (Script Function) ### Parameters - **menu** (int) - Required - The menu ID. - **row** (int) - Required - The row index of the item. - **enable** (bool) - Required - Whether to activate the item. ``` ```APIDOC ## deleteMenu ### Description Deletes a menu and frees associated resources. ### Method N/A (Script Function) ### Parameters - **menu** (int) - Required - The menu ID to delete. ``` ```APIDOC ## setMenuColumn ### Description Sets the content for a column in a menu, allowing multiple data strings. ### Method N/A (Script Function) ### Parameters - **menu** (int) - Required - The menu ID. - **column** (int) - Required - The column index. - **header** (GxtString) - Required - The header text for the column. - **data1** (GxtString) - Optional - First data string. - **data2** (GxtString) - Optional - Second data string. - **data3** (GxtString) - Optional - Third data string. - **data4** (GxtString) - Optional - Fourth data string. - **data5** (GxtString) - Optional - Fifth data string. - **data6** (GxtString) - Optional - Sixth data string. - **data7** (GxtString) - Optional - Seventh data string. - **data8** (GxtString) - Optional - Eighth data string. - **data9** (GxtString) - Optional - Ninth data string. - **data10** (GxtString) - Optional - Tenth data string. - **data11** (GxtString) - Optional - Eleventh data string. - **data12** (GxtString) - Optional - Twelfth data string. ``` ```APIDOC ## setMenuItemWithNumber ### Description Sets a menu item's text and an associated number. ### Method N/A (Script Function) ### Parameters - **panel** (int) - Required - The panel ID. - **column** (int) - Required - The column index. - **row** (int) - Required - The row index. - **gxtString** (GxtString) - Required - The text for the menu item. - **number** (int) - Required - The number to associate with the item. ``` ```APIDOC ## setMenuItemWith2Numbers ### Description Sets a menu item's text and two associated numbers. ### Method N/A (Script Function) ### Parameters - **panel** (int) - Required - The panel ID. - **column** (int) - Required - The column index. - **row** (int) - Required - The row index. - **gxtString** (GxtString) - Required - The text for the menu item. - **numbers1** (int) - Required - The first number. - **numbers2** (int) - Required - The second number. ``` ```APIDOC ## setActiveMenuItem ### Description Sets the active row for a given menu panel. ### Method N/A (Script Function) ### Parameters - **panel** (int) - Required - The panel ID. - **activeRow** (int) - Required - The row to set as active. ``` -------------------------------- ### Zone Population Settings Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to initialize and manage zone population settings. ```APIDOC ## initZonePopulationSettings ### Description Initializes the settings for zone population. ### Method N/A (Script Function) ``` ```APIDOC ## getCurrentPopulationZoneType ### Description Gets the current population zone type. ### Method N/A (Script Function) ### Returns - **popcycle** (int) - The current population zone type. ``` -------------------------------- ### Game Memory Library Source: https://wiki.blast.hk/ru/moonloader/changelog Introduces the `memory` library for interacting with game memory. ```lua memory ``` -------------------------------- ### Print Functionality Source: https://wiki.blast.hk/ru/moonloader/changelog The `print` function can now output values of any data type. ```lua print(any_value) ``` -------------------------------- ### Object Comparison Source: https://wiki.blast.hk/ru/moonloader/changelog Enables comparison of script information objects, such as checking if the current script is the same as a found script. ```lua thisScript() == script.find("name") ``` -------------------------------- ### RenderCreateFont with Charset Argument Source: https://wiki.blast.hk/ru/moonloader/changelog The `renderCreateFont` function now accepts an optional `charset` argument for specifying encoding. ```lua renderCreateFont ``` -------------------------------- ### Font Rendering Enhancements Source: https://wiki.blast.hk/ru/moonloader/changelog New functions for advanced font rendering, including character index and width retrieval. ```lua renderGetFontCharIndexAt renderGetFontCharWidth ``` -------------------------------- ### Blips and Markers Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions for creating and managing blips and markers in the game world. ```APIDOC ## setBlipEntryExit ### Description Sets the entry and exit points for a blip, likely related to a marker. ### Method N/A (Script Function) ### Parameters - **marker** (Marker) - Required - The marker object. - **X** (float) - Required - The X coordinate. - **Y** (float) - Required - The Y coordinate. - **radius** (float) - Required - The radius of the blip area. ``` ```APIDOC ## setCoordBlipAppearance ### Description Sets the appearance type for a coordinate-based blip. ### Method N/A (Script Function) ### Parameters - **checkpoint** (Checkpoint) - Required - The checkpoint object. - **type** (int) - Required - The type of appearance. ``` -------------------------------- ### New 2D Rendering Functions Source: https://wiki.blast.hk/ru/moonloader/changelog These built-in functions replace SAMPFUNCS opcodes for drawing 2D elements on the screen. ```lua renderDrawLine renderDrawBox renderDrawBoxWithBorder renderDrawPolygon renderDrawTexture renderBegin renderEnd renderColor renderVertex renderSetTexCoord renderBindTexture renderGetTextureStruct renderGetTextureSprite renderGetTextureSize renderSetRenderState renderLoadTextureFromFileInMemory renderLoadTextureFromFile renderReleaseTexture renderCreateFont renderReleaseFont renderGetFontDrawTextLength renderGetFontDrawHeight renderFontDrawText ``` -------------------------------- ### Global Float Variable Functions Source: https://wiki.blast.hk/ru/moonloader/changelog Functions for reading and writing fractional global game variables. ```lua getGameGlobalFloat setGameGlobalFloat ``` -------------------------------- ### New Audio Stream Functions Source: https://wiki.blast.hk/ru/moonloader/changelog These built-in functions replace CLEO opcodes for audio stream manipulation. ```lua loadAudioStream load3dAudioStream setAudioStreamState releaseAudioStream getAudioStreamLength getAudioStreamState getAudioStreamVolume setAudioStreamVolume setAudioStreamLooped setPlay3dAudioStreamAtCoordinates setPlay3dAudioStreamAtObject setPlay3dAudioStreamAtChar setPlay3dAudioStreamAtCar ``` -------------------------------- ### Animation and Model Handling Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions for attaching animations to models and making objects stealable. ```APIDOC ## attachAnimsToModel ### Description Attaches animations from an external script to a specific model. ### Method N/A (Script Function) ### Parameters - **modelId** (Model) - Required - The model to attach animations to. - **externalScript** (GxtString) - Required - The name of the script containing the animations. ``` -------------------------------- ### Penalties and Game State Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to toggle game penalties and manage player state. ```APIDOC ## switchDeathPenalties ### Description Toggles whether the player loses items or money upon death. ### Method N/A (Script Function) ### Parameters - **lose** (bool) - Required - True to enable penalties, false to disable. ``` ```APIDOC ## switchArrestPenalties ### Description Toggles whether the player loses items or money when arrested. ### Method N/A (Script Function) ### Parameters - **lose** (bool) - Required - True to enable penalties, false to disable. ``` -------------------------------- ### Script Execution Behavior Source: https://wiki.blast.hk/ru/moonloader/changelog Scripts now continue execution as long as threads are active, even after main completion. ```lua script_moonloader ``` -------------------------------- ### Deprecated isOpcodesAvailable Function Source: https://wiki.blast.hk/ru/moonloader/changelog The `isOpcodesAvailable` function is now deprecated and will always return true. ```lua isOpcodesAvailable ``` -------------------------------- ### CLEO Function Replacements Source: https://wiki.blast.hk/ru/moonloader/changelog Several CLEO functions have been replaced with built-in equivalents that are externally compatible. ```lua writeMemory ``` ```lua readMemory ``` ```lua loadDynamicLibrary ``` ```lua freeDynamicLibrary ``` ```lua getDynamicLibraryProcedure ``` ```lua doesFileExist ``` ```lua doesDirectoryExist ``` ```lua createDirectory ``` ```lua popFloat ``` -------------------------------- ### Fixes for Specific Functions Source: https://wiki.blast.hk/ru/moonloader/changelog Bug fixes for various functions including PLAYER_PED, doFade, raknet functions, and ini file saving. ```lua PLAYER_PED doFade raknetGetRpcName raknetGetPacketName raknetBitStreamEncodeString markCharAsNoLongerNeeded markCarAsNoLongerNeeded markObjectAsNoLongerNeeded dontRemoveChar dontRemoveObject import wasKeyPressed setStructElement getStructElement ``` -------------------------------- ### Object Manipulation Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions for controlling the scale and properties of game objects. ```APIDOC ## setObjectScale ### Description Sets the scale of an object. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object to modify. - **scale** (float) - Required - The desired scale factor. ``` ```APIDOC ## isObjectInAngledArea2d ### Description Checks if an object is within a 2D angled area. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object to check. - **x1** (float) - Required - The first X coordinate of the area. - **y1** (float) - Required - The first Y coordinate of the area. - **x2** (float) - Required - The second X coordinate of the area. - **y2** (float) - Required - The second Y coordinate of the area. - **radius** (float) - Required - The radius of the area. - **sphere** (bool) - Required - Whether the area is spherical. ``` ```APIDOC ## isObjectInAngledArea3d ### Description Checks if an object is within a 3D angled area. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object to check. - **x1** (float) - Required - The first X coordinate of the area. - **y1** (float) - Required - The first Y coordinate of the area. - **z1** (float) - Required - The first Z coordinate of the area. - **x2** (float) - Required - The second X coordinate of the area. - **y2** (float) - Required - The second Y coordinate of the area. - **z2** (float) - Required - The second Z coordinate of the area. - **depth** (float) - Required - The depth of the area. - **flag** (bool) - Required - A flag for area definition. ``` ```APIDOC ## setObjectAsStealable ### Description Marks an object as stealable. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object to modify. - **liftable** (bool) - Required - Whether the object is stealable. ``` ```APIDOC ## hasObjectBeenDamagedByWeapon ### Description Checks if an object has been damaged by a specific weapon type. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object to check. - **type** (int) - Required - The weapon type. ``` ```APIDOC ## clearObjectLastWeaponDamage ### Description Clears the record of the last weapon damage dealt to an object. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object whose damage record should be cleared. ``` ```APIDOC ## setObjectMass ### Description Sets the mass of an object. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object to modify. - **mass** (float) - Required - The desired mass. ``` ```APIDOC ## getObjectMass ### Description Retrieves the mass of an object. ### Method N/A (Script Function) ### Parameters - **int** (int) - Required - The object identifier. ### Returns - **mass** (float) - The mass of the object. ``` ```APIDOC ## setObjectTurnMass ### Description Sets the rotational mass of an object. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object to modify. - **turnMass** (float) - Required - The desired rotational mass. ``` ```APIDOC ## getObjectTurnMass ### Description Retrieves the rotational mass of an object. ### Method N/A (Script Function) ### Parameters - **object** (Object) - Required - The object. ### Returns - **turnMass** (float) - The rotational mass of the object. ``` -------------------------------- ### Help Messages Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to check if help messages are displayed. ```APIDOC ## isHelpMessageBeingDisplayed ### Description Checks if a help message is currently being displayed on the screen. ### Method N/A (Script Function) ### Returns - **result** (bool) - True if a help message is displayed, false otherwise. ``` ```APIDOC ## showUpdateStats ### Description Controls the display of update statistics. ### Method N/A (Script Function) ### Parameters - **display** (bool) - Required - True to display, false to hide. ``` -------------------------------- ### Restart Points Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to set custom restart points for hospitals and police stations. ```APIDOC ## setExtraHospitalRestartPoint ### Description Sets a custom restart point for when the player respawns at a hospital. ### Method N/A (Script Function) ### Parameters - **X** (float) - Required - The X coordinate. - **Y** (float) - Required - The Y coordinate. - **Z** (float) - Required - The Z coordinate. - **radius** (float) - Required - The radius of the restart area. - **angle** (float) - Required - The angle of the restart point. ``` ```APIDOC ## setExtraPoliceStationRestartPoint ### Description Sets a custom restart point for when the player respawns at a police station. ### Method N/A (Script Function) ### Parameters - **X** (float) - Required - The X coordinate. - **Y** (float) - Required - The Y coordinate. - **Z** (float) - Required - The Z coordinate. - **radius** (float) - Required - The radius of the restart area. - **angle** (float) - Required - The angle of the restart point. ``` -------------------------------- ### Entry/Exit Control Source: https://wiki.blast.hk/ru/moonloader/opcodes Function to disable all entry and exit points in the game. ```APIDOC ## disableAllEntryExits ### Description Disables all entry and exit points for vehicles and buildings. ### Method N/A (Script Function) ### Parameters - **disable** (bool) - Required - True to disable, false to enable. ``` -------------------------------- ### Render Font Functions with IgnoreColorTags Source: https://wiki.blast.hk/ru/moonloader/changelog The `renderGetFontDrawTextLength` and `renderFontDrawText` functions now have an optional `ignoreColorTags` argument. ```lua renderGetFontDrawTextLength renderFontDrawText ``` -------------------------------- ### Script Execution Condition Source: https://wiki.blast.hk/ru/moonloader/changelog A new condition where a script continues running if it lacks a `main` coroutine but has event handlers, unless forcibly terminated. ```lua if not main and events then -- script continues to run end ``` -------------------------------- ### Visual Effects Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to control visual effects like heathaze. ```APIDOC ## setHeathazeEffect ### Description Enables or disables the heathaze visual effect. ### Method N/A (Script Function) ### Parameters - **enable** (bool) - Required - True to enable, false to disable. ``` -------------------------------- ### Door Control Source: https://wiki.blast.hk/ru/moonloader/opcodes Function to lock or unlock a specific door. ```APIDOC ## lockDoor ### Description Locks or unlocks a specified door. ### Method N/A (Script Function) ### Parameters - **door** (int) - Required - The ID of the door. - **lock** (bool) - Required - True to lock, false to unlock. ``` -------------------------------- ### Particle Effects Source: https://wiki.blast.hk/ru/moonloader/opcodes Function to create sparks at a specified location and direction. ```APIDOC ## addSparks ### Description Creates sparks at a given position with a specified direction and density. ### Method N/A (Script Function) ### Parameters - **posX** (float) - Required - The X coordinate of the spark origin. - **posY** (float) - Required - The Y coordinate of the spark origin. - **posZ** (float) - Required - The Z coordinate of the spark origin. - **vecX** (float) - Required - The X component of the spark direction vector. - **vecY** (float) - Required - The Y component of the spark direction vector. - **vecZ** (float) - Required - The Z component of the spark direction vector. - **density** (int) - Required - The density of the sparks. ``` -------------------------------- ### Vehicle and Cutscene Effects Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to create explosions in vehicles and manage cutscene interactions. ```APIDOC ## explodeCarInCutsceneShakeAndBits ### Description Causes a car to explode with shaking, visual effects, and sound, typically used in cutscenes. ### Method N/A (Script Function) ### Parameters - **car** (Vehicle) - Required - The vehicle to explode. - **shake** (bool) - Required - Whether to apply shaking effects. - **effect** (bool) - Required - Whether to apply visual effects. - **sound** (bool) - Required - Whether to play explosion sound. ``` ```APIDOC ## isSkipCutsceneButtonPressed ### Description Checks if the skip cutscene button has been pressed. ### Method N/A (Script Function) ### Returns - **result** (bool) - True if the skip button was pressed, false otherwise. ``` ```APIDOC ## getCutsceneOffset ### Description Retrieves the offset coordinates from the current cutscene. ### Method N/A (Script Function) ### Returns - **result** (bool) - Indicates if the offset was retrieved successfully. - **X** (float) - The X coordinate offset. - **Y** (float) - The Y coordinate offset. - **Z** (float) - The Z coordinate offset. ``` ```APIDOC ## setCutsceneModelTexture ### Description Sets a texture for a specific cutscene model. ### Method N/A (Script Function) ### Parameters - **cutsceneModel** (GxtString) - Required - The name of the cutscene model. - **textureName** (GxtString) - Required - The name of the texture to apply. ``` -------------------------------- ### Zone and Gang Wars Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions related to setting zones for gang wars and managing gang territories. ```APIDOC ## setZoneForGangWarsTraining ### Description Sets a specific zone for gang wars training. ### Method N/A (Script Function) ### Parameters - **zone** (GxtString) - Required - The name of the zone. ``` ```APIDOC ## setSpecificZoneToTriggerGangWar ### Description Designates a specific zone to trigger a gang war. ### Method N/A (Script Function) ### Parameters - **zone** (GxtString) - Required - The name of the zone. ``` ```APIDOC ## clearSpecificZonesToTriggerGangWar ### Description Clears all previously set zones that trigger gang wars. ### Method N/A (Script Function) ``` -------------------------------- ### Character Manipulation Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions for manipulating character properties and interactions. ```APIDOC ## setCharCanBeKnockedOffBike ### Description Determines if a character can be knocked off a bike. ### Method N/A (Script Function) ### Parameters - **ped** (Ped) - Required - The character to modify. - **can** (bool) - Required - Whether the character can be knocked off. ``` ```APIDOC ## setCharCoordinatesDontWarpGang ### Description Sets character coordinates without warping the gang. ### Method N/A (Script Function) ### Parameters - **ped** (Ped) - Required - The character. - **X** (float) - Required - The X coordinate. - **Y** (float) - Required - The Y coordinate. - **Z** (float) - Required - The Z coordinate. ``` ```APIDOC ## clearConversationForChar ### Description Clears any ongoing conversation for a character. ### Method N/A (Script Function) ### Parameters - **ped** (Ped) - Required - The character whose conversation should be cleared. ``` -------------------------------- ### Vision Control Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to enable or disable night vision and infrared vision for the player. ```APIDOC ## setNightVision ### Description Enables or disables night vision. ### Method N/A (Script Function) ### Parameters - **enable** (bool) - Required - Whether to enable night vision. ``` ```APIDOC ## setInfraredVision ### Description Enables or disables infrared vision. ### Method N/A (Script Function) ### Parameters - **enable** (bool) - Required - Whether to enable infrared vision. ``` -------------------------------- ### Player Gang Control Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to control the size and behavior of the player's gang. ```APIDOC ## setScriptLimitToGangSize ### Description Sets whether the script limits the gang size. ### Method N/A (Script Function) ### Parameters - **max** (bool) - Required - True to limit the gang size, false otherwise. ``` -------------------------------- ### Price Modifiers Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to add and remove price modifiers for items. ```APIDOC ## addPriceModifier ### Description Adds a price modifier to an item. ### Method N/A (Script Function) ### Parameters - **item** (int) - Required - The item ID. - **price** (int) - Required - The price modifier. ``` ```APIDOC ## removePriceModifier ### Description Removes a price modifier from an item. ### Method N/A (Script Function) ### Parameters - **item** (int) - Required - The item ID. ``` -------------------------------- ### Gang Member Control Source: https://wiki.blast.hk/ru/moonloader/opcodes Functions to control the creation and visibility of gang members. ```APIDOC ## setCreateRandomGangMembers ### Description Enables or disables the creation of random gang members. ### Method N/A (Script Function) ### Parameters - **enable** (bool) - Required - True to enable, false to disable. ``` ```APIDOC ## makePlayerGangDisappear ### Description Makes the player's gang members disappear. ### Method N/A (Script Function) ``` ```APIDOC ## makePlayerGangReappear ### Description Makes the player's gang members reappear. ### Method N/A (Script Function) ``` -------------------------------- ### Plane Control Source: https://wiki.blast.hk/ru/moonloader/opcodes Function to control the undercarriage of a plane. ```APIDOC ## setPlaneUndercarriageUp ### Description Controls whether the undercarriage of a plane is retracted or extended. ### Method N/A (Script Function) ### Parameters - **plane** (int) - Required - The ID of the plane. - **set** (bool) - Required - True to retract, false to extend. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.