# MY Multiplayer: Wiki (English) > Welcome to the MY Multiplayer wiki. On this wiki you'll find a wealth of information on using MY Multiplayer. MY Multiplayer is a multiplayer platform that lets you create, develop, and host custom servers, offering freedom and flexibility to build any kind of multiplayer experience. In MYMP (MY Multiplayer), scripts run in Lua 5.4 with LuaGLM vectors (`vec2`, `vec3`, `quat`) inside resources (`meta.xml` and `modules/`) on the `client`, `server`, or `shared` side. Every documentation guide and API entry below is available directly in Markdown (`.md`). - [Consolidated Full Documentation (English)](https://wiki.mymp.gg/en/llms-full.txt) - [Português](https://wiki.mymp.gg/pt/llms.txt) | [English](https://wiki.mymp.gg/en/llms.txt) | [Español](https://wiki.mymp.gg/es/llms.txt) ## Documentation - [Introduction](https://wiki.mymp.gg/en/docs/intro.md): Welcome to the MY Multiplayer wiki. On this wiki you'll find a wealth of information on using MY Multiplayer. - [Resource structure](https://wiki.mymp.gg/en/docs/resources.md): Folder layout of a MY Multiplayer (MYMP) resource, meta.xml manifest syntax, supported tags and file glob patterns. - [Modules and import](https://wiki.mymp.gg/en/docs/modules.md): How to split a resource's Lua code into modules under modules/ and reuse them across MY Multiplayer (MYMP) resources using import. - [server.cfg](https://wiki.mymp.gg/en/docs/server-config.md): Configuring a MY Multiplayer (MYMP) server with server.cfg: ensure and set directives, network, queue, event rate-limit and sync convars, and content.key encryption. - [Global variables](https://wiki.mymp.gg/en/docs/globals.md): Built-in Lua global variables available in every MY Multiplayer (MYMP) script and inside event handlers. - [Vectors (vec3)](https://wiki.mymp.gg/en/docs/vectors.md): Working with LuaGLM vectors (vec3 and vec2) in MY Multiplayer (MYMP) for positions, rotations and velocities, vector constructors and differences from MTA. - [Events between client and server](https://wiki.mymp.gg/en/docs/custom-events.md): How to register custom events with addEvent and send them between client and server using triggerServerEvent, triggerClientEvent and latent events in MY Multiplayer (MYMP). ## Scripting reference ### Elements - [addElementDataSubscriber (Server)](https://wiki.mymp.gg/en/addElementDataSubscriber.md): Subscribes a player to an element data key set with the "subscribe" sync mode. The player receives the current value at once and every change after that. - [createElement (Shared)](https://wiki.mymp.gg/en/createElement.md): Creates an element of a type the script makes up, with nothing in the world. It goes under the resource's dynamic element root. - [destroyElement (Shared)](https://wiki.mymp.gg/en/destroyElement.md): Destroys an element and all of its children. Before it goes, each one fires onElementDestroy on the server or onClientElementDestroy on the client. - [getAllElementData (Shared)](https://wiki.mymp.gg/en/getAllElementData.md): Reads all of an element's data at once. - [getElementAlpha (Shared)](https://wiki.mymp.gg/en/getElementAlpha.md): Reads an element's alpha, from 0 (invisible) to 255 (opaque). - [getElementAngularVelocity (Shared)](https://wiki.mymp.gg/en/getElementAngularVelocity.md): Reads how fast an element turns about each axis, per simulation step. - [getElementBoundingBox (Client)](https://wiki.mymp.gg/en/getElementBoundingBox.md): Reads the collision box of an element's model, relative to the model's origin. - [getElementByID (Shared)](https://wiki.mymp.gg/en/getElementByID.md): Finds the first element with an ID, starting at an element and going down through its children. - [getElementCastShadow (Client)](https://wiki.mymp.gg/en/getElementCastShadow.md): Tells whether an element casts a shadow. - [getElementChildren (Shared)](https://wiki.mymp.gg/en/getElementChildren.md): Lists an element's direct children, optionally only those of one type. - [getElementChildrenCount (Shared)](https://wiki.mymp.gg/en/getElementChildrenCount.md): Counts an element's direct children. - [getElementData (Shared)](https://wiki.mymp.gg/en/getElementData.md): Reads a value stored on an element. - [getElementDimension (Shared)](https://wiki.mymp.gg/en/getElementDimension.md): Reads an element's dimension, from 0 to 65535. - [getElementDistanceFromCentreOfMassToBaseOfModel (Client)](https://wiki.mymp.gg/en/getElementDistanceFromCentreOfMassToBaseOfModel.md): Reads the distance from an element's centre of mass to the base of its model. - [getElementHealth (Shared)](https://wiki.mymp.gg/en/getElementHealth.md): Reads the health of a player, ped, vehicle or object. - [getElementID (Shared)](https://wiki.mymp.gg/en/getElementID.md): Reads an element's ID, the name getElementByID looks for. - [getElementInterior (Shared)](https://wiki.mymp.gg/en/getElementInterior.md): Reads the interior an element is in. Interior 0 is the outside world. - [getElementMatrix (Shared)](https://wiki.mymp.gg/en/getElementMatrix.md): Reads an element's 4x4 matrix, built from its position and rotation. - [getElementModel (Shared)](https://wiki.mymp.gg/en/getElementModel.md): Reads the name of an element's model. - [getElementParent (Shared)](https://wiki.mymp.gg/en/getElementParent.md): Reads an element's parent in the element tree. - [getElementPosition (Shared)](https://wiki.mymp.gg/en/getElementPosition.md): Reads an element's position in the world. - [getElementRadius (Client)](https://wiki.mymp.gg/en/getElementRadius.md): Reads the radius of the collision sphere of an element's model. - [getElementRotation (Shared)](https://wiki.mymp.gg/en/getElementRotation.md): Reads an element's rotation in degrees. - [getElementsByType (Client)](https://wiki.mymp.gg/en/getElementsByType-client.md): Lists every element of a type below an element of the tree on this client. - [getElementsByType (Server)](https://wiki.mymp.gg/en/getElementsByType-server.md): Lists every element of a type below an element of the tree on the server. - [getElementsInRange (Shared)](https://wiki.mymp.gg/en/getElementsInRange.md): Lists the elements whose position is inside a sphere. - [getElementSyncer (Server)](https://wiki.mymp.gg/en/getElementSyncer.md): Tells which player syncs an element, that is, which client simulates it and sends its state to the server. - [getElementType (Shared)](https://wiki.mymp.gg/en/getElementType.md): Reads an element's type, such as "player", "vehicle" or the type given to createElement. - [getElementVelocity (Shared)](https://wiki.mymp.gg/en/getElementVelocity.md): Returns an element's velocity. - [getRootElement (Shared)](https://wiki.mymp.gg/en/getRootElement.md): Returns the root element, the top of the element tree. It is the same value as the global root. - [hasElementDataSubscriber (Server)](https://wiki.mymp.gg/en/hasElementDataSubscriber.md): Tells whether a player is subscribed to an element data key. - [isElement (Shared)](https://wiki.mymp.gg/en/isElement.md): Tells whether a value is an element that still exists. - [isElementFrozen (Shared)](https://wiki.mymp.gg/en/isElementFrozen.md): Tells whether an element is frozen. - [isElementInWater (Client)](https://wiki.mymp.gg/en/isElementInWater.md): Tells whether a ped, player or vehicle is in the water. - [isElementLocal (Client)](https://wiki.mymp.gg/en/isElementLocal.md): Tells whether an element was created by this client rather than by the server. - [isElementOnFire (Shared)](https://wiki.mymp.gg/en/isElementOnFire.md): Tells whether an element is on fire. - [isElementOnScreen (Client)](https://wiki.mymp.gg/en/isElementOnScreen.md): Tells whether an element shows on screen. - [isElementStreamable (Client)](https://wiki.mymp.gg/en/isElementStreamable.md): Tells whether an element streams in and out with distance. - [isElementStreamedIn (Client)](https://wiki.mymp.gg/en/isElementStreamedIn.md): Tells whether an element is loaded into this client's world. - [isElementSyncer (Client)](https://wiki.mymp.gg/en/isElementSyncer.md): Tells whether this client syncs a ped or vehicle for the server. - [removeElementData (Shared)](https://wiki.mymp.gg/en/removeElementData.md): Deletes a piece of data kept on an element. - [removeElementDataSubscriber (Server)](https://wiki.mymp.gg/en/removeElementDataSubscriber.md): Unsubscribes a player from an element data key. The player stops receiving that data's changes. - [setElementAlpha (Shared)](https://wiki.mymp.gg/en/setElementAlpha.md): Sets the transparency of an element and of all its children. - [setElementAngularVelocity (Shared)](https://wiki.mymp.gg/en/setElementAngularVelocity.md): Sets an element's turning speed. - [setElementCastShadow (Client)](https://wiki.mymp.gg/en/setElementCastShadow.md): Turns the shadow an element casts on or off. - [setElementData (Client)](https://wiki.mymp.gg/en/setElementData-client.md): Keeps a piece of data on an element, on this client only. - [setElementData (Server)](https://wiki.mymp.gg/en/setElementData-server.md): Keeps a piece of data on an element and, depending on sync, sends it to the players. - [setElementDimension (Shared)](https://wiki.mymp.gg/en/setElementDimension.md): Changes the dimension of an element and of all its children. - [setElementFrozen (Shared)](https://wiki.mymp.gg/en/setElementFrozen.md): Freezes or unfreezes an element and all its children. - [setElementHealth (Shared)](https://wiki.mymp.gg/en/setElementHealth.md): Sets the health of a ped, player, vehicle or object. - [setElementID (Shared)](https://wiki.mymp.gg/en/setElementID.md): Gives an element an id (a name), to find it later with getElementByID. - [setElementInterior (Shared)](https://wiki.mymp.gg/en/setElementInterior.md): Changes an element's interior. - [setElementMatrix (Shared)](https://wiki.mymp.gg/en/setElementMatrix.md): Places and turns an element from a matrix. - [setElementModel (Server)](https://wiki.mymp.gg/en/setElementModel.md): Changes the model of a ped or player, and of its children. - [setElementOnFire (Client)](https://wiki.mymp.gg/en/setElementOnFire-client.md): Sets an element on fire or puts it out on this client. - [setElementOnFire (Server)](https://wiki.mymp.gg/en/setElementOnFire-server.md): Sets an element and its children on fire, or puts them out, for every player. - [setElementParent (Shared)](https://wiki.mymp.gg/en/setElementParent.md): Makes an element a child of another in the element tree. - [setElementPosition (Shared)](https://wiki.mymp.gg/en/setElementPosition.md): Moves an element to a position in the world. - [setElementRotation (Shared)](https://wiki.mymp.gg/en/setElementRotation.md): Sets an element's 3D rotation in degrees. - [setElementStreamable (Client)](https://wiki.mymp.gg/en/setElementStreamable.md): Chooses whether an element streams in and out with distance or always stays loaded. - [setElementSyncer (Server)](https://wiki.mymp.gg/en/setElementSyncer.md): Chooses which player syncs a ped or vehicle. - [setElementVelocity (Shared)](https://wiki.mymp.gg/en/setElementVelocity.md): Sets an element's velocity. - [onClientElementDataChange (Client)](https://wiki.mymp.gg/en/onClientElementDataChange.md): Fired when a piece of an element's data changes or is removed. Cancelling the event does not undo the change: this client's data keeps the new value. - [onClientElementDestroy (Client)](https://wiki.mymp.gg/en/onClientElementDestroy.md): Fired when an element is about to be destroyed, while it still exists. - [onClientElementDimensionChange (Client)](https://wiki.mymp.gg/en/onClientElementDimensionChange.md): Fired after an element moves to another dimension. It does not fire when the dimension stays the same. - [onClientElementInteriorChange (Client)](https://wiki.mymp.gg/en/onClientElementInteriorChange.md): Fired after an element moves to another interior. It does not fire when the interior stays the same. - [onClientElementStreamIn (Client)](https://wiki.mymp.gg/en/onClientElementStreamIn.md): Fired when an element streams in on this client and comes into the game world. - [onClientElementStreamOut (Client)](https://wiki.mymp.gg/en/onClientElementStreamOut.md): Fired when an element streams out on this client and leaves the game world. The element still exists. - [onElementDataChange (Server)](https://wiki.mymp.gg/en/onElementDataChange.md): Fired when a piece of an element's data changes or is removed. Cancelling the event puts the previous value back (or removes the key if it did not exist), and the change is not sent to the players. - [onElementDestroy (Server)](https://wiki.mymp.gg/en/onElementDestroy.md): Fired when an element is about to be destroyed, while it still exists. - [onElementDimensionChange (Server)](https://wiki.mymp.gg/en/onElementDimensionChange.md): Fired after an element moves to another dimension. It does not fire when the dimension stays the same. - [onElementInteriorChange (Server)](https://wiki.mymp.gg/en/onElementInteriorChange.md): Fired after an element moves to another interior. It does not fire when the interior stays the same. - [onElementModelChange (Server)](https://wiki.mymp.gg/en/onElementModelChange.md): Fired after setElementModel changes an element's model. Cancelling the event puts the previous model back, and setElementModel returns false. - [onElementStartSync (Server)](https://wiki.mymp.gg/en/onElementStartSync.md): Fired when a player starts syncing a ped or vehicle. - [onElementStopSync (Server)](https://wiki.mymp.gg/en/onElementStopSync.md): Fired when a player stops syncing a ped or vehicle. ### Attachments - [attachElements (Shared)](https://wiki.mymp.gg/en/attachElements.md): Hangs one element on another. From then on it follows the target until it is detached. - [detachElements (Shared)](https://wiki.mymp.gg/en/detachElements.md): Detaches an element from the element it hangs on. It stays where it is. - [getAttachedElements (Shared)](https://wiki.mymp.gg/en/getAttachedElements.md): Lists the elements attached directly to an element. - [getElementAttachedOffsets (Shared)](https://wiki.mymp.gg/en/getElementAttachedOffsets.md): Reads the offset, rotation and socket an element is attached with. - [getElementAttachedTo (Shared)](https://wiki.mymp.gg/en/getElementAttachedTo.md): Tells which element an element is attached to. - [isElementAttached (Shared)](https://wiki.mymp.gg/en/isElementAttached.md): Tells whether an element is attached to another. - [setElementAttachedOffsets (Shared)](https://wiki.mymp.gg/en/setElementAttachedOffsets.md): Changes the offset, the rotation and, if asked, the socket of an attached element. - [onClientElementAttach (Client)](https://wiki.mymp.gg/en/onClientElementAttach.md): Fired when a client script calls attachElements, before the element is attached. Cancelling the event stops the attachment and makes attachElements return false. - [onClientElementDetach (Client)](https://wiki.mymp.gg/en/onClientElementDetach.md): Fired before an element is detached by a client script, by detachElements or by attachElements moving it to another target. Cancelling the event keeps the element attached. - [onElementAttach (Server)](https://wiki.mymp.gg/en/onElementAttach.md): Fired when the server calls attachElements, before the element is attached. Cancelling the event stops the attachment and makes attachElements return false. - [onElementDetach (Server)](https://wiki.mymp.gg/en/onElementDetach.md): Fired before an element is detached on the server, by detachElements or by attachElements moving it to another target. Cancelling the event keeps the element attached. ### Components and bones - [getElementBoneMatrix (Client)](https://wiki.mymp.gg/en/getElementBoneMatrix.md): Returns the world matrix of a ped's or object's bone. - [getElementBonePosition (Client)](https://wiki.mymp.gg/en/getElementBonePosition.md): Returns the world position of a ped's or object's bone. - [getElementBoneQuaternion (Client)](https://wiki.mymp.gg/en/getElementBoneQuaternion.md): Returns the orientation of a ped's or object's bone relative to its parent bone, as a quaternion. - [getElementBoneRotation (Client)](https://wiki.mymp.gg/en/getElementBoneRotation.md): Returns the rotation of a ped's or object's bone relative to its parent bone, in degrees. - [getElementBoneScale (Client)](https://wiki.mymp.gg/en/getElementBoneScale.md): Returns the scale of a ped's or object's bone. - [getElementComponentPosition (Client)](https://wiki.mymp.gg/en/getElementComponentPosition.md): Returns the position of a vehicle's or object's component. - [getElementComponentRotation (Client)](https://wiki.mymp.gg/en/getElementComponentRotation.md): Returns the rotation of a vehicle's or object's component, in degrees. - [getElementComponents (Client)](https://wiki.mymp.gg/en/getElementComponents.md): Lists a vehicle's or object's components: the named frames of its model. - [getElementComponentVisible (Client)](https://wiki.mymp.gg/en/getElementComponentVisible.md): Tells whether a vehicle's or object's component is visible. - [getPedBonePosition (Client)](https://wiki.mymp.gg/en/getPedBonePosition.md): Returns the world position of a ped's bone. - [resetElementComponentPosition (Client)](https://wiki.mymp.gg/en/resetElementComponentPosition.md): Puts a vehicle's or object's component back at the model's own position, undoing setElementComponentPosition. - [resetElementComponentRotation (Client)](https://wiki.mymp.gg/en/resetElementComponentRotation.md): Puts a vehicle's or object's component back at the model's own rotation, undoing setElementComponentRotation. - [setElementBoneMatrix (Client)](https://wiki.mymp.gg/en/setElementBoneMatrix.md): Sets the world matrix of a ped's or object's bone: position, orientation and scale at once. The change applies on this client only. - [setElementBonePosition (Client)](https://wiki.mymp.gg/en/setElementBonePosition.md): Moves a ped's or object's bone to a world position, keeping its orientation. The change applies on this client only. - [setElementBoneQuaternion (Client)](https://wiki.mymp.gg/en/setElementBoneQuaternion.md): Sets the orientation of a ped's or object's bone relative to its parent bone, as a quaternion. The change applies on this client only. - [setElementBoneRotation (Client)](https://wiki.mymp.gg/en/setElementBoneRotation.md): Turns a ped's or object's bone relative to its parent bone. The change applies on this client only. - [setElementBoneScale (Client)](https://wiki.mymp.gg/en/setElementBoneScale.md): Changes the scale of a ped's or object's bone. The change applies on this client only. - [setElementComponentPosition (Client)](https://wiki.mymp.gg/en/setElementComponentPosition.md): Moves a vehicle's or object's component. The change applies on this client only. - [setElementComponentRotation (Client)](https://wiki.mymp.gg/en/setElementComponentRotation.md): Turns a vehicle's or object's component. The change applies on this client only. - [setElementComponentVisible (Client)](https://wiki.mymp.gg/en/setElementComponentVisible.md): Shows or hides a vehicle's or object's component. The change applies on this client only. ### Events - [addEvent (Shared)](https://wiki.mymp.gg/en/addEvent.md): Registers a new event under this name. Only then can handlers be added to it and can it be triggered. - [addEventHandler (Shared)](https://wiki.mymp.gg/en/addEventHandler.md): Makes a function run whenever the event happens on the given element or, with propagate, on any of its descendants. - [cancelEvent (Shared)](https://wiki.mymp.gg/en/cancelEvent.md): Marks the running event as cancelled. What cancelling prevents depends on the event. - [cancelLatentEvent (Client)](https://wiki.mymp.gg/en/cancelLatentEvent-client.md): Stops a latent event this client is sending to the server. The server drops what it had received and the event is not triggered. - [cancelLatentEvent (Server)](https://wiki.mymp.gg/en/cancelLatentEvent-server.md): Stops a latent event the server is sending to a player. The client drops what it had received and the event is not triggered there. - [getCancelReason (Shared)](https://wiki.mymp.gg/en/getCancelReason.md): Gives the reason passed to cancelEvent in the last event that finished running on this side. - [getEventHandlers (Shared)](https://wiki.mymp.gg/en/getEventHandlers.md): Lists the functions this resource put on an element's event with addEventHandler. - [getLatentEventHandles (Client)](https://wiki.mymp.gg/en/getLatentEventHandles-client.md): Lists the latent events this client is still sending to the server. - [getLatentEventHandles (Server)](https://wiki.mymp.gg/en/getLatentEventHandles-server.md): Lists the latent events the server is still sending to a player. - [getLatentEventStatus (Client)](https://wiki.mymp.gg/en/getLatentEventStatus-client.md): Tells how a latent event this client is sending to the server is going. - [getLatentEventStatus (Server)](https://wiki.mymp.gg/en/getLatentEventStatus-server.md): Tells how a latent event the server is sending to a player is going. - [removeEventHandler (Shared)](https://wiki.mymp.gg/en/removeEventHandler.md): Takes a function off an element's event, where addEventHandler put it. - [triggerClientEvent (Server)](https://wiki.mymp.gg/en/triggerClientEvent.md): Sends an event to the players' clients, which trigger it on source. The function returns before the clients receive it. - [triggerEvent (Shared)](https://wiki.mymp.gg/en/triggerEvent.md): Triggers an event on this side, on source. The element's own handlers and its ancestors' propagating ones are called right away, before the function returns. - [triggerLatentClientEvent (Server)](https://wiki.mymp.gg/en/triggerLatentClientEvent.md): Sends an event to the players' clients bit by bit, in the background, at no more than bandwidth bytes a second per player. Meant for large data that must not hold up the rest of the traffic. - [triggerLatentServerEvent (Client)](https://wiki.mymp.gg/en/triggerLatentServerEvent.md): Sends an event to the server bit by bit, in the background, at no more than bandwidth bytes a second. Meant for large data that must not hold up the rest of the traffic. - [triggerServerEvent (Client)](https://wiki.mymp.gg/en/triggerServerEvent.md): Sends an event to the server, which triggers it on source there. The function returns before the server receives it. - [wasEventCancelled (Shared)](https://wiki.mymp.gg/en/wasEventCancelled.md): Tells whether the last event that finished running on this side was cancelled. - [onPlayerTriggerEventThreshold (Server)](https://wiki.mymp.gg/en/onPlayerTriggerEventThreshold.md): Fired when a player calls triggerServerEvent or triggerLatentServerEvent too many times in an interval. The server does nothing else: what to do is up to the scripts. ### Keyboard - [addCommandHandler (Shared)](https://wiki.mymp.gg/en/addCommandHandler.md): Registers a function that runs when the command is typed in the console. The arguments arrive as space-separated strings. - [bindKey (Shared)](https://wiki.mymp.gg/en/bindKey.md): Binds a key to a function or a command. The function runs when the key is pressed, released or both. - [executeCommandHandler (Client)](https://wiki.mymp.gg/en/executeCommandHandler-client.md): Runs the handlers client scripts registered for a command, as if it had been typed. - [executeCommandHandler (Server)](https://wiki.mymp.gg/en/executeCommandHandler-server.md): Runs the handlers server scripts registered for a command, as if the player had typed it. - [getBoundKeys (Client)](https://wiki.mymp.gg/en/getBoundKeys.md): Lists the keys bound to a command on this client. - [getCommandsBoundToKey (Client)](https://wiki.mymp.gg/en/getCommandsBoundToKey.md): Lists the commands bound to a key on this client. - [getCursorPosition (Client)](https://wiki.mymp.gg/en/getCursorPosition.md): Reads where the cursor is on the screen and the world point it points at. - [getFunctionsBoundToKey (Shared)](https://wiki.mymp.gg/en/getFunctionsBoundToKey.md): Lists the functions this resource bound to a key. - [getKeyBoundToCommand (Client)](https://wiki.mymp.gg/en/getKeyBoundToCommand.md): Tells which key runs a command on this client. - [getKeyBoundToFunction (Shared)](https://wiki.mymp.gg/en/getKeyBoundToFunction.md): Tells which key this resource bound a function to. - [getKeyState (Client)](https://wiki.mymp.gg/en/getKeyState.md): Tells whether a key is held down right now. - [isCursorShowing (Client)](https://wiki.mymp.gg/en/isCursorShowing.md): Tells whether the mouse cursor is showing. - [isKeyBound (Shared)](https://wiki.mymp.gg/en/isKeyBound.md): Tells whether this resource bound a function to a key. - [removeCommandHandler (Shared)](https://wiki.mymp.gg/en/removeCommandHandler.md): Removes the handler this resource registered for a command. - [setCursorAlpha (Client)](https://wiki.mymp.gg/en/setCursorAlpha.md): Changes the mouse cursor's opacity. - [setCursorPosition (Client)](https://wiki.mymp.gg/en/setCursorPosition.md): Moves the cursor to a point on the screen. - [showCursor (Client)](https://wiki.mymp.gg/en/showCursor.md): Shows or hides the mouse cursor for this resource. - [unbindKey (Shared)](https://wiki.mymp.gg/en/unbindKey.md): Removes binds this resource made on a key. - [onClientClick (Client)](https://wiki.mymp.gg/en/onClientClick.md): Fired when a mouse button is pressed or released while the cursor is showing. - [onClientCursorMove (Client)](https://wiki.mymp.gg/en/onClientCursorMove.md): Fired when the mouse moves. - [onClientDoubleClick (Client)](https://wiki.mymp.gg/en/onClientDoubleClick.md): Fired when a mouse button is pressed twice in a row while the cursor is showing. - [onClientKey (Client)](https://wiki.mymp.gg/en/onClientKey.md): Fired when a key or mouse button is pressed or released. Cancelling the event stops that key's binds and, on a press, hides the key from the game while it is held. - [onPlayerCommand (Server)](https://wiki.mymp.gg/en/onPlayerCommand.md): Fired when a player sends a command to the server, before it runs. Cancelling the event stops the command. ### Resources and modules - [call (Shared)](https://wiki.mymp.gg/en/call.md): Calls a function another resource exports in its meta.xml and returns what it returns. - [deleteResource (Server)](https://wiki.mymp.gg/en/deleteResource.md): Takes a stopped resource out of the resource list and moves its folder or archive into the trash folder of the server's resource cache. - [getResourceDynamicElementRoot (Shared)](https://wiki.mymp.gg/en/getResourceDynamicElementRoot.md): Returns the element under which the elements the resource creates by script are placed. It is a child of the resource's element and is called dynamic. - [getResourceExportedFunctions (Shared)](https://wiki.mymp.gg/en/getResourceExportedFunctions.md): Lists the names of the functions a resource exports in its meta.xml, on any side. - [getResourceFiles (Shared)](https://wiki.mymp.gg/en/getResourceFiles.md): Lists the files a resource declares with in its meta.xml, with patterns already expanded, in alphabetical order. - [getResourceFromName (Shared)](https://wiki.mymp.gg/en/getResourceFromName.md): Finds a resource by name. - [getResourceInfo (Server)](https://wiki.mymp.gg/en/getResourceInfo.md): Reads an attribute of the tag in a resource's meta.xml, such as author or version. - [getResourceName (Shared)](https://wiki.mymp.gg/en/getResourceName.md): Returns a resource's name. - [getResourceRootElement (Shared)](https://wiki.mymp.gg/en/getResourceRootElement.md): Returns a resource's root element, the same as that resource's resourceRoot global. - [getResources (Shared)](https://wiki.mymp.gg/en/getResources.md): Lists the resources running on this side. - [getResourceState (Shared)](https://wiki.mymp.gg/en/getResourceState.md): Tells which state a resource is in. - [getThisResource (Shared)](https://wiki.mymp.gg/en/getThisResource.md): Returns the resource the script is running in. - [import (Shared)](https://wiki.mymp.gg/en/import.md): Runs a resource's module in this script's Lua state, once per state, and gives back what it returned. The globals the module set become this script's. - [refreshResources (Shared)](https://wiki.mymp.gg/en/refreshResources.md): Reads the resources folder again: adds the new resources, removes the ones that are gone (stopping those that ran) and logs which running resources changed on disk. - [restartResource (Shared)](https://wiki.mymp.gg/en/restartResource.md): Asks to stop and start again a running resource. It happens on the next resource pulse, not during the call, and the resource keeps its place in the start order. - [startResource (Shared)](https://wiki.mymp.gg/en/startResource.md): Starts a resource right away, after starting the resources it includes with in its meta.xml. - [stopResource (Shared)](https://wiki.mymp.gg/en/stopResource.md): Asks to stop a running resource. It stops on the next resource pulse, not during the call. - [onClientResourceStart (Client)](https://wiki.mymp.gg/en/onClientResourceStart.md): Fired when a resource has finished starting, after its scripts have run. - [onClientResourceStop (Client)](https://wiki.mymp.gg/en/onClientResourceStop.md): Fired when a resource is about to stop, while its scripts and elements still exist. - [onResourcePreStart (Server)](https://wiki.mymp.gg/en/onResourcePreStart.md): Fired when a resource is starting, before its scripts run. Cancelling the event keeps the resource from starting. - [onResourceStart (Server)](https://wiki.mymp.gg/en/onResourceStart.md): Fired when a resource has finished starting, after its scripts and maps have run. - [onResourceStop (Server)](https://wiki.mymp.gg/en/onResourceStop.md): Fired when a resource is about to stop, while its scripts and elements still exist. ### Timers and async - [async.all (Shared)](https://wiki.mymp.gg/en/async.all.md): Runs every function in the list in its own thread, all at once, and makes the current thread wait until they have all ended. - [async.cancel (Shared)](https://wiki.mymp.gg/en/async.cancel.md): Stops an async thread of this resource. A paused thread ends at once; called from the thread itself, it stops right there. - [async.map (Shared)](https://wiki.mymp.gg/en/async.map.md): Calls handler(value, key) for every entry of the table, in pairs order, and gathers the results that are not nil into a list. The handler may pause with async.wait. - [async.mutex (Shared)](https://wiki.mymp.gg/en/async.mutex.md): Runs a function in a new async thread, as async.thread does, but does not start while another thread started from the same line of code, with the same key, is still running. - [async.promise (Shared)](https://wiki.mymp.gg/en/async.promise.md): Runs handler(resolve, reject) in a new thread and makes the current thread wait until it calls resolve or reject. Meant for waiting on a function that answers through a callback. - [async.status (Shared)](https://wiki.mymp.gg/en/async.status.md): Tells what state an async thread of this resource is in. - [async.thread (Shared)](https://wiki.mymp.gg/en/async.thread.md): Runs a function in a new async thread, right away. The call returns when the function ends or first pauses, as with async.wait. - [async.wait (Shared)](https://wiki.mymp.gg/en/async.wait.md): Pauses the current async thread for ms milliseconds. The rest of the game keeps running. - [async.yield (Shared)](https://wiki.mymp.gg/en/async.yield.md): Pauses the current async thread until the scripts' next update, to split long work into pieces. - [getTimerDetails (Shared)](https://wiki.mymp.gg/en/getTimerDetails.md): Reads a timer's state: how long is left, how many repeats remain and its interval. - [getTimers (Shared)](https://wiki.mymp.gg/en/getTimers.md): Lists the calling resource's active timers. - [isTimer (Shared)](https://wiki.mymp.gg/en/isTimer.md): Tells whether a timer still exists in this resource. - [killTimer (Shared)](https://wiki.mymp.gg/en/killTimer.md): Cancels a timer before it ends. - [resetTimer (Shared)](https://wiki.mymp.gg/en/resetTimer.md): Starts a timer's countdown over, with the same interval. The repeats left do not change. - [setTimer (Shared)](https://wiki.mymp.gg/en/setTimer.md): Calls a function after an interval, once or repeatedly. - [setTimerPaused (Shared)](https://wiki.mymp.gg/en/setTimerPaused.md): Pauses or resumes a timer. While paused it keeps the time it had left and is not called. ### Convars - [getConvar (Shared)](https://wiki.mymp.gg/en/getConvar.md): Reads a convar as text. On a client, a convar the server syncs comes before the client's own. - [getConvarInt (Shared)](https://wiki.mymp.gg/en/getConvarInt.md): Reads a convar as an integer. - [setConvar (Client)](https://wiki.mymp.gg/en/setConvar-client.md): Sets a convar on this client only. It is never sent to the server. With persist, the value is kept for this server and comes back in the next session. - [setConvar (Server)](https://wiki.mymp.gg/en/setConvar-server.md): Sets a convar on the server, creating it if it does not exist. With synced, the value goes to every client, including those who join later, and their getConvar reads it. ### Files - [fileClose (Shared)](https://wiki.mymp.gg/en/fileClose.md): Closes a file, writing what is left, and destroys its element. - [fileCopy (Shared)](https://wiki.mymp.gg/en/fileCopy.md): Copies a file, possibly from another resource, into the calling resource. Folders missing at the destination are created. - [fileCreate (Shared)](https://wiki.mymp.gg/en/fileCreate.md): Creates an empty file and opens it for reading and writing. A file that already exists is wiped and made again; missing folders are created. - [fileDelete (Shared)](https://wiki.mymp.gg/en/fileDelete.md): Deletes a file of the calling resource. - [fileExists (Shared)](https://wiki.mymp.gg/en/fileExists.md): Tells whether a path is a file. It does the same as pathIsFile. - [fileFlush (Shared)](https://wiki.mymp.gg/en/fileFlush.md): Writes to disk what was written to the file and is still in memory. - [fileGetContents (Shared)](https://wiki.mymp.gg/en/fileGetContents.md): Reads a whole file at once, without opening it. - [fileGetPath (Shared)](https://wiki.mymp.gg/en/fileGetPath.md): Returns an open file's path. - [fileGetPos (Shared)](https://wiki.mymp.gg/en/fileGetPos.md): Returns a file's current read and write position. - [fileGetSize (Shared)](https://wiki.mymp.gg/en/fileGetSize.md): Returns an open file's size. - [fileIsEOF (Shared)](https://wiki.mymp.gg/en/fileIsEOF.md): Tells whether a file's position has reached its end. - [fileOpen (Shared)](https://wiki.mymp.gg/en/fileOpen.md): Opens a file that already exists, with the position at its start. - [fileRead (Shared)](https://wiki.mymp.gg/en/fileRead.md): Reads bytes from a file at the current position and moves the position on. - [fileRename (Shared)](https://wiki.mymp.gg/en/fileRename.md): Renames or moves a file within the calling resource. Folders missing at the destination are created. - [fileSetPos (Shared)](https://wiki.mymp.gg/en/fileSetPos.md): Changes a file's read and write position. - [fileWrite (Shared)](https://wiki.mymp.gg/en/fileWrite.md): Writes one or more texts to a file, at the current position. - [pathIsDirectory (Shared)](https://wiki.mymp.gg/en/pathIsDirectory.md): Tells whether a path is a folder. - [pathIsFile (Shared)](https://wiki.mymp.gg/en/pathIsFile.md): Tells whether a path is a file. It does the same as fileExists. - [pathListDir (Shared)](https://wiki.mymp.gg/en/pathListDir.md): Lists what a folder holds. ### Data and utilities - [decodeString (Shared)](https://wiki.mymp.gg/en/decodeString.md): Decodes or decrypts a text encodeString produced. - [encodeString (Shared)](https://wiki.mymp.gg/en/encodeString.md): Encodes or encrypts a text with an algorithm: TEA, AES-128, RSA, Base64, Base32 or zlib. - [fromJSON (Shared)](https://wiki.mymp.gg/en/fromJSON.md): Turns JSON text into a Lua value. It is the same function as json.decode. - [getDistanceBetweenPoints2D (Shared)](https://wiki.mymp.gg/en/getDistanceBetweenPoints2D.md): Measures the distance between two points on the horizontal plane, ignoring height. - [getDistanceBetweenPoints3D (Shared)](https://wiki.mymp.gg/en/getDistanceBetweenPoints3D.md): Measures the straight-line distance between two points in space. - [getEasingValue (Shared)](https://wiki.mymp.gg/en/getEasingValue.md): Works out an easing curve's value at a point of the progress. - [getRealTime (Shared)](https://wiki.mymp.gg/en/getRealTime.md): Returns the computer's real date and time, in the local time zone. - [getTickCount (Shared)](https://wiki.mymp.gg/en/getTickCount.md): Returns how many milliseconds have passed since scripts started running on this side. - [getVersion (Shared)](https://wiki.mymp.gg/en/getVersion.md): Returns information about the game's and Lua's versions. - [hash (Shared)](https://wiki.mymp.gg/en/hash.md): Hashes a text: MD5, SHA-1, SHA-2 or an HMAC. - [interpolateBetween (Shared)](https://wiki.mymp.gg/en/interpolateBetween.md): Interpolates between two sets of three numbers along an easing curve. - [isnan (Shared)](https://wiki.mymp.gg/en/isnan.md): Tells whether a value is the special number NaN (not a number). - [json.decode (Shared)](https://wiki.mymp.gg/en/json.decode.md): Turns JSON text into a Lua value. It is the same function as fromJSON. - [json.encode (Shared)](https://wiki.mymp.gg/en/json.encode.md): Turns a Lua value into JSON text. It is the same function as toJSON. - [rgb (Shared)](https://wiki.mymp.gg/en/rgb.md): Packs a colour's components into a single ARGB number. It is the same function as tocolor. - [rgba (Shared)](https://wiki.mymp.gg/en/rgba.md): Packs a colour's components into a single ARGB number, with the opacity from 0 to 1. - [split (Shared)](https://wiki.mymp.gg/en/split.md): Splits a text into pieces at the separators. - [tocolor (Shared)](https://wiki.mymp.gg/en/tocolor.md): Packs a colour's components into a single ARGB number. It is the same function as rgb. - [toJSON (Shared)](https://wiki.mymp.gg/en/toJSON.md): Turns a Lua value into JSON text. It is the same function as json.encode. ### Output and debugging - [createTrayNotification (Client)](https://wiki.mymp.gg/en/createTrayNotification.md): Shows a system notification in the Windows tray, while the game is not focused. - [outputDebugString (Shared)](https://wiki.mymp.gg/en/outputDebugString.md): Writes a line to this side's script log, as an error, a warning or a message. - [outputServerLog (Shared)](https://wiki.mymp.gg/en/outputServerLog.md): Writes a message to this side's log, with the resource's name in front. - [print (Shared)](https://wiki.mymp.gg/en/print.md): Writes the values given to the script log as a message, separated by tabs. - [setClipboard (Client)](https://wiki.mymp.gg/en/setClipboard.md): Copies a text to the player's computer clipboard. - [onClientDebugMessage (Client)](https://wiki.mymp.gg/en/onClientDebugMessage.md): Fired on this client for every script line that goes to the log: errors, warnings and messages. - [onDebugMessage (Server)](https://wiki.mymp.gg/en/onDebugMessage.md): Fired on the server for every script line that goes to the log: errors, warnings and messages. ### Players and accounts - [getMaxPlayers (Server)](https://wiki.mymp.gg/en/getMaxPlayers.md): Returns how many players the server takes at once. - [getPlayerAccount (Server)](https://wiki.mymp.gg/en/getPlayerAccount.md): Returns the MYMP account the player joined with. - [getPlayerCount (Server)](https://wiki.mymp.gg/en/getPlayerCount.md): Returns how many players are on the server. - [getPlayerFromName (Server)](https://wiki.mymp.gg/en/getPlayerFromName.md): Finds a player by exact name, case sensitive. - [getPlayerIdentifier (Server)](https://wiki.mymp.gg/en/getPlayerIdentifier.md): Returns one of the player's identifiers of a type, such as steam or discord. - [getPlayerIdentifiers (Server)](https://wiki.mymp.gg/en/getPlayerIdentifiers.md): Lists all of the player's identifiers, each as type:value, for example steam:110000112345678 and discord:80351110224678912. - [getPlayerIP (Server)](https://wiki.mymp.gg/en/getPlayerIP.md): Returns the IP address the player is connected from, without the port. - [getPlayerName (Server)](https://wiki.mymp.gg/en/getPlayerName.md): Returns the player's name. On a server with a server_key, it is the MYMP account name as Name#Tag. - [getPlayerPing (Client)](https://wiki.mymp.gg/en/getPlayerPing-client.md): Returns a player's ping. For the local player, it is this client's ping to the server; for the others, what the server reported about them. - [getPlayerPing (Server)](https://wiki.mymp.gg/en/getPlayerPing-server.md): Returns the player's ping to the server, as measured by the connection. - [getPlayers (Server)](https://wiki.mymp.gg/en/getPlayers.md): Lists every player on the server. - [getQueuePriority (Server)](https://wiki.mymp.gg/en/getQueuePriority.md): Reads an account's priority in a full server's queue. - [getRandomPlayer (Server)](https://wiki.mymp.gg/en/getRandomPlayer.md): Picks a player on the server at random. - [isPlayerSpawned (Server)](https://wiki.mymp.gg/en/isPlayerSpawned.md): Tells whether the player has been placed in the world by spawnPlayer. - [kickPlayer (Server)](https://wiki.mymp.gg/en/kickPlayer.md): Disconnects a player from the server with a reason. - [playSoundFrontEnd (Server)](https://wiki.mymp.gg/en/playSoundFrontEnd-server.md): Plays a game interface sound for a player, or for every player inside an element, such as root. - [setMaxPlayers (Server)](https://wiki.mymp.gg/en/setMaxPlayers.md): Changes how many players the server takes at once. - [setQueuePriority (Server)](https://wiki.mymp.gg/en/setQueuePriority.md): Sets an account's priority in a full server's queue. A higher priority goes first. - [spawnPlayer (Server)](https://wiki.mymp.gg/en/spawnPlayer.md): Places the player in the world, with health at 100, no armour, in interior 0 and with no weapons. - [onPlayerConnect (Server)](https://wiki.mymp.gg/en/onPlayerConnect.md): Fired when a connection is about to be admitted, before the player exists. Cancelling the event refuses it. - [onPlayerJoin (Server)](https://wiki.mymp.gg/en/onPlayerJoin.md): Fired when a player has finished joining and has received the server's initial state. - [onPlayerQueue (Server)](https://wiki.mymp.gg/en/onPlayerQueue.md): Fired when an account is about to join the queue of a full server. Cancelling the event refuses it. - [onPlayerQuit (Server)](https://wiki.mymp.gg/en/onPlayerQuit.md): Fired when a player leaves the server, before their element is destroyed. - [onPlayerSpawn (Server)](https://wiki.mymp.gg/en/onPlayerSpawn.md): Fired after spawnPlayer spawns a player. ### Peds - [canPedBeKnockedOffBike (Client)](https://wiki.mymp.gg/en/canPedBeKnockedOffBike.md): Tells whether a ped can be knocked off a bike or motorbike in a crash. - [createPed (Client)](https://wiki.mymp.gg/en/createPed-client.md): Creates a ped that exists on this client only. - [createPed (Server)](https://wiki.mymp.gg/en/createPed-server.md): Creates a ped on the server, seen by every player. - [getPedArmour (Server)](https://wiki.mymp.gg/en/getPedArmour.md): Gets the armour of a ped or player. - [getPedBikeControl (Client)](https://wiki.mymp.gg/en/getPedBikeControl.md): Gets a ped's skill at riding bikes and motorbikes. - [getPedCyclePower (Client)](https://wiki.mymp.gg/en/getPedCyclePower.md): Gets how hard a ped pedals a bicycle. - [getPedJumpPower (Client)](https://wiki.mymp.gg/en/getPedJumpPower.md): Gets how strongly a ped jumps. - [getPedMeleeStrength (Client)](https://wiki.mymp.gg/en/getPedMeleeStrength.md): Gets how hard a ped hits in melee. - [getPedMoveState (Client)](https://wiki.mymp.gg/en/getPedMoveState.md): Tells how a ped on foot is moving. - [getPedOccupiedVehicle (Shared)](https://wiki.mymp.gg/en/getPedOccupiedVehicle.md): Gets the vehicle a ped or player is in. - [getPedOccupiedVehicleSeat (Shared)](https://wiki.mymp.gg/en/getPedOccupiedVehicleSeat.md): Gets the seat a ped or player takes in its vehicle. - [getPedSimplestTask (Client)](https://wiki.mymp.gg/en/getPedSimplestTask.md): Gets the simplest task the ped is running right now. - [getPedStrafePower (Client)](https://wiki.mymp.gg/en/getPedStrafePower.md): Gets how a ped speeds up when strafing while fighting or aiming a gun. - [getPedTask (Client)](https://wiki.mymp.gg/en/getPedTask.md): Gets the task a ped runs in a slot and all its subtasks. - [getPedWeapon (Server)](https://wiki.mymp.gg/en/getPedWeapon.md): Gets the weapon a ped or player is holding. - [giveWeapon (Server)](https://wiki.mymp.gg/en/giveWeapon.md): Gives a weapon with ammo to a ped or player. - [isPedDead (Server)](https://wiki.mymp.gg/en/isPedDead.md): Tells whether a ped or player is dead. - [isPedDoingTask (Client)](https://wiki.mymp.gg/en/isPedDoingTask.md): Tells whether a ped is running a task, in any slot and at any subtask level. - [isPedDucked (Shared)](https://wiki.mymp.gg/en/isPedDucked.md): Tells whether a ped or player is crouching. - [isPedInVehicle (Shared)](https://wiki.mymp.gg/en/isPedInVehicle.md): Tells whether a ped or player is in a vehicle. - [isPedInWater (Shared)](https://wiki.mymp.gg/en/isPedInWater.md): Tells whether a ped or player is in the water. - [isPedOnGround (Shared)](https://wiki.mymp.gg/en/isPedOnGround.md): Tells whether a ped or player is on the ground. - [isPedUsingDoubleWeapons (Client)](https://wiki.mymp.gg/en/isPedUsingDoubleWeapons.md): Tells whether a ped also holds a copy of its weapon in the left hand. - [killPedTask (Client)](https://wiki.mymp.gg/en/killPedTask.md): Removes the task a ped runs in a slot. - [removePedFromVehicle (Shared)](https://wiki.mymp.gg/en/removePedFromVehicle.md): Takes a ped or player out of its vehicle at once, with no animation. - [setPedArmour (Server)](https://wiki.mymp.gg/en/setPedArmour.md): Sets the armour of a ped or player and sends it to the clients. - [setPedBikeControl (Client)](https://wiki.mymp.gg/en/setPedBikeControl.md): Sets a ped's skill at riding bikes and motorbikes. - [setPedCanBeKnockedOffBike (Client)](https://wiki.mymp.gg/en/setPedCanBeKnockedOffBike.md): Sets whether a ped can be knocked off a bike or motorbike in a crash. - [setPedCyclePower (Client)](https://wiki.mymp.gg/en/setPedCyclePower.md): Sets how hard a ped pedals a bicycle. - [setPedDoubleWeapons (Client)](https://wiki.mymp.gg/en/setPedDoubleWeapons.md): Sets whether a ped also holds a copy of its weapon in the left hand. - [setPedEnterVehicle (Client)](https://wiki.mymp.gg/en/setPedEnterVehicle.md): Makes a ped walk to a vehicle and get in, as if the player pressed the enter key. - [setPedExitVehicle (Client)](https://wiki.mymp.gg/en/setPedExitVehicle.md): Makes a ped get out of its vehicle through the door, with the exit animation. - [setPedJumpPower (Client)](https://wiki.mymp.gg/en/setPedJumpPower.md): Sets how strongly a ped jumps. - [setPedMeleeStrength (Client)](https://wiki.mymp.gg/en/setPedMeleeStrength.md): Sets how hard a ped hits in melee. - [setPedStrafePower (Client)](https://wiki.mymp.gg/en/setPedStrafePower.md): Sets how a ped speeds up when strafing while fighting or aiming a gun. - [warpPedIntoVehicle (Shared)](https://wiki.mymp.gg/en/warpPedIntoVehicle.md): Puts a ped or player straight into a vehicle seat, with no animation. - [onClientPedStep (Client)](https://wiki.mymp.gg/en/onClientPedStep.md): Fired on each step of a ped or player, when the foot touches the ground. - [onClientPedsProcessed (Client)](https://wiki.mymp.gg/en/onClientPedsProcessed.md): Fired every frame after peds and objects have been animated, before they are presented and drawn. ### Controls - [getControlState (Client)](https://wiki.mymp.gg/en/getControlState-client.md): Tells whether one of a ped's controls is pressed, such as forwards, fire or accelerate. - [getControlState (Server)](https://wiki.mymp.gg/en/getControlState-server.md): Tells whether a player is pressing a control, going by the keys their client last sent. - [getPedAnalogControlState (Client)](https://wiki.mymp.gg/en/getPedAnalogControlState.md): Tells how far one of a ped's controls is pressed, from 0 to 1. It is meant for analog controls such as walking, steering and accelerating. - [getPedCameraRotation (Client)](https://wiki.mymp.gg/en/getPedCameraRotation.md): Tells where a ped's camera faces, in degrees. On the local player it is the game camera; on a remote player, the one that came over the network; on a ped, the one a script set. - [getPedContactElement (Client)](https://wiki.mymp.gg/en/getPedContactElement.md): Returns the vehicle or object a ped is standing on. - [getPedControlState (Client)](https://wiki.mymp.gg/en/getPedControlState.md): Tells whether one of a ped's controls is pressed, such as forwards, fire or accelerate. - [isControlEnabled (Client)](https://wiki.mymp.gg/en/isControlEnabled-client.md): Tells whether one of the local player's controls is on. - [isControlEnabled (Server)](https://wiki.mymp.gg/en/isControlEnabled-server.md): Tells whether one of a player's controls is on, going by what the server sent to their client. - [setControlState (Client)](https://wiki.mymp.gg/en/setControlState-client.md): Presses or releases one of a ped's controls as if it were a key, for example to make it walk, jump or shoot. - [setControlState (Server)](https://wiki.mymp.gg/en/setControlState-server.md): Presses or releases one of a player's controls as if it were a key. The order goes to their client, which applies it as setControlState on the local player. - [setPedAnalogControlState (Client)](https://wiki.mymp.gg/en/setPedAnalogControlState.md): Presses one of a ped's analog controls only partly, for example to make it walk slowly or steer gently. - [setPedCameraRotation (Client)](https://wiki.mymp.gg/en/setPedCameraRotation.md): Changes where a ped's camera faces. On the local player it turns the game camera; on a ped it is the direction it looks and aims. - [setPedControlState (Client)](https://wiki.mymp.gg/en/setPedControlState.md): Presses or releases one of a ped's controls as if it were a key, for example to make it walk, jump or shoot. - [toggleAllControls (Client)](https://wiki.mymp.gg/en/toggleAllControls-client.md): Turns all of the local player's controls on or off at once. - [toggleAllControls (Server)](https://wiki.mymp.gg/en/toggleAllControls-server.md): Turns all of a player's controls on or off at once. The order goes to their client. - [toggleControl (Client)](https://wiki.mymp.gg/en/toggleControl-client.md): Turns one of the local player's controls on or off. A control that is off does not reach the game, even with its key held down. - [toggleControl (Server)](https://wiki.mymp.gg/en/toggleControl-server.md): Turns one of a player's controls on or off. Their client stops passing that control to the game, even with its key held down. ### Animations - [getPedAnimation (Client)](https://wiki.mymp.gg/en/getPedAnimation.md): Tells which setPedAnimation animation a ped is playing on this client. - [getPedAnimationLength (Client)](https://wiki.mymp.gg/en/getPedAnimationLength.md): Tells the length of the animation the ped is playing, such as one from setPedAnimation. - [getPedAnimationProgress (Client)](https://wiki.mymp.gg/en/getPedAnimationProgress.md): Tells how far along the animation the ped is playing is, such as one from setPedAnimation. - [getPedAnimationSpeed (Client)](https://wiki.mymp.gg/en/getPedAnimationSpeed.md): Tells the speed of the animation the ped is playing, such as one from setPedAnimation. - [setPedAnimation (Client)](https://wiki.mymp.gg/en/setPedAnimation.md): Makes a ped play an animation from a block, or stops the animation it is playing. The animation applies on this client only. - [setPedAnimationProgress (Client)](https://wiki.mymp.gg/en/setPedAnimationProgress.md): Jumps an animation the ped is playing to a point in it. Without anim, it stops the setPedAnimation animation. - [setPedAnimationSpeed (Client)](https://wiki.mymp.gg/en/setPedAnimationSpeed.md): Changes the speed of an animation the ped is playing. ### Appearance - [addPedClothes (Shared)](https://wiki.mymp.gg/en/addPedClothes.md): Dresses a ped in a piece of clothing. The piece takes its slot and replaces whatever was in it. - [getClothesVariantCount (Shared)](https://wiki.mymp.gg/en/getClothesVariantCount.md): Counts how many textures a piece of clothing has for a ped's model. - [getPedBodyShape (Shared)](https://wiki.mymp.gg/en/getPedBodyShape.md): Tells how much of a body shape a ped has. - [getPedClothes (Shared)](https://wiki.mymp.gg/en/getPedClothes.md): Tells which clothes a ped wears, all of them or the one in a slot. - [getPedHairColor (Shared)](https://wiki.mymp.gg/en/getPedHairColor.md): Tells the colour of a ped's hair and of its highlights, if any. - [getPedHeadBlend (Shared)](https://wiki.mymp.gg/en/getPedHeadBlend.md): Tells how a ped's face blends its two parents. - [getPedHeadShape (Shared)](https://wiki.mymp.gg/en/getPedHeadShape.md): Tells how far a feature of a ped's face was adjusted. - [getPedOverlay (Shared)](https://wiki.mymp.gg/en/getPedOverlay.md): Tells which variant of an overlay a ped wears on its face. - [getPedOverlayColor (Shared)](https://wiki.mymp.gg/en/getPedOverlayColor.md): Tells the colour of an overlay the ped wears on its face. - [removePedClothes (Shared)](https://wiki.mymp.gg/en/removePedClothes.md): Takes off the piece of clothing a ped wears in a slot. - [setPedBodyShape (Shared)](https://wiki.mymp.gg/en/setPedBodyShape.md): Changes a ped's body by a named shape, which enlarges the bones it declares. - [setPedHairColor (Shared)](https://wiki.mymp.gg/en/setPedHairColor.md): Tints a ped's hair and, if you want, its highlights. - [setPedHeadBlend (Shared)](https://wiki.mymp.gg/en/setPedHeadBlend.md): Builds a ped's face by blending the head and skin of two parents. - [setPedHeadShape (Shared)](https://wiki.mymp.gg/en/setPedHeadShape.md): Adjusts a feature of a ped's face, such as the nose or the chin. - [setPedOverlay (Shared)](https://wiki.mymp.gg/en/setPedOverlay.md): Puts an overlay on a ped's face or takes it off, such as a beard, eyebrows or make-up. - [setPedOverlayColor (Shared)](https://wiki.mymp.gg/en/setPedOverlayColor.md): Tints an overlay the ped wears on its face, by a palette row or by a colour. ### Player environment - [getLocalization (Client)](https://wiki.mymp.gg/en/getLocalization.md): Returns the language the player is playing in, the one chosen in the launcher. - [isStreamerMode (Client)](https://wiki.mymp.gg/en/isStreamerMode.md): Tells whether streamer mode is on. In it, the console masks every IPv4 address it shows. - [onClientStreamerModeChange (Client)](https://wiki.mymp.gg/en/onClientStreamerModeChange.md): Fired when streamer mode turns on or off. ### Vehicles - [addVehicleUpgrade (Shared)](https://wiki.mymp.gg/en/addVehicleUpgrade.md): Fits a tuning upgrade on a vehicle, replacing whatever is on the same slot. - [createVehicle (Client)](https://wiki.mymp.gg/en/createVehicle-client.md): Creates a vehicle that exists on this client only. - [createVehicle (Server)](https://wiki.mymp.gg/en/createVehicle-server.md): Creates a vehicle on the server, seen by every player. - [fixVehicle (Shared)](https://wiki.mymp.gg/en/fixVehicle.md): Repairs a vehicle completely: its health goes back to 1000 and its doors, wheels and lights to their initial state, with no dents or bullet holes. - [getVehicleCompatibleUpgrades (Shared)](https://wiki.mymp.gg/en/getVehicleCompatibleUpgrades.md): Returns the tuning upgrades that fit a vehicle's model. - [getVehicleController (Shared)](https://wiki.mymp.gg/en/getVehicleController.md): Returns who is driving a vehicle, that is the occupant of seat 0. - [getVehicleDoorOpenRatio (Shared)](https://wiki.mymp.gg/en/getVehicleDoorOpenRatio.md): Returns how far one or more doors of a vehicle are open. - [getVehicleDoorState (Shared)](https://wiki.mymp.gg/en/getVehicleDoorState.md): Returns the state of one or more doors of a vehicle. - [getVehicleEngineSound (Client)](https://wiki.mymp.gg/en/getVehicleEngineSound.md): Returns the engine and induction sounds setVehicleEngineSound put on a vehicle. - [getVehicleEngineSounds (Client)](https://wiki.mymp.gg/en/getVehicleEngineSounds.md): Lists the engine sound sets the mounted packs bring. - [getVehicleEngineState (Shared)](https://wiki.mymp.gg/en/getVehicleEngineState.md): Returns whether a vehicle's engine is on. - [getVehicleHeadLightColor (Shared)](https://wiki.mymp.gg/en/getVehicleHeadLightColor.md): Returns the colour of a vehicle's headlights. - [getVehicleHydraulics (Shared)](https://wiki.mymp.gg/en/getVehicleHydraulics.md): Tells whether a vehicle has hydraulics fitted by setVehicleHydraulics. - [getVehicleHydraulicsControl (Shared)](https://wiki.mymp.gg/en/getVehicleHydraulicsControl.md): Returns how far setVehicleHydraulicsControl told each wheel of a vehicle to rise. - [getVehicleLightState (Shared)](https://wiki.mymp.gg/en/getVehicleLightState.md): Returns whether one or more lights of a vehicle are broken. - [getVehicleMaxPassengers (Client)](https://wiki.mymp.gg/en/getVehicleMaxPassengers-client.md): Tells how many passengers fit in a vehicle, not counting the driver. - [getVehicleMaxPassengers (Server)](https://wiki.mymp.gg/en/getVehicleMaxPassengers-server.md): Tells how many passengers fit in a vehicle, not counting the driver. - [getVehicleOccupant (Shared)](https://wiki.mymp.gg/en/getVehicleOccupant.md): Returns the ped or player sitting in a seat of a vehicle. - [getVehicleOccupants (Shared)](https://wiki.mymp.gg/en/getVehicleOccupants.md): Returns every ped and player inside a vehicle. - [getVehicleOverrideLights (Shared)](https://wiki.mymp.gg/en/getVehicleOverrideLights.md): Returns whether a vehicle's lights are forced on or off. - [getVehicleSuspensionHeight (Shared)](https://wiki.mymp.gg/en/getVehicleSuspensionHeight.md): Returns the suspension height setVehicleSuspensionHeight gave a vehicle. - [getVehicleTowedByVehicle (Shared)](https://wiki.mymp.gg/en/getVehicleTowedByVehicle.md): Returns the trailer or vehicle this vehicle is towing. - [getVehicleTowingVehicle (Shared)](https://wiki.mymp.gg/en/getVehicleTowingVehicle.md): Returns the vehicle that is towing this vehicle. - [getVehicleUpgradeOnSlot (Shared)](https://wiki.mymp.gg/en/getVehicleUpgradeOnSlot.md): Returns the upgrade fitted on one slot of a vehicle. - [getVehicleUpgrades (Shared)](https://wiki.mymp.gg/en/getVehicleUpgrades.md): Returns every tuning upgrade fitted on a vehicle. - [getVehicleUpgradeSlotName (Shared)](https://wiki.mymp.gg/en/getVehicleUpgradeSlotName.md): Returns the name of an upgrade slot, from the slot's index or from an upgrade that goes on it. - [getVehicleUpgradeSlots (Shared)](https://wiki.mymp.gg/en/getVehicleUpgradeSlots.md): Returns the names of every upgrade slot the mounted packs declare. - [getVehicleWheelCamber (Shared)](https://wiki.mymp.gg/en/getVehicleWheelCamber.md): Returns the camber of a vehicle's wheels. - [getVehicleWheelFrictionState (Client)](https://wiki.mymp.gg/en/getVehicleWheelFrictionState.md): Tells how a vehicle's wheels are gripping the ground. - [getVehicleWheelOffset (Shared)](https://wiki.mymp.gg/en/getVehicleWheelOffset.md): Returns the offset of a vehicle's wheels. - [getVehicleWheelScale (Shared)](https://wiki.mymp.gg/en/getVehicleWheelScale.md): Returns the radius factor of a vehicle's tyres. - [getVehicleWheelState (Shared)](https://wiki.mymp.gg/en/getVehicleWheelState.md): Returns the state of one or more wheels of a vehicle. - [getVehicleWheelStates (Shared)](https://wiki.mymp.gg/en/getVehicleWheelStates.md): Returns the state of a vehicle's four wheels. - [getVehicleWheelWidth (Shared)](https://wiki.mymp.gg/en/getVehicleWheelWidth.md): Returns the width factor of a vehicle's tyres. - [isVehicleFullBeam (Shared)](https://wiki.mymp.gg/en/isVehicleFullBeam.md): Returns whether a vehicle's high beams are on. - [isVehicleLocked (Shared)](https://wiki.mymp.gg/en/isVehicleLocked.md): Returns whether a vehicle's doors are locked. - [isVehicleOnGround (Shared)](https://wiki.mymp.gg/en/isVehicleOnGround.md): Returns whether a vehicle is resting on the ground. - [isVehicleWheelOnGround (Client)](https://wiki.mymp.gg/en/isVehicleWheelOnGround.md): Tells whether a vehicle's wheels are touching something. - [removeVehicleUpgrade (Shared)](https://wiki.mymp.gg/en/removeVehicleUpgrade.md): Takes a tuning upgrade off a vehicle. - [setVehicleDoorOpenRatio (Shared)](https://wiki.mymp.gg/en/setVehicleDoorOpenRatio.md): Opens or closes one or more doors of a vehicle to a fraction, at once or over time. - [setVehicleDoorState (Shared)](https://wiki.mymp.gg/en/setVehicleDoorState.md): Changes the state of one or more doors of a vehicle: shut, open, damaged or missing. - [setVehicleEngineSound (Client)](https://wiki.mymp.gg/en/setVehicleEngineSound.md): Replaces a vehicle's engine sound on this client with a sound set from the mounted packs. - [setVehicleEngineState (Shared)](https://wiki.mymp.gg/en/setVehicleEngineState.md): Turns a vehicle's engine on or off. - [setVehicleFullBeam (Shared)](https://wiki.mymp.gg/en/setVehicleFullBeam.md): Turns a vehicle's high beams on or off. - [setVehicleHeadLightColor (Shared)](https://wiki.mymp.gg/en/setVehicleHeadLightColor.md): Changes the colour of a vehicle's headlights. - [setVehicleHydraulics (Shared)](https://wiki.mymp.gg/en/setVehicleHydraulics.md): Fits or removes a vehicle's hydraulics. - [setVehicleHydraulicsControl (Shared)](https://wiki.mymp.gg/en/setVehicleHydraulicsControl.md): Raises each wheel of a vehicle with its hydraulics, with nobody at the controls. - [setVehicleLightState (Shared)](https://wiki.mymp.gg/en/setVehicleLightState.md): Breaks or repairs one or more lights of a vehicle. - [setVehicleLocked (Shared)](https://wiki.mymp.gg/en/setVehicleLocked.md): Locks or unlocks a vehicle's doors. - [setVehicleOverrideLights (Shared)](https://wiki.mymp.gg/en/setVehicleOverrideLights.md): Forces a vehicle's lights on or off, or hands the choice back to the game. - [setVehicleSuspensionHeight (Shared)](https://wiki.mymp.gg/en/setVehicleSuspensionHeight.md): Raises or lowers a vehicle's suspension. - [setVehicleWheelCamber (Shared)](https://wiki.mymp.gg/en/setVehicleWheelCamber.md): Tilts a vehicle's wheels in or out (camber). - [setVehicleWheelOffset (Shared)](https://wiki.mymp.gg/en/setVehicleWheelOffset.md): Moves a vehicle's wheels away from where the model places them. - [setVehicleWheelScale (Shared)](https://wiki.mymp.gg/en/setVehicleWheelScale.md): Makes a vehicle's tyres bigger or smaller in radius. - [setVehicleWheelState (Shared)](https://wiki.mymp.gg/en/setVehicleWheelState.md): Changes the state of one or more wheels of a vehicle: inflated, flat, fallen off or without collision. - [setVehicleWheelStates (Shared)](https://wiki.mymp.gg/en/setVehicleWheelStates.md): Changes the state of a vehicle's four wheels at once. - [setVehicleWheelWidth (Shared)](https://wiki.mymp.gg/en/setVehicleWheelWidth.md): Widens or narrows a vehicle's tyres. - [onClientPedVehicleEnter (Client)](https://wiki.mymp.gg/en/onClientPedVehicleEnter.md): Fired on the client when a ped (not a player) has finished getting into a vehicle. - [onClientPedVehicleExit (Client)](https://wiki.mymp.gg/en/onClientPedVehicleExit.md): Fired on the client when a ped (not a player) leaves a vehicle. - [onClientPlayerVehicleEnter (Client)](https://wiki.mymp.gg/en/onClientPlayerVehicleEnter.md): Fired on the client when a player has finished getting into a vehicle. - [onClientPlayerVehicleExit (Client)](https://wiki.mymp.gg/en/onClientPlayerVehicleExit.md): Fired on the client when a player leaves a vehicle. - [onClientTrailerAttach (Client)](https://wiki.mymp.gg/en/onClientTrailerAttach.md): Fired on the client when a trailer is hitched to a vehicle. - [onClientTrailerDetach (Client)](https://wiki.mymp.gg/en/onClientTrailerDetach.md): Fired on the client when a trailer is unhitched from the vehicle towing it. - [onClientVehicleEnter (Client)](https://wiki.mymp.gg/en/onClientVehicleEnter.md): Fired on the client when a ped has finished getting into a vehicle. - [onClientVehicleExit (Client)](https://wiki.mymp.gg/en/onClientVehicleExit.md): Fired on the client when a ped leaves a vehicle. - [onClientVehicleStartEnter (Client)](https://wiki.mymp.gg/en/onClientVehicleStartEnter.md): Fired on the client when a ped starts getting into a vehicle. Cancelling the event stops it. - [onClientVehicleStartExit (Client)](https://wiki.mymp.gg/en/onClientVehicleStartExit.md): Fired on the client when a ped starts getting out of a vehicle. Cancelling the event stops it. - [onPedVehicleEnter (Server)](https://wiki.mymp.gg/en/onPedVehicleEnter.md): Fired on the server when a ped (not a player) has finished getting into a vehicle. - [onPedVehicleExit (Server)](https://wiki.mymp.gg/en/onPedVehicleExit.md): Fired on the server when a ped (not a player) leaves a vehicle. - [onPlayerVehicleEnter (Server)](https://wiki.mymp.gg/en/onPlayerVehicleEnter.md): Fired on the server when a player has finished getting into a vehicle. - [onPlayerVehicleExit (Server)](https://wiki.mymp.gg/en/onPlayerVehicleExit.md): Fired on the server when a player leaves a vehicle. - [onTrailerAttach (Server)](https://wiki.mymp.gg/en/onTrailerAttach.md): Fired on the server when a trailer is hitched to a vehicle. Cancelling the event unhitches the trailer. - [onTrailerDetach (Server)](https://wiki.mymp.gg/en/onTrailerDetach.md): Fired on the server when a trailer is unhitched from the vehicle towing it. - [onVehicleEnter (Server)](https://wiki.mymp.gg/en/onVehicleEnter.md): Fired on the server when a ped has finished getting into a vehicle. - [onVehicleExit (Server)](https://wiki.mymp.gg/en/onVehicleExit.md): Fired on the server when a ped leaves a vehicle. - [onVehicleStartEnter (Server)](https://wiki.mymp.gg/en/onVehicleStartEnter.md): Fired on the server when a ped starts getting into a vehicle. Cancelling the event stops it. - [onVehicleStartExit (Server)](https://wiki.mymp.gg/en/onVehicleStartExit.md): Fired on the server when a ped starts getting out of a vehicle or is about to be pulled out. Cancelling the event stops it. ### Vehicle looks - [areVehicleLightTrailsEnabled (Client)](https://wiki.mymp.gg/en/areVehicleLightTrailsEnabled.md): Tells whether a vehicle leaves light trails behind its tail lamps. - [getVehicleDirtColor (Shared)](https://wiki.mymp.gg/en/getVehicleDirtColor.md): Tells the colour of the dirt on a vehicle's paint. - [getVehicleDirtLevel (Shared)](https://wiki.mymp.gg/en/getVehicleDirtLevel.md): Tells how much dirt shows on a vehicle's paint. - [getVehicleNeonColor (Shared)](https://wiki.mymp.gg/en/getVehicleNeonColor.md): Tells the colour of a vehicle's neon. - [getVehicleNeonPower (Shared)](https://wiki.mymp.gg/en/getVehicleNeonPower.md): Tells the brightness of a vehicle's neon. - [getVehicleNeonStrips (Shared)](https://wiki.mymp.gg/en/getVehicleNeonStrips.md): Lists the neon strips a vehicle's model has. - [getVehicleWetnessLevel (Shared)](https://wiki.mymp.gg/en/getVehicleWetnessLevel.md): Tells how wet a vehicle was fixed to look. - [isVehicleBackfireEnabled (Client)](https://wiki.mymp.gg/en/isVehicleBackfireEnabled.md): Tells whether a vehicle lets out flames from its exhaust by itself. - [isVehicleNeonEnabled (Shared)](https://wiki.mymp.gg/en/isVehicleNeonEnabled.md): Tells whether a vehicle's neon strips are on. - [resetVehicleDirtColor (Shared)](https://wiki.mymp.gg/en/resetVehicleDirtColor.md): Puts a vehicle's dirt back to the default colour, 59, 57, 52. - [resetVehicleWetnessLevel (Shared)](https://wiki.mymp.gg/en/resetVehicleWetnessLevel.md): Makes a vehicle get wet with the rain again, undoing setVehicleWetnessLevel. - [setVehicleBackfireEnabled (Client)](https://wiki.mymp.gg/en/setVehicleBackfireEnabled.md): Turns on or off the flames that come out of a vehicle's exhaust by themselves when lifting off the throttle at high revs or shifting up. - [setVehicleDirtColor (Shared)](https://wiki.mymp.gg/en/setVehicleDirtColor.md): Changes the colour of the dirt on a vehicle's paint, such as mud or sand. - [setVehicleDirtLevel (Shared)](https://wiki.mymp.gg/en/setVehicleDirtLevel.md): Changes how much dirt shows on a vehicle's paint. - [setVehicleLightTrailsEnabled (Client)](https://wiki.mymp.gg/en/setVehicleLightTrailsEnabled.md): Turns on or off red light trails behind a vehicle's lit tail lamps, longer the faster it goes. - [setVehicleNeonColor (Shared)](https://wiki.mymp.gg/en/setVehicleNeonColor.md): Changes the colour of a vehicle's neon. The colour applies to every strip. - [setVehicleNeonEnabled (Shared)](https://wiki.mymp.gg/en/setVehicleNeonEnabled.md): Turns neon strips under a vehicle on or off. - [setVehicleNeonPower (Shared)](https://wiki.mymp.gg/en/setVehicleNeonPower.md): Changes the brightness of a vehicle's neon. - [setVehicleWetnessLevel (Shared)](https://wiki.mymp.gg/en/setVehicleWetnessLevel.md): Fixes how wet a vehicle looks, instead of following the rain. - [triggerVehicleBackfire (Client)](https://wiki.mymp.gg/en/triggerVehicleBackfire.md): Makes a small flame come out of each of a vehicle's exhausts, once. ### Handling - [getModelHandling (Server)](https://wiki.mymp.gg/en/getModelHandling.md): Reads a vehicle model's handling, which new vehicles of that model start with. - [getOriginalHandling (Client)](https://wiki.mymp.gg/en/getOriginalHandling-client.md): Reads a vehicle model's original handling, as the game loaded it, without any script's changes. - [getOriginalHandling (Server)](https://wiki.mymp.gg/en/getOriginalHandling-server.md): Reads a vehicle model's original handling, as the content packs declare it, without any script's changes. - [getVehicleHandling (Shared)](https://wiki.mymp.gg/en/getVehicleHandling.md): Reads a vehicle's handling: its mass, engine, traction, suspension and the rest of what decides how it drives. - [setModelHandling (Server)](https://wiki.mymp.gg/en/setModelHandling.md): Changes a property of a vehicle model's handling, which new vehicles of that model start with. - [setVehicleHandling (Client)](https://wiki.mymp.gg/en/setVehicleHandling-client.md): Changes a vehicle's handling on this client only. - [setVehicleHandling (Server)](https://wiki.mymp.gg/en/setVehicleHandling-server.md): Changes a vehicle's handling for every player. ### World and weather - [createFire (Client)](https://wiki.mymp.gg/en/createFire.md): Starts a fire at a point, on this client only. It burns for 5 seconds. - [createLadder (Client)](https://wiki.mymp.gg/en/createLadder.md): Creates a ladder peds can climb, on this client only. - [extinguishFire (Client)](https://wiki.mymp.gg/en/extinguishFire.md): Puts out the fires within a radius of a point. Without arguments, it puts out every fire on this client. - [getCloudsDensity (Client)](https://wiki.mymp.gg/en/getCloudsDensity.md): Returns how much of the sky the clouds cover: the value setCloudsDensity set or, without it, the clouds' current one. - [getFarClipDistance (Client)](https://wiki.mymp.gg/en/getFarClipDistance.md): Returns how far the world is being drawn right now. - [getFiresInRange (Client)](https://wiki.mymp.gg/en/getFiresInRange.md): Lists the fires burning near a point. The distance is measured on the horizontal plane only. - [getFogDistance (Client)](https://wiki.mymp.gg/en/getFogDistance.md): Returns how far the fog starts: the value setFogDistance set or, without it, the time cycle's. - [getGroundPosition (Client)](https://wiki.mymp.gg/en/getGroundPosition.md): Finds the ground right below a point, up to 1000 m down. Only buildings and objects count. - [getMinuteDuration (Client)](https://wiki.mymp.gg/en/getMinuteDuration.md): Returns how much real time one game minute lasts on this client. - [getMoonColor (Client)](https://wiki.mymp.gg/en/getMoonColor.md): Returns the colour of the moon in use: the one setMoonColor set or, without it, the time cycle's. - [getMoonSize (Client)](https://wiki.mymp.gg/en/getMoonSize.md): Returns the size of the moon's disc: the one setMoonSize set or, without it, the time cycle's. - [getScreenFromWorldPosition (Client)](https://wiki.mymp.gg/en/getScreenFromWorldPosition.md): Projects a world point onto the screen, with the current frame's camera. - [getSkyColor (Client)](https://wiki.mymp.gg/en/getSkyColor.md): Returns the sky gradient setSkyColor set. - [getSunColor (Client)](https://wiki.mymp.gg/en/getSunColor.md): Returns the colour of the sun in use: the one setSunColor set or, without it, the time cycle's. - [getSunSize (Client)](https://wiki.mymp.gg/en/getSunSize.md): Returns the size of the sun's disc: the one setSunSize set or, without it, the time cycle's. - [getTime (Client)](https://wiki.mymp.gg/en/getTime.md): Returns the game time on this client. - [getWeather (Client)](https://wiki.mymp.gg/en/getWeather.md): Returns this client's current weather. During a blend, it is the weather being blended to. - [getWeatherNames (Client)](https://wiki.mymp.gg/en/getWeatherNames.md): Lists the weathers the loaded packs declare. - [getWorldFromScreenPosition (Client)](https://wiki.mymp.gg/en/getWorldFromScreenPosition.md): Turns a screen point, at a depth, into a world point, with the current frame's camera. - [isLineOfSightClear (Client)](https://wiki.mymp.gg/en/isLineOfSightClear.md): Tells whether nothing blocks the segment between two points. Only buildings and objects block it, not vehicles or peds. - [isTimeFrozen (Client)](https://wiki.mymp.gg/en/isTimeFrozen.md): Tells whether the game clock is frozen on this client. - [processLineOfSight (Client)](https://wiki.mymp.gg/en/processLineOfSight.md): Casts a ray between two points and returns the first thing it hits. - [resetCloudsDensity (Client)](https://wiki.mymp.gg/en/resetCloudsDensity.md): Undoes setCloudsDensity: the cloud coverage follows the time cycle again. - [resetFarClipDistance (Client)](https://wiki.mymp.gg/en/resetFarClipDistance.md): Undoes setFarClipDistance: the draw distance follows the time cycle again. - [resetFogDistance (Client)](https://wiki.mymp.gg/en/resetFogDistance.md): Undoes setFogDistance: the fog follows the time cycle again. - [resetMoonColor (Client)](https://wiki.mymp.gg/en/resetMoonColor.md): Undoes setMoonColor: the moon's colour follows the time cycle again. - [resetMoonSize (Client)](https://wiki.mymp.gg/en/resetMoonSize.md): Undoes setMoonSize: the moon's size follows the time cycle again. - [resetSkyColor (Client)](https://wiki.mymp.gg/en/resetSkyColor.md): Undoes setSkyColor: the sky follows the time cycle again. - [resetSunColor (Client)](https://wiki.mymp.gg/en/resetSunColor.md): Undoes setSunColor: the sun's colour follows the time cycle again. - [resetSunSize (Client)](https://wiki.mymp.gg/en/resetSunSize.md): Undoes setSunSize: the sun's size follows the time cycle again. - [setCloudsDensity (Client)](https://wiki.mymp.gg/en/setCloudsDensity.md): Changes how much of the sky the clouds cover, over the time cycle, until resetCloudsDensity restores it. - [setFarClipDistance (Client)](https://wiki.mymp.gg/en/setFarClipDistance.md): Changes how far from the camera the world is drawn, over the time cycle, until resetFarClipDistance restores it. - [setFogDistance (Client)](https://wiki.mymp.gg/en/setFogDistance.md): Changes how far from the camera the fog starts, over the time cycle, until resetFogDistance restores it. - [setMinuteDuration (Client)](https://wiki.mymp.gg/en/setMinuteDuration.md): Sets how much real time one game minute lasts on this client. - [setMoonColor (Client)](https://wiki.mymp.gg/en/setMoonColor.md): Changes the colour of the moon, over the time cycle, until resetMoonColor restores it. - [setMoonSize (Client)](https://wiki.mymp.gg/en/setMoonSize.md): Changes the size of the moon's disc in the sky, over the time cycle, until resetMoonSize restores it. - [setSkyColor (Client)](https://wiki.mymp.gg/en/setSkyColor.md): Paints the sky with a gradient from the top to the horizon, over the time cycle, until resetSkyColor restores it. - [setSunColor (Client)](https://wiki.mymp.gg/en/setSunColor.md): Changes the colour of the sun, over the time cycle, until resetSunColor restores it. - [setSunSize (Client)](https://wiki.mymp.gg/en/setSunSize.md): Changes the size of the sun's disc in the sky, over the time cycle, until resetSunSize restores it. - [setTime (Client)](https://wiki.mymp.gg/en/setTime.md): Changes the game time on this client. The clock keeps running from there. - [setTimeFrozen (Client)](https://wiki.mymp.gg/en/setTimeFrozen.md): Freezes or unfreezes the game clock on this client. While frozen the time does not advance, but setTime still changes it. - [setWeather (Client)](https://wiki.mymp.gg/en/setWeather.md): Changes this client's weather, at once or over a blend. ### Objects - [breakObject (Shared)](https://wiki.mymp.gg/en/breakObject.md): Breaks a breakable object at once. - [createObject (Client)](https://wiki.mymp.gg/en/createObject-client.md): Creates an object that exists on this client only. - [createObject (Server)](https://wiki.mymp.gg/en/createObject-server.md): Creates an object every player sees. - [getObjectScale (Shared)](https://wiki.mymp.gg/en/getObjectScale.md): Returns an object's scale along each axis. - [moveObject (Shared)](https://wiki.mymp.gg/en/moveObject.md): Moves an object smoothly to a position, turning it along the way. - [setObjectBreakable (Shared)](https://wiki.mymp.gg/en/setObjectBreakable.md): Sets whether a breakable object can be broken. An object that cannot is immune to any damage. - [setObjectScale (Shared)](https://wiki.mymp.gg/en/setObjectScale.md): Changes an object's size, evenly or along each axis. - [stopObject (Shared)](https://wiki.mymp.gg/en/stopObject.md): Stops an object's movement wherever it is. - [onClientObjectMoveStart (Client)](https://wiki.mymp.gg/en/onClientObjectMoveStart.md): Fired on this client when an object starts a moveObject movement, whether this client or the server made it. - [onClientObjectMoveStop (Client)](https://wiki.mymp.gg/en/onClientObjectMoveStop.md): Fired on this client when an object's movement ends: it arrived, stopObject stopped it or a new moveObject took over. ### Collision shapes - [createColCircle (Shared)](https://wiki.mymp.gg/en/createColCircle.md): Creates a circular collision shape with no height limit. - [createColCuboid (Shared)](https://wiki.mymp.gg/en/createColCuboid.md): Creates a box-shaped collision shape, aligned with the world's axes. - [createColPolygon (Shared)](https://wiki.mymp.gg/en/createColPolygon.md): Creates a collision shape shaped like a flat polygon, with no height limit until setColPolygonHeight gives it one. - [createColRectangle (Shared)](https://wiki.mymp.gg/en/createColRectangle.md): Creates a rectangular collision shape, aligned with the world's axes and with no height limit. - [createColSphere (Shared)](https://wiki.mymp.gg/en/createColSphere.md): Creates a spherical collision shape. - [createColTube (Shared)](https://wiki.mymp.gg/en/createColTube.md): Creates a collision shape shaped like an upright cylinder. - [getColPolygonHeight (Shared)](https://wiki.mymp.gg/en/getColPolygonHeight.md): Returns between which heights a collision polygon detects elements. - [getColShapeType (Shared)](https://wiki.mymp.gg/en/getColShapeType.md): Tells what shape a collision shape has. - [getElementsWithinColShape (Shared)](https://wiki.mymp.gg/en/getElementsWithinColShape.md): Lists the elements inside a collision shape. - [isElementWithinColShape (Shared)](https://wiki.mymp.gg/en/isElementWithinColShape.md): Tells whether an element is inside a collision shape. - [setColPolygonHeight (Shared)](https://wiki.mymp.gg/en/setColPolygonHeight.md): Limits between which heights a collision polygon detects elements. - [onClientColShapeHit (Client)](https://wiki.mymp.gg/en/onClientColShapeHit.md): Fired when a player, ped, vehicle or object enters a collision shape on this client. - [onClientColShapeLeave (Client)](https://wiki.mymp.gg/en/onClientColShapeLeave.md): Fired when a player, ped, vehicle or object leaves a collision shape on this client. - [onClientElementColShapeHit (Client)](https://wiki.mymp.gg/en/onClientElementColShapeHit.md): Fired on a player, ped, vehicle or object when it enters a collision shape on this client. - [onClientElementColShapeLeave (Client)](https://wiki.mymp.gg/en/onClientElementColShapeLeave.md): Fired on a player, ped, vehicle or object when it leaves a collision shape on this client. - [onColShapeHit (Server)](https://wiki.mymp.gg/en/onColShapeHit.md): Fired when a player, ped, vehicle or object enters a collision shape. - [onColShapeLeave (Server)](https://wiki.mymp.gg/en/onColShapeLeave.md): Fired when a player, ped, vehicle or object leaves a collision shape. - [onElementColShapeHit (Server)](https://wiki.mymp.gg/en/onElementColShapeHit.md): Fired on a player, ped, vehicle or object when it enters a collision shape. - [onElementColShapeLeave (Server)](https://wiki.mymp.gg/en/onElementColShapeLeave.md): Fired on a player, ped, vehicle or object when it leaves a collision shape. ### Roads and paths - [arePathNodesLoaded (Client)](https://wiki.mymp.gg/en/arePathNodesLoaded.md): Tells whether the path nodes of an area are loaded yet. - [calculatePathRoute (Client)](https://wiki.mymp.gg/en/calculatePathRoute.md): Works out the shortest route along the path nodes between two points, starting from the node closest to each. For cars, it respects one-way streets. - [getClosestPathNode (Client)](https://wiki.mymp.gg/en/getClosestPathNode.md): Finds the road or footpath node closest to a point. - [getClosestStraightRoad (Client)](https://wiki.mymp.gg/en/getClosestStraightRoad.md): Finds the stretch of road closest to a point: two linked car nodes and the heading between them. Switched-off nodes are left out. - [getNthClosestPathNode (Client)](https://wiki.mymp.gg/en/getNthClosestPathNode.md): Finds the nth road or footpath node closest to a point. - [getParkingNodeInArea (Client)](https://wiki.mymp.gg/en/getParkingNodeInArea.md): Finds a parking node inside a box. Each call returns the next one in the box, going back to the first at the end. - [getPathNodeInfo (Client)](https://wiki.mymp.gg/en/getPathNodeInfo.md): Returns what is known about a path node. - [getPathNodeNeighbours (Client)](https://wiki.mymp.gg/en/getPathNodeNeighbours.md): Lists the nodes linked to a path node and what each link is like. - [getPathNodePosition (Client)](https://wiki.mymp.gg/en/getPathNodePosition.md): Returns a path node's position. - [getPathNodesInRadius (Client)](https://wiki.mymp.gg/en/getPathNodesInRadius.md): Lists the road or footpath nodes within a radius. - [getRoadDensity (Client)](https://wiki.mymp.gg/en/getRoadDensity.md): Measures how much road there is around a point: the lanes times the length of the car links starting within 80 m of it, scaled down. - [getSafePedSpawnPosition (Client)](https://wiki.mymp.gg/en/getSafePedSpawnPosition.md): Picks a random spot on a footpath near a point where a ped can appear, the way SA chooses where to create peds. The spot is on the ground. - [releasePathNodes (Client)](https://wiki.mymp.gg/en/releasePathNodes.md): Drops the requestPathNodesInArea request. The areas far from the player can be unloaded again. - [requestPathNodesInArea (Client)](https://wiki.mymp.gg/en/requestPathNodesInArea.md): Asks for the path nodes of an area to be loaded beyond those near the player. The area stays loaded until releasePathNodes. ### Camera - [attachCameraToElement (Client)](https://wiki.mymp.gg/en/attachCameraToElement.md): Attaches the camera to an element: it follows the element's position and rotation until setCameraTarget gives it back to a ped. - [fadeCamera (Client)](https://wiki.mymp.gg/en/fadeCamera.md): Fades the screen out to a colour or back in. - [getCameraMatrix (Client)](https://wiki.mymp.gg/en/getCameraMatrix.md): Returns where the camera is and where it looks. - [getCameraTarget (Client)](https://wiki.mymp.gg/en/getCameraTarget.md): Returns the player or ped the camera is following. - [setCameraMatrix (Client)](https://wiki.mymp.gg/en/setCameraMatrix.md): Fixes the camera at a point, looking at another, until setCameraTarget gives it back to a ped. - [setCameraTarget (Client)](https://wiki.mymp.gg/en/setCameraTarget.md): Makes the camera follow a player or ped, as in normal play. It also undoes setCameraMatrix and attachCameraToElement. ### Cinematics - [castCinematicActor (Client)](https://wiki.mymp.gg/en/castCinematicActor.md): Has an actor played with the look and element data of a ped, player or vehicle of the session. It applies from the next playback. - [createCinematic (Client)](https://wiki.mymp.gg/en/createCinematic.md): Creates a cinematic element, empty or from a saved cinematic. It belongs to the resource that created it and exists on this client only. - [getCinematicActor (Client)](https://wiki.mymp.gg/en/getCinematicActor.md): Returns the local element (ped or vehicle) that plays an actor in the current playback. - [getCinematicActorPose (Client)](https://wiki.mymp.gg/en/getCinematicActorPose.md): Returns where an actor stands at a cinematic time. It needs no playback. - [getCinematicActors (Client)](https://wiki.mymp.gg/en/getCinematicActors.md): Lists the cinematic's actors: the recorded ones and the placed ones. - [getCinematicAdjustments (Client)](https://wiki.mymp.gg/en/getCinematicAdjustments.md): Returns the shifts and animations laid over an actor's take. - [getCinematicAudio (Client)](https://wiki.mymp.gg/en/getCinematicAudio.md): Returns the cinematic's sounds. - [getCinematicCamera (Client)](https://wiki.mymp.gg/en/getCinematicCamera.md): Returns the cinematic's camera shots. - [getCinematicCaptions (Client)](https://wiki.mymp.gg/en/getCinematicCaptions.md): Returns the cinematic's captions. - [getCinematicData (Client)](https://wiki.mymp.gg/en/getCinematicData.md): Returns the whole cinematic as .cine bytes, which createCinematic reads back. - [getCinematicDuration (Client)](https://wiki.mymp.gg/en/getCinematicDuration.md): Returns how long the cinematic lasts. - [getCinematicPosition (Client)](https://wiki.mymp.gg/en/getCinematicPosition.md): Returns which cinematic time the playback is at. - [getCinematicShotView (Client)](https://wiki.mymp.gg/en/getCinematicShotView.md): Returns where a shot's camera stands and what it looks at, at a cinematic time, shake included. - [getCinematicWorld (Client)](https://wiki.mymp.gg/en/getCinematicWorld.md): Returns the cinematic's weather, hour and fade keys. - [isCinematicPaused (Client)](https://wiki.mymp.gg/en/isCinematicPaused.md): Tells whether the cinematic's playback is paused. - [playCinematic (Client)](https://wiki.mymp.gg/en/playCinematic.md): Plays the cinematic: the actors as local clones, plus the camera, weather, hour, fade, sounds and captions. - [removeCinematicActor (Client)](https://wiki.mymp.gg/en/removeCinematicActor.md): Takes an actor, with its take, out of the cinematic. - [setCinematicActorTiming (Client)](https://wiki.mymp.gg/en/setCinematicActorTiming.md): Places an actor's take in the cinematic's time, trims the part shown and sets its speed. Outside that part the actor leaves the scene. - [setCinematicAdjustments (Client)](https://wiki.mymp.gg/en/setCinematicAdjustments.md): Lays shifts and animations over an actor's take. The take stays as recorded and moves with them. It replaces the actor's earlier adjustments. - [setCinematicAudio (Client)](https://wiki.mymp.gg/en/setCinematicAudio.md): Sets the sounds the cinematic plays during playback. It replaces the earlier sounds. - [setCinematicCamera (Client)](https://wiki.mymp.gg/en/setCinematicCamera.md): Sets the camera shots the cinematic directs during playback. It replaces the earlier shots. - [setCinematicCameraEnabled (Client)](https://wiki.mymp.gg/en/setCinematicCameraEnabled.md): Turns the cinematic's camera on or off. While off, playback does not move the camera and the shots of setCinematicCamera are ignored. - [setCinematicCaptions (Client)](https://wiki.mymp.gg/en/setCinematicCaptions.md): Sets the captions the cinematic draws on screen during playback. It replaces the earlier captions. - [setCinematicDuration (Client)](https://wiki.mymp.gg/en/setCinematicDuration.md): Fixes the cinematic's duration. Playback ends when it gets there. - [setCinematicPaused (Client)](https://wiki.mymp.gg/en/setCinematicPaused.md): Pauses or resumes the cinematic's playback. While paused, the clones hold their animations, vehicles freeze and sounds pause. - [setCinematicPosition (Client)](https://wiki.mymp.gg/en/setCinematicPosition.md): Jumps the playback to another time of the cinematic. The clones are kept; each is set back on its sample and in or out of its vehicle as its take has it. - [setCinematicProp (Client)](https://wiki.mymp.gg/en/setCinematicProp.md): Places a vehicle or object that stands still over a part of the cinematic, or changes one already placed. - [setCinematicWorld (Client)](https://wiki.mymp.gg/en/setCinematicWorld.md): Sets the weather, hour and screen fade keys the cinematic applies during playback. It replaces the earlier keys. - [startCinematicRecording (Client)](https://wiki.mymp.gg/en/startCinematicRecording.md): Starts recording a ped, player or vehicle as an actor of the cinematic. Called again while it records, it adds another actor to the same recording. - [stopCinematic (Client)](https://wiki.mymp.gg/en/stopCinematic.md): Stops the cinematic's playback. The clones go away and the weather, hour and fade go back to what the world had. - [stopCinematicRecording (Client)](https://wiki.mymp.gg/en/stopCinematicRecording.md): Stops the cinematic's recording. The other actors that were playing during the recording stop too. - [onClientCinematicFinish (Client)](https://wiki.mymp.gg/en/onClientCinematicFinish.md): Fired when a cinematic's playback reaches its end by itself. ### Screen drawing - [dxConvertPixels (Client)](https://wiki.mymp.gg/en/dxConvertPixels.md): Converts an image held in a string to another format, in the background, and hands the result to a function. - [dxCreateFont (Client)](https://wiki.mymp.gg/en/dxCreateFont.md): Creates a font from a font file in the resource, for the text functions. - [dxCreateRenderTarget (Client)](https://wiki.mymp.gg/en/dxCreateRenderTarget.md): Creates a render target: an image the dx functions can draw into and that can be used like any other image. - [dxCreateScreenSource (Client)](https://wiki.mymp.gg/en/dxCreateScreenSource.md): Creates a screen source: an image that receives a copy of the game's screen on each dxUpdateScreenSource. - [dxDrawCircle (Client)](https://wiki.mymp.gg/en/dxDrawCircle.md): Draws a filled circle, or a slice of one, on the screen for one frame. - [dxDrawImage (Client)](https://wiki.mymp.gg/en/dxDrawImage.md): Draws an image on the screen for one frame. - [dxDrawImageSection (Client)](https://wiki.mymp.gg/en/dxDrawImageSection.md): Draws part of an image on the screen for one frame. - [dxDrawLine (Client)](https://wiki.mymp.gg/en/dxDrawLine.md): Draws a 2D line on the screen for one frame. - [dxDrawLine3D (Client)](https://wiki.mymp.gg/en/dxDrawLine3D.md): Draws a line in the 3D world for one frame. The line faces the camera. - [dxDrawMaterialLine3D (Client)](https://wiki.mymp.gg/en/dxDrawMaterialLine3D.md): Draws an image stretched along a line in the 3D world for one frame. - [dxDrawMaterialPrimitive (Client)](https://wiki.mymp.gg/en/dxDrawMaterialPrimitive.md): Draws a 2D primitive with an image on the screen for one frame. - [dxDrawMaterialPrimitive3D (Client)](https://wiki.mymp.gg/en/dxDrawMaterialPrimitive3D.md): Draws a primitive with an image in the 3D world for one frame. - [dxDrawMaterialSectionLine3D (Client)](https://wiki.mymp.gg/en/dxDrawMaterialSectionLine3D.md): Draws part of an image stretched along a line in the 3D world for one frame. - [dxDrawPrimitive (Client)](https://wiki.mymp.gg/en/dxDrawPrimitive.md): Draws a 2D primitive (points, lines or triangles) on the screen for one frame. - [dxDrawRectangle (Client)](https://wiki.mymp.gg/en/dxDrawRectangle.md): Draws a filled rectangle on the screen for one frame. - [dxDrawText (Client)](https://wiki.mymp.gg/en/dxDrawText.md): Draws text on the screen for one frame, inside a box. - [dxGetBlendMode (Client)](https://wiki.mymp.gg/en/dxGetBlendMode.md): Returns the blend mode of the 2D dx functions. - [dxGetFontHeight (Client)](https://wiki.mymp.gg/en/dxGetFontHeight.md): Returns the height of one line of text in a font. - [dxGetMaterialSize (Client)](https://wiki.mymp.gg/en/dxGetMaterialSize.md): Returns the size of an image in pixels. - [dxGetPixelColor (Client)](https://wiki.mymp.gg/en/dxGetPixelColor.md): Reads the colour of one pixel of a plain image. - [dxGetPixelsFormat (Client)](https://wiki.mymp.gg/en/dxGetPixelsFormat.md): Detects the format of an image held in a string. - [dxGetPixelsSize (Client)](https://wiki.mymp.gg/en/dxGetPixelsSize.md): Returns the width and height of an image held in a string (plain, png, jpeg or dds). - [dxGetStatus (Client)](https://wiki.mymp.gg/en/dxGetStatus.md): Returns information about the video card and the video memory used by scripts. - [dxGetTextSize (Client)](https://wiki.mymp.gg/en/dxGetTextSize.md): Measures the width and height a text takes on the screen. - [dxGetTexturePixels (Client)](https://wiki.mymp.gg/en/dxGetTexturePixels.md): Reads an image's pixels and hands them to a function, a few frames later. - [dxGetTextWidth (Client)](https://wiki.mymp.gg/en/dxGetTextWidth.md): Measures how wide a text is on the screen, at its widest line. - [dxSetBlendMode (Client)](https://wiki.mymp.gg/en/dxSetBlendMode.md): Chooses how the next 2D dx functions mix with what is already drawn. - [dxSetPixelColor (Client)](https://wiki.mymp.gg/en/dxSetPixelColor.md): Changes the colour of one pixel of a plain image, in the string itself. - [dxSetRenderTarget (Client)](https://wiki.mymp.gg/en/dxSetRenderTarget.md): Chooses where the next dx functions draw: into a render target or, without one, on the screen. - [dxSetTextureEdge (Client)](https://wiki.mymp.gg/en/dxSetTextureEdge.md): Chooses what an image shows when it is read outside its edges. - [dxSetTexturePixels (Client)](https://wiki.mymp.gg/en/dxSetTexturePixels.md): Writes pixels into a texture made by a script or into a render target. - [dxUpdateScreenSource (Client)](https://wiki.mymp.gg/en/dxUpdateScreenSource.md): Copies the game's screen into a screen source. - [getScreenSize (Client)](https://wiki.mymp.gg/en/getScreenSize.md): Returns the size of the game's screen in pixels. - [onClientHUDRender (Client)](https://wiki.mymp.gg/en/onClientHUDRender.md): Fired every frame, right before onClientRender. - [onClientPreRender (Client)](https://wiki.mymp.gg/en/onClientPreRender.md): Fired every frame, after the world is simulated and before the world is drawn. - [onClientRender (Client)](https://wiki.mymp.gg/en/onClientRender.md): Fired every frame, when that frame's dx drawing should be done. ### Web interface - [createDui (Client)](https://wiki.mymp.gg/en/createDui.md): Opens a web page off screen, with a transparent background, and gives it back as an image that can be drawn. - [drawDui (Client)](https://wiki.mymp.gg/en/drawDui.md): Draws a dui on the screen for one frame, in coordinates relative to the screen. - [isDuiReady (Client)](https://wiki.mymp.gg/en/isDuiReady.md): Tells whether a dui's page has finished loading. - [isNuiFocused (Client)](https://wiki.mymp.gg/en/isNuiFocused.md): Tells whether any interface page has focus. - [registerNuiCallback (Client)](https://wiki.mymp.gg/en/registerNuiCallback.md): Registers a function the calling resource's interface page calls with a fetch to /name on its own address. - [sendDuiMessage (Client)](https://wiki.mymp.gg/en/sendDuiMessage.md): Sends a message to a dui's page. The page receives it in the window's message event. - [sendDuiMouseButton (Client)](https://wiki.mymp.gg/en/sendDuiMouseButton.md): Presses or releases a mouse button over a dui's page. - [sendDuiMouseMove (Client)](https://wiki.mymp.gg/en/sendDuiMouseMove.md): Moves the mouse pointer over a dui's page. - [sendDuiMouseWheel (Client)](https://wiki.mymp.gg/en/sendDuiMouseWheel.md): Scrolls a dui's page with the mouse wheel. - [sendNuiMessage (Client)](https://wiki.mymp.gg/en/sendNuiMessage.md): Sends a message to the interface page of the calling resource. The page receives it in the window's message event. - [setDuiUrl (Client)](https://wiki.mymp.gg/en/setDuiUrl.md): Takes a dui to another address. - [setNuiFocus (Client)](https://wiki.mymp.gg/en/setNuiFocus.md): Gives or takes focus from the calling resource's interface page. With focus, the page gets the mouse and the keyboard. - [setNuiKeepInput (Client)](https://wiki.mymp.gg/en/setNuiKeepInput.md): Chooses whether the game keeps getting the mouse and the keyboard while an interface page has focus. ### Lights - [createPointLight (Client)](https://wiki.mymp.gg/en/createPointLight.md): Creates a light that shines in every direction from a point. The light exists on this client only. - [createRectLight (Client)](https://wiki.mymp.gg/en/createRectLight.md): Creates a light that comes from a rectangle, like a panel or a lit window. The light exists on this client only. - [createSpotLight (Client)](https://wiki.mymp.gg/en/createSpotLight.md): Creates a light that shines inside a cone, like a spotlight. The light exists on this client only. - [dxDrawPointLight (Client)](https://wiki.mymp.gg/en/dxDrawPointLight.md): Lights a point in every direction for a single frame, without creating an element. - [dxDrawRectLight (Client)](https://wiki.mymp.gg/en/dxDrawRectLight.md): Lights from a rectangle for a single frame, without creating an element. - [dxDrawSpotLight (Client)](https://wiki.mymp.gg/en/dxDrawSpotLight.md): Lights a cone for a single frame, without creating an element. - [getLightBarnDoor (Client)](https://wiki.mymp.gg/en/getLightBarnDoor.md): Reads a rect light's barn doors. - [getLightCastShadow (Client)](https://wiki.mymp.gg/en/getLightCastShadow.md): Tells whether a light casts shadows. - [getLightColor (Client)](https://wiki.mymp.gg/en/getLightColor.md): Reads a light's colour. - [getLightCone (Client)](https://wiki.mymp.gg/en/getLightCone.md): Reads the opening and the edge hardness of a spot light's cone. - [getLightDirection (Client)](https://wiki.mymp.gg/en/getLightDirection.md): Reads where a spot or rect light points. - [getLightFalloff (Client)](https://wiki.mymp.gg/en/getLightFalloff.md): Reads a light's fade exponent. - [getLightIntensity (Client)](https://wiki.mymp.gg/en/getLightIntensity.md): Reads a light's brightness. - [getLightRadius (Client)](https://wiki.mymp.gg/en/getLightRadius.md): Reads a light's range. - [getLightSize (Client)](https://wiki.mymp.gg/en/getLightSize.md): Reads a rect light's width and height. - [getLightSourceRadius (Client)](https://wiki.mymp.gg/en/getLightSourceRadius.md): Reads the size of a spot light's bulb. - [getLightTangent (Client)](https://wiki.mymp.gg/en/getLightTangent.md): Reads where a rect light's width points. - [getLightType (Client)](https://wiki.mymp.gg/en/getLightType.md): Tells a light's type. - [isLightEnabled (Client)](https://wiki.mymp.gg/en/isLightEnabled.md): Tells whether a light is on. - [setLightBarnDoor (Client)](https://wiki.mymp.gg/en/setLightBarnDoor.md): Changes a rect light's barn doors, which limit where the light leaves the rectangle. - [setLightCastShadow (Client)](https://wiki.mymp.gg/en/setLightCastShadow.md): Turns a light's shadows on or off. - [setLightColor (Client)](https://wiki.mymp.gg/en/setLightColor.md): Changes a light's colour. - [setLightCone (Client)](https://wiki.mymp.gg/en/setLightCone.md): Changes the opening and the edge hardness of a spot light's cone. - [setLightDirection (Client)](https://wiki.mymp.gg/en/setLightDirection.md): Changes where a spot or rect light points. - [setLightEnabled (Client)](https://wiki.mymp.gg/en/setLightEnabled.md): Turns a light on or off without destroying it. - [setLightFalloff (Client)](https://wiki.mymp.gg/en/setLightFalloff.md): Changes how a light fades toward the end of its range. - [setLightIntensity (Client)](https://wiki.mymp.gg/en/setLightIntensity.md): Changes a light's brightness. - [setLightRadius (Client)](https://wiki.mymp.gg/en/setLightRadius.md): Changes a light's range. - [setLightSize (Client)](https://wiki.mymp.gg/en/setLightSize.md): Changes a rect light's width and height. - [setLightSourceRadius (Client)](https://wiki.mymp.gg/en/setLightSourceRadius.md): Changes the size of a spot light's bulb. A larger bulb makes highlights and shadows softer. - [setLightTangent (Client)](https://wiki.mymp.gg/en/setLightTangent.md): Changes where a rect light's width points, turning the rectangle about its normal. ### Effects - [createEffect (Shared)](https://wiki.mymp.gg/en/createEffect.md): Creates a particle effect in the world. On the server every client sees it; on a client, only that client does. - [engineAddEffects (Client)](https://wiki.mymp.gg/en/engineAddEffects.md): Registers the particle effects in a file of the resource, so createEffect can use them by name. - [engineGetEffects (Client)](https://wiki.mymp.gg/en/engineGetEffects.md): Lists the particle effects loaded on this client. - [engineRemoveEffects (Client)](https://wiki.mymp.gg/en/engineRemoveEffects.md): Removes the effects this resource added from a file with engineAddEffects. - [getEffectColor (Shared)](https://wiki.mymp.gg/en/getEffectColor.md): Reads an effect's colour. - [getEffectEvolution (Shared)](https://wiki.mymp.gg/en/getEffectEvolution.md): Reads the level of one of an effect's evolutions. - [getEffectScale (Shared)](https://wiki.mymp.gg/en/getEffectScale.md): Reads an effect's size. - [setEffectColor (Shared)](https://wiki.mymp.gg/en/setEffectColor.md): Tints an effect with a colour. - [setEffectEvolution (Shared)](https://wiki.mymp.gg/en/setEffectEvolution.md): Changes the level of one of an effect's evolutions, a parameter the effect itself declares to vary its look. - [setEffectScale (Shared)](https://wiki.mymp.gg/en/setEffectScale.md): Changes an effect's size. - [stopEffect (Shared)](https://wiki.mymp.gg/en/stopEffect.md): Stops an effect: it stops emitting and the particles already out finish. ### Textures - [engineCreateTexture (Client)](https://wiki.mymp.gg/en/engineCreateTexture.md): Creates a texture from an image file in the resource or from image bytes in memory. The texture exists on this client only. - [engineCreateTxd (Client)](https://wiki.mymp.gg/en/engineCreateTxd.md): Creates an empty texture dictionary under a name. Fill it with engineSetTxdTexture. It exists on this client only. - [engineGetModelTxds (Client)](https://wiki.mymp.gg/en/engineGetModelTxds.md): Lists the txds a model takes its textures from, in the order it searches them. - [engineGetTxds (Client)](https://wiki.mymp.gg/en/engineGetTxds.md): Lists every texture dictionary this client knows, with where each one comes from. - [engineGetTxdTexture (Client)](https://wiki.mymp.gg/en/engineGetTxdTexture.md): Gives a texture element that shows what a txd shows under a texture name, to draw it or use it as a source. - [engineGetTxdTextures (Client)](https://wiki.mymp.gg/en/engineGetTxdTextures.md): Lists the names of the textures a txd gives, links included. - [engineIsAssetLoaded (Client)](https://wiki.mymp.gg/en/engineIsAssetLoaded.md): Tells whether an asset a script made is ready to use. - [engineLoadTxd (Client)](https://wiki.mymp.gg/en/engineLoadTxd.md): Loads a texture dictionary (.ktd) from a resource file under a name. It exists on this client only. - [engineRestoreElementTexture (Client)](https://wiki.mymp.gg/en/engineRestoreElementTexture.md): Removes the texture swaps this resource set on one element with engineSetElementTexture. - [engineRestoreModelTexture (Client)](https://wiki.mymp.gg/en/engineRestoreModelTexture.md): Removes the texture swaps this resource set on a model with engineSetModelTexture. - [engineRestoreModelTxd (Client)](https://wiki.mymp.gg/en/engineRestoreModelTxd.md): Takes away the txds this resource put in front of a model with engineSetModelTxd. - [engineRestoreTxdTexture (Client)](https://wiki.mymp.gg/en/engineRestoreTxdTexture.md): Removes the links this resource made in a txd with engineSetTxdTexture, so it gives its own textures again. - [engineRestoreTxdTextureSampling (Client)](https://wiki.mymp.gg/en/engineRestoreTxdTextureSampling.md): Removes the sampling override this resource set on a txd's texture with engineSetTxdTextureSampling. - [engineRestoreWorldTexture (Client)](https://wiki.mymp.gg/en/engineRestoreWorldTexture.md): Removes the world texture swaps this resource set with engineSetWorldTexture. - [engineSetElementTexture (Client)](https://wiki.mymp.gg/en/engineSetElementTexture.md): Swaps a texture on one vehicle, ped, player or object alone. Other instances of the same model keep their textures. - [engineSetModelTexture (Client)](https://wiki.mymp.gg/en/engineSetModelTexture.md): Swaps a texture on every instance of a model. Only that model's materials change, not the txd the texture comes from. - [engineSetModelTxd (Client)](https://wiki.mymp.gg/en/engineSetModelTxd.md): Puts a txd in front of a model's own, so the model finds its textures there first and falls back to its own for the rest. - [engineSetTxdTexture (Client)](https://wiki.mymp.gg/en/engineSetTxdTexture.md): Puts an image in a txd under a texture name, replacing the texture of that name or adding a new one. Everything that reads the txd follows: models, peds, landscapes, roads, particles, water and sky. - [engineSetTxdTextureSampling (Client)](https://wiki.mymp.gg/en/engineSetTxdTextureSampling.md): Overrides how the world samples a txd's texture: what happens past its edges and how it is filtered. It takes the place of the material's own addressing. - [engineSetWorldTexture (Client)](https://wiki.mymp.gg/en/engineSetWorldTexture.md): Swaps a texture on every model of the chosen kinds that uses it. Only the models' materials change, not the txd the texture comes from. - [onClientAssetLoad (Client)](https://wiki.mymp.gg/en/onClientAssetLoad.md): Fired once when an asset a script started loading in the background is ready, or has failed. ### Materials and shaders - [engineAddPostProcess (Client)](https://wiki.mymp.gg/en/engineAddPostProcess.md): Turns on a post process on the screen: a material whose shader is #type post. - [engineCreateMaterial (Client)](https://wiki.mymp.gg/en/engineCreateMaterial.md): Creates a material: a shader with parameter values, which then replaces or overlays the materials of models. - [engineCreateShader (Client)](https://wiki.mymp.gg/en/engineCreateShader.md): Creates a shader from a .shader file or from its source text. The shader compiles in the background. - [engineGetElementStencil (Client)](https://wiki.mymp.gg/en/engineGetElementStencil.md): Gives the stencil value a vehicle, ped or object is marked with. - [engineGetMaterialAlphaClip (Client)](https://wiki.mymp.gg/en/engineGetMaterialAlphaClip.md): Gives whether the material cuts pixels out by their alpha, and below which alpha. - [engineGetMaterialParameters (Client)](https://wiki.mymp.gg/en/engineGetMaterialParameters.md): Lists the parameters of the shader a material uses. - [engineGetMaterialShader (Client)](https://wiki.mymp.gg/en/engineGetMaterialShader.md): Gives the shader a material uses. - [engineGetMaterialSwitches (Client)](https://wiki.mymp.gg/en/engineGetMaterialSwitches.md): Lists the static switches of a material's shader, with the value each one has in it. - [engineGetMaterialValue (Client)](https://wiki.mymp.gg/en/engineGetMaterialValue.md): Reads a value the material sets: a parameter, a static switch or a TARGET_n output. - [engineGetModelMaterials (Client)](https://wiki.mymp.gg/en/engineGetModelMaterials.md): Lists the loaded model's materials, in the order the model keeps them. - [engineGetModelStencil (Client)](https://wiki.mymp.gg/en/engineGetModelStencil.md): Gives the stencil value a model is marked with. - [engineGetPostImage (Client)](https://wiki.mymp.gg/en/engineGetPostImage.md): Gives the image a post process step produces, to draw it or use it in another material. - [engineGetShaderErrors (Client)](https://wiki.mymp.gg/en/engineGetShaderErrors.md): Lists the errors from the last compile of a shader made with engineCreateShader. - [engineGetShaderGlobal (Client)](https://wiki.mymp.gg/en/engineGetShaderGlobal.md): Reads a shader global's current value. - [engineGetShaderGlobals (Client)](https://wiki.mymp.gg/en/engineGetShaderGlobals.md): Lists every shader global, from packs and scripts. - [engineGetShaderParameters (Client)](https://wiki.mymp.gg/en/engineGetShaderParameters.md): Lists the parameters a shader or preset declares. - [engineGetShaderQuality (Client)](https://wiki.mymp.gg/en/engineGetShaderQuality.md): Gives this client's current material quality. - [engineGetShaders (Client)](https://wiki.mymp.gg/en/engineGetShaders.md): Lists every loaded shader and preset, from packs and scripts. - [engineGetShaderSwitches (Client)](https://wiki.mymp.gg/en/engineGetShaderSwitches.md): Lists the static switches (bool parameters) of a shader or preset, with each one's default. - [engineRemovePostProcess (Client)](https://wiki.mymp.gg/en/engineRemovePostProcess.md): Turns off a post process this resource turned on with engineAddPostProcess. - [engineResetMaterialValue (Client)](https://wiki.mymp.gg/en/engineResetMaterialValue.md): Drops a value the material set, or all of them, going back to what its base gives. - [engineResetShaderGlobal (Client)](https://wiki.mymp.gg/en/engineResetShaderGlobal.md): Drops the value this resource gave a shader global, so the global goes back to the next one's value. - [engineRestoreElementMaterial (Client)](https://wiki.mymp.gg/en/engineRestoreElementMaterial.md): Undoes what this resource's engineSetElementMaterial did of a single vehicle, ped or object. - [engineRestoreElementOverlay (Client)](https://wiki.mymp.gg/en/engineRestoreElementOverlay.md): Undoes what this resource's engineSetElementOverlay did of a single vehicle, ped or object. - [engineRestoreElementStencil (Client)](https://wiki.mymp.gg/en/engineRestoreElementStencil.md): Removes the stencil mark this resource set with engineSetElementStencil. - [engineRestoreModelMaterial (Client)](https://wiki.mymp.gg/en/engineRestoreModelMaterial.md): Undoes what this resource's engineSetModelMaterial did of every instance of a model. - [engineRestoreModelOverlay (Client)](https://wiki.mymp.gg/en/engineRestoreModelOverlay.md): Undoes what this resource's engineSetModelOverlay did of every instance of a model. - [engineRestoreModelStencil (Client)](https://wiki.mymp.gg/en/engineRestoreModelStencil.md): Removes the stencil mark this resource set with engineSetModelStencil. - [engineRestoreWorldMaterial (Client)](https://wiki.mymp.gg/en/engineRestoreWorldMaterial.md): Undoes what this resource's engineSetWorldMaterial did of every model in the world. - [engineRestoreWorldOverlay (Client)](https://wiki.mymp.gg/en/engineRestoreWorldOverlay.md): Undoes what this resource's engineSetWorldOverlay did of every model in the world. - [engineSetElementMaterial (Client)](https://wiki.mymp.gg/en/engineSetElementMaterial.md): Replaces the chosen materials of a single vehicle, ped or object with a material. - [engineSetElementOverlay (Client)](https://wiki.mymp.gg/en/engineSetElementOverlay.md): Draws a material as an extra layer over the chosen materials of a single vehicle, ped or object. - [engineSetElementStencil (Client)](https://wiki.mymp.gg/en/engineSetElementStencil.md): Marks a vehicle, ped or object with a stencil value, which post shaders read for outlines, highlights and similar effects. - [engineSetMaterialAlphaClip (Client)](https://wiki.mymp.gg/en/engineSetMaterialAlphaClip.md): Makes the material cut out pixels whose alpha is below a threshold, or stop cutting out. - [engineSetMaterialShader (Client)](https://wiki.mymp.gg/en/engineSetMaterialShader.md): Changes a material's shader, keeping the values it already has. - [engineSetMaterialValue (Client)](https://wiki.mymp.gg/en/engineSetMaterialValue.md): Sets a material's value: a shader parameter, a static switch or the render target of a TARGET_n output. - [engineSetModelMaterial (Client)](https://wiki.mymp.gg/en/engineSetModelMaterial.md): Replaces the chosen materials of every instance of a model with a material. - [engineSetModelOverlay (Client)](https://wiki.mymp.gg/en/engineSetModelOverlay.md): Draws a material as an extra layer over the chosen materials of every instance of a model. - [engineSetModelStencil (Client)](https://wiki.mymp.gg/en/engineSetModelStencil.md): Marks every instance of a model with a stencil value, which post shaders read for outlines, highlights and similar effects. - [engineSetShaderGlobal (Client)](https://wiki.mymp.gg/en/engineSetShaderGlobal.md): Sets a shader global, a value every shader reads. A new name creates the global. - [engineSetShaderQuality (Client)](https://wiki.mymp.gg/en/engineSetShaderQuality.md): Changes this client's material quality. Shaders that read QUALITY are compiled for the new level. - [engineSetWorldMaterial (Client)](https://wiki.mymp.gg/en/engineSetWorldMaterial.md): Replaces the chosen materials of every model in the world with a material. - [engineSetWorldOverlay (Client)](https://wiki.mymp.gg/en/engineSetWorldOverlay.md): Draws a material as an extra layer over the chosen materials of every model in the world. ### Models - [engineCreateModel (Client)](https://wiki.mymp.gg/en/engineCreateModel.md): Makes a new model under a name, on this client only. It is used by its name, like any other model. - [engineGetModels (Client)](https://wiki.mymp.gg/en/engineGetModels.md): Lists the models this client knows, with where each comes from. - [engineLoadCol (Client)](https://wiki.mymp.gg/en/engineLoadCol.md): Loads a collision file (.kbn) from the resource so it can be given to a model. - [engineLoadDrawable (Client)](https://wiki.mymp.gg/en/engineLoadDrawable.md): Loads a drawable (.kdr) from a resource file so it can be given to a model. - [engineRestoreModelCol (Client)](https://wiki.mymp.gg/en/engineRestoreModelCol.md): Takes away the collision this resource gave a model with engineSetModelCol, so it collides as it did before. - [engineRestoreModelDrawable (Client)](https://wiki.mymp.gg/en/engineRestoreModelDrawable.md): Takes away the drawable this resource gave a model with engineSetModelDrawable, so it draws what it drew before. - [engineSetModelCol (Client)](https://wiki.mymp.gg/en/engineSetModelCol.md): Makes a model collide with a collision loaded with engineLoadCol instead of its own. - [engineSetModelDrawable (Client)](https://wiki.mymp.gg/en/engineSetModelDrawable.md): Makes a model draw a drawable loaded with engineLoadDrawable instead of its own. ### Graphics settings - [engineGetAmbientOcclusion (Client)](https://wiki.mymp.gg/en/engineGetAmbientOcclusion.md): Returns how many samples ambient occlusion takes. - [engineGetAntiAliasing (Client)](https://wiki.mymp.gg/en/engineGetAntiAliasing.md): Returns the anti-aliasing in use. - [engineGetBloom (Client)](https://wiki.mymp.gg/en/engineGetBloom.md): Returns how many blur levels bloom uses. - [engineGetClouds (Client)](https://wiki.mymp.gg/en/engineGetClouds.md): Returns how clouds are drawn. - [engineGetDecals (Client)](https://wiki.mymp.gg/en/engineGetDecals.md): Returns how many decals can exist at once and how long they last. - [engineGetLocalLightShadows (Client)](https://wiki.mymp.gg/en/engineGetLocalLightShadows.md): Tells whether local lights cast shadows. - [engineGetMotionBlur (Client)](https://wiki.mymp.gg/en/engineGetMotionBlur.md): Tells whether motion blur is on. - [engineGetParticleDensity (Client)](https://wiki.mymp.gg/en/engineGetParticleDensity.md): Returns the fraction of effect particles that are emitted. - [engineGetParticleScale (Client)](https://wiki.mymp.gg/en/engineGetParticleScale.md): Returns the fraction of the resolution particles are drawn at. - [engineGetReflections (Client)](https://wiki.mymp.gg/en/engineGetReflections.md): Returns the reflection settings. - [engineGetRenderResolution (Client)](https://wiki.mymp.gg/en/engineGetRenderResolution.md): Returns the size in pixels the scene is rendered at and the size of the final image in the window. - [engineGetRenderScale (Client)](https://wiki.mymp.gg/en/engineGetRenderScale.md): Returns the fraction of the window's resolution the 3D scene is rendered at. - [engineGetShadows (Client)](https://wiki.mymp.gg/en/engineGetShadows.md): Returns the sun's shadow settings. - [engineGetSharpness (Client)](https://wiki.mymp.gg/en/engineGetSharpness.md): Returns how much the final image is sharpened. - [engineGetSunShafts (Client)](https://wiki.mymp.gg/en/engineGetSunShafts.md): Returns the fraction of the resolution sun shafts are computed at. - [engineGetVolumetricFog (Client)](https://wiki.mymp.gg/en/engineGetVolumetricFog.md): Tells whether volumetric fog is on. - [engineHasCollisionLoadedAt (Client)](https://wiki.mymp.gg/en/engineHasCollisionLoadedAt.md): Tells whether the world around a point is solid yet: its collision, buildings and landscapes loaded. - [engineHasModelLoaded (Client)](https://wiki.mymp.gg/en/engineHasModelLoaded.md): Tells whether a model is loaded in memory. - [engineReleaseModel (Client)](https://wiki.mymp.gg/en/engineReleaseModel.md): Drops the model request this resource made with engineRequestModel. - [engineRequestCollisionAt (Client)](https://wiki.mymp.gg/en/engineRequestCollisionAt.md): Asks for the collision around a point to be loaded. The request stays until it has finished loading. - [engineRequestModel (Client)](https://wiki.mymp.gg/en/engineRequestModel.md): Asks the streamer to load a model and keeps it loaded for this resource until it is released. - [engineSetAmbientOcclusion (Client)](https://wiki.mymp.gg/en/engineSetAmbientOcclusion.md): Sets how many samples ambient occlusion takes. More samples darken corners and crevices more precisely. - [engineSetAntiAliasing (Client)](https://wiki.mymp.gg/en/engineSetAntiAliasing.md): Chooses the image's anti-aliasing. - [engineSetBloom (Client)](https://wiki.mymp.gg/en/engineSetBloom.md): Sets how many blur levels bloom uses. More levels spread the glow further. - [engineSetClouds (Client)](https://wiki.mymp.gg/en/engineSetClouds.md): Chooses how clouds are drawn. - [engineSetDecals (Client)](https://wiki.mymp.gg/en/engineSetDecals.md): Sets how many decals (bullet holes, blood, tyre marks) can exist at once and how long they last. - [engineSetLocalLightShadows (Client)](https://wiki.mymp.gg/en/engineSetLocalLightShadows.md): Turns the shadows of local lights (point, spot and rect lights) on or off. - [engineSetMotionBlur (Client)](https://wiki.mymp.gg/en/engineSetMotionBlur.md): Turns motion blur on or off. It starts on on PC. - [engineSetParticleDensity (Client)](https://wiki.mymp.gg/en/engineSetParticleDensity.md): Sets the fraction of effect particles that are emitted. The rest are dropped at random. - [engineSetParticleScale (Client)](https://wiki.mymp.gg/en/engineSetParticleScale.md): Sets the fraction of the resolution particles are drawn at. - [engineSetReflections (Client)](https://wiki.mymp.gg/en/engineSetReflections.md): Sets up reflections: the size of the environment probe and the screen-space reflections. - [engineSetRenderScale (Client)](https://wiki.mymp.gg/en/engineSetRenderScale.md): Sets the fraction of the window's resolution the 3D scene is rendered at. The image is then scaled up to the window's size. - [engineSetShadows (Client)](https://wiki.mymp.gg/en/engineSetShadows.md): Sets up the sun's shadows: how many cascades, their resolution and whether their edges are soft. - [engineSetSharpness (Client)](https://wiki.mymp.gg/en/engineSetSharpness.md): Sets how much the final image is sharpened. - [engineSetSunShafts (Client)](https://wiki.mymp.gg/en/engineSetSunShafts.md): Sets the fraction of the resolution sun shafts are computed at, or turns them off. - [engineSetVolumetricFog (Client)](https://wiki.mymp.gg/en/engineSetVolumetricFog.md): Turns volumetric fog on or off. It starts off. ### Sound - [engineAddSound (Client)](https://wiki.mymp.gg/en/engineAddSound.md): Registers an audio file under a name, which playSound and playSound3D then play by that name. - [engineGetSounds (Client)](https://wiki.mymp.gg/en/engineGetSounds.md): Lists the named sounds in effect now: the game's, the packs' and the resources'. - [engineRemoveSound (Client)](https://wiki.mymp.gg/en/engineRemoveSound.md): Removes a sound this resource registered with engineAddSound. If another registration of the same name exists, it takes over again. - [getSFXStatus (Client)](https://wiki.mymp.gg/en/getSFXStatus.md): Tells whether a GTA San Andreas audio container is available to playSFX and playSFX3D. - [getSoundBPM (Client)](https://wiki.mymp.gg/en/getSoundBPM.md): Detects the sound's tempo in beats per minute, rounded down. - [getSoundBufferLength (Client)](https://wiki.mymp.gg/en/getSoundBufferLength.md): Kept for MTA compatibility, where it gives the buffer length of an internet stream. - [getSoundEffectParameters (Client)](https://wiki.mymp.gg/en/getSoundEffectParameters.md): Returns the current parameters of an audio effect that is on, on a sound or a player's voice. - [getSoundEffects (Client)](https://wiki.mymp.gg/en/getSoundEffects.md): Lists the audio effects of a sound or a player's voice and tells which are on. - [getSoundFFTData (Client)](https://wiki.mymp.gg/en/getSoundFFTData.md): Returns the frequency spectrum of what the sound is playing right now, for building visualisers. - [getSoundLength (Shared)](https://wiki.mymp.gg/en/getSoundLength.md): Returns the sound's length. - [getSoundLevelData (Client)](https://wiki.mymp.gg/en/getSoundLevelData.md): Returns the peak level of each channel over the sound's last 20 ms. - [getSoundMaxDistance (Shared)](https://wiki.mymp.gg/en/getSoundMaxDistance.md): Returns the distance at which a 3D sound goes silent. - [getSoundMetaTags (Client)](https://wiki.mymp.gg/en/getSoundMetaTags.md): Reads the audio file's tags (MP3's ID3, OGG's and FLAC's comments, WAV's INFO). - [getSoundMinDistance (Shared)](https://wiki.mymp.gg/en/getSoundMinDistance.md): Returns how far a 3D sound plays at full volume. - [getSoundPan (Client)](https://wiki.mymp.gg/en/getSoundPan.md): Returns the pan of a sound with no position. - [getSoundPosition (Shared)](https://wiki.mymp.gg/en/getSoundPosition.md): Returns the point in the track the sound is playing. - [getSoundProperties (Client)](https://wiki.mymp.gg/en/getSoundProperties.md): Returns a sound's sample rate, tempo and pitch, and whether it plays backwards. - [getSoundSpeaker (Client)](https://wiki.mymp.gg/en/getSoundSpeaker.md): Returns the ped who speaks a sound. - [getSoundSpeed (Shared)](https://wiki.mymp.gg/en/getSoundSpeed.md): Returns a sound's speed. - [getSoundVolume (Shared)](https://wiki.mymp.gg/en/getSoundVolume.md): Returns a sound's volume, not counting how it falls with distance. - [getSoundWaveData (Client)](https://wiki.mymp.gg/en/getSoundWaveData.md): Returns the waveform of what the sound just played, for drawing oscilloscopes. - [isShowSoundEnabled (Client)](https://wiki.mymp.gg/en/isShowSoundEnabled.md): Tells whether showSound is on. - [isSoundLooped (Shared)](https://wiki.mymp.gg/en/isSoundLooped.md): Tells whether a sound plays again when it reaches its end. - [isSoundPanningEnabled (Client)](https://wiki.mymp.gg/en/isSoundPanningEnabled.md): Tells whether a 3D sound has stereo panning on. - [isSoundPaused (Shared)](https://wiki.mymp.gg/en/isSoundPaused.md): Tells whether a sound is paused. - [isWorldSoundEnabled (Client)](https://wiki.mymp.gg/en/isWorldSoundEnabled.md): Tells whether a world sound, or a group of them, is on. - [playSFX (Client)](https://wiki.mymp.gg/en/playSFX.md): Plays a sound from GTA San Andreas's audio banks, with no position in the world. - [playSFX3D (Client)](https://wiki.mymp.gg/en/playSFX3D.md): Plays a sound from GTA San Andreas's audio banks at a position in the world. - [playSound (Client)](https://wiki.mymp.gg/en/playSound-client.md): Plays a sound with no position in the world, on this client only. Fires onClientSoundStarted with the reason play. - [playSound (Server)](https://wiki.mymp.gg/en/playSound-server.md): Creates a sound with no position in the world that every client plays together. Changes made to it on the server reach everyone. - [playSound3D (Client)](https://wiki.mymp.gg/en/playSound3D-client.md): Plays a sound at a position in the world, on this client only. Its volume falls with distance between setSoundMinDistance (5 m) and setSoundMaxDistance (20 m). Fires onClientSoundStarted with play. - [playSound3D (Server)](https://wiki.mymp.gg/en/playSound3D-server.md): Creates a sound at a position in the world that every client plays together. Changes made to it on the server reach everyone. - [playSoundFrontEnd (Client)](https://wiki.mymp.gg/en/playSoundFrontEnd-client.md): Plays one of GTA San Andreas's interface sounds, such as the menu and mission ones. - [resetWorldSounds (Client)](https://wiki.mymp.gg/en/resetWorldSounds.md): Turns back on every world sound turned off with setWorldSoundEnabled. - [setSoundEffectEnabled (Client)](https://wiki.mymp.gg/en/setSoundEffectEnabled.md): Turns an audio effect on or off on a sound or a player's voice. When turned on, the effect starts with its default parameters. - [setSoundEffectParameter (Client)](https://wiki.mymp.gg/en/setSoundEffectParameter.md): Changes a parameter of an audio effect that is on, on a sound or a player's voice. - [setSoundLooped (Shared)](https://wiki.mymp.gg/en/setSoundLooped.md): Turns looping on or off for a sound. On the server, the change is sent to every client. - [setSoundMaxDistance (Shared)](https://wiki.mymp.gg/en/setSoundMaxDistance.md): Sets the distance at which a 3D sound goes silent. The default is 20 m. On the server, the change is sent to every client. - [setSoundMinDistance (Shared)](https://wiki.mymp.gg/en/setSoundMinDistance.md): Sets how far a 3D sound plays at full volume. The default is 5 m. On the server, the change is sent to every client. - [setSoundPan (Client)](https://wiki.mymp.gg/en/setSoundPan.md): Moves a sound with no position towards the left or the right. - [setSoundPanningEnabled (Client)](https://wiki.mymp.gg/en/setSoundPanningEnabled.md): Turns stereo panning on or off for a 3D sound. When on, the sound leans left or right depending on the camera. It starts on. - [setSoundPaused (Shared)](https://wiki.mymp.gg/en/setSoundPaused.md): Pauses or resumes a sound. On the server, the change is sent to every client. - [setSoundPosition (Shared)](https://wiki.mymp.gg/en/setSoundPosition.md): Jumps to a point in the track. The value is kept between 0 and the sound's length. On the server, the change is sent to every client. - [setSoundProperties (Client)](https://wiki.mymp.gg/en/setSoundProperties.md): Changes a sound's sample rate, tempo and pitch, and whether it plays backwards. - [setSoundSpeaker (Client)](https://wiki.mymp.gg/en/setSoundSpeaker.md): Has a ped speak a sound: its mouth moves with the sound's level and, if the sound is 3D, it comes from the ped's head every frame. - [setSoundSpeed (Shared)](https://wiki.mymp.gg/en/setSoundSpeed.md): Changes a sound's speed. The pitch changes with it. On the server, the change is sent to every client. - [setSoundVolume (Shared)](https://wiki.mymp.gg/en/setSoundVolume.md): Changes a sound's volume. On a 3D sound, it still falls with distance. On the server, the change is sent to every client. - [setWorldSoundEnabled (Client)](https://wiki.mymp.gg/en/setWorldSoundEnabled.md): Turns the game world's sounds (footsteps, gunfire, collisions and more) on or off by group or one by one. - [showSound (Client)](https://wiki.mymp.gg/en/showSound.md): Writes the group and index of every world sound that plays to the debug console. Works only in development mode. - [stopSound (Client)](https://wiki.mymp.gg/en/stopSound-client.md): Stops a sound this client created and destroys the element. Fires onClientSoundStopped with the reason destroyed. - [stopSound (Server)](https://wiki.mymp.gg/en/stopSound-server.md): Stops a sound the server created and destroys the element on every client. - [onClientSoundStarted (Client)](https://wiki.mymp.gg/en/onClientSoundStarted.md): Fired when a sound starts playing on this client or leaves a pause. - [onClientSoundStopped (Client)](https://wiki.mymp.gg/en/onClientSoundStopped.md): Fired when a sound stops playing on this client: paused, stopped or finished. - [onClientWorldSound (Client)](https://wiki.mymp.gg/en/onClientWorldSound.md): Fired when the game is about to play a world sound. Cancelling the event keeps the sound from playing. ### Voice - [addPlayerToVoiceChannel (Server)](https://wiki.mymp.gg/en/addPlayerToVoiceChannel.md): Puts a player in a voice channel. From then on they hear and are heard by the others in the channel. - [createVoiceChannel (Server)](https://wiki.mymp.gg/en/createVoiceChannel.md): Creates a voice channel. Players only hear each other through the channels they are in. - [deleteVoiceChannel (Server)](https://wiki.mymp.gg/en/deleteVoiceChannel.md): Destroys a voice channel. The players who were in it stop hearing each other through it. - [isPlayerTalking (Client)](https://wiki.mymp.gg/en/isPlayerTalking-client.md): Tells whether a player is speaking on voice chat, as this client sees it. - [isPlayerTalking (Server)](https://wiki.mymp.gg/en/isPlayerTalking-server.md): Tells whether a player is speaking on voice chat. - [removePlayerFromVoiceChannel (Server)](https://wiki.mymp.gg/en/removePlayerFromVoiceChannel.md): Takes a player out of a voice channel. - [setPlayerDeafInVoiceChannel (Server)](https://wiki.mymp.gg/en/setPlayerDeafInVoiceChannel.md): Deafens a player in a voice channel: the others still hear them, but they hear nobody through that channel. - [setPlayerMutedInVoiceChannel (Server)](https://wiki.mymp.gg/en/setPlayerMutedInVoiceChannel.md): Mutes a player in a voice channel: they still hear the channel, but nobody hears them through it. - [setPlayerVoiceIgnoreFrom (Server)](https://wiki.mymp.gg/en/setPlayerVoiceIgnoreFrom.md): Makes a player stop hearing the voice of certain elements, in every channel. - [onClientPlayerVoiceStart (Client)](https://wiki.mymp.gg/en/onClientPlayerVoiceStart.md): Fired on this client when a player starts speaking on voice chat: the local player when they press the talk key, or another player when their voice arrives. - [onClientPlayerVoiceStop (Client)](https://wiki.mymp.gg/en/onClientPlayerVoiceStop.md): Fired on this client when a player stops speaking on voice chat. - [onPlayerVoiceStart (Server)](https://wiki.mymp.gg/en/onPlayerVoiceStart.md): Fired when a player starts speaking on voice chat. Cancelling the event makes nobody hear that speech. - [onPlayerVoiceStop (Server)](https://wiki.mymp.gg/en/onPlayerVoiceStop.md): Fired when a player stops speaking on voice chat. ### Server - [getDevelopmentMode (Client)](https://wiki.mymp.gg/en/getDevelopmentMode.md): Tells whether development mode is on on this client. - [getServerIP (Server)](https://wiki.mymp.gg/en/getServerIP-server.md): Returns the machine's public IPv4 address, read from its network interfaces at start. - [getServerName (Server)](https://wiki.mymp.gg/en/getServerName.md): Returns the server's name, from the server_name convar. - [getServerPassword (Server)](https://wiki.mymp.gg/en/getServerPassword.md): Returns the password a player has to give to join. - [setDevelopmentMode (Client)](https://wiki.mymp.gg/en/setDevelopmentMode.md): Turns development mode on or off on this client. While it is on, the showcol and showsound console commands draw the collision shapes and the world sounds. - [setServerPassword (Server)](https://wiki.mymp.gg/en/setServerPassword.md): Changes the password to join the server. Players already in stay. - [shutdown (Server)](https://wiki.mymp.gg/en/shutdown.md): Shuts the server down. It fires onShutdown first. - [onShutdown (Server)](https://wiki.mymp.gg/en/onShutdown.md): Fired when a script calls shutdown, right before the server shuts down. ### Database - [dbConnect (Server)](https://wiki.mymp.gg/en/dbConnect.md): Opens a connection to an SQLite or MySQL database. Queries run on the connection's own thread. - [dbExec (Server)](https://wiki.mymp.gg/en/dbExec.md): Runs an SQL statement without waiting for an answer. - [dbFree (Server)](https://wiki.mymp.gg/en/dbFree.md): Discards a dbQuery query whose answer will not be read. - [dbPoll (Server)](https://wiki.mymp.gg/en/dbPoll.md): Reads the answer of a dbQuery query, waiting for it if needed. - [dbPrepareString (Server)](https://wiki.mymp.gg/en/dbPrepareString.md): Fills an SQL's placeholders with escaped values, without running it. - [dbQuery (Server)](https://wiki.mymp.gg/en/dbQuery.md): Sends an SQL query whose answer is read later with dbPoll. ### Network and HTTP - [fetchRemote (Server)](https://wiki.mymp.gg/en/fetchRemote.md): Makes an HTTP or HTTPS request and hands the response to a function when it arrives. - [getServerIp (Client)](https://wiki.mymp.gg/en/getServerIp-client.md): Returns the address of the server this client is connected to.