Client Scripting Functions
From Multi Theft Auto: Wiki
Contributors: Did you create a page but it's not on this list? Confused? Read: Adding Pages to Categories and Templates
This page lists all the client-side scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function or event, use Requested Functions and Events
For more functions, check the useful functions page.
Contents
- 1 Audio functions
- 2 Blip functions
- 3 Browser functions
- 4 Camera functions
- 5 Clothes and body functions
- 6 Collision shape functions
- 7 Cursor functions
- 8 Drawing functions
- 9 Effects functions
- 10 Element functions
- 11 Engine functions
- 12 Event functions
- 13 Explosion functions
- 14 File functions
- 15 Fire functions
- 16 GUI functions
- 17 Input functions
- 18 Light functions
- 19 Marker functions
- 20 Matrix functions
- 21 Object functions
- 22 Output functions
- 23 Ped functions
- 24 Pickup functions
- 25 Player functions
- 26 Projectile functions
- 27 Radar area functions
- 28 Resource functions
- 29 Searchlight functions
- 30 Team functions
- 31 Utility functions
- 32 UTF8 Library
- 33 Vehicle functions
- 34 Water functions
- 35 Weapon functions
- 36 Weapon creation functions
- 37 World functions
- 38 XML functions
Audio functions
- getSoundBufferLength
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundPanningEnabled
- isSoundPaused
- playSFX
- playSFX3D
- playSound
- playSound3D
- playSoundFrontEnd
- setRadioChannel
- setSoundEffectEnabled
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
Blip functions
- createBlip
- createBlipAttachedTo
- getBlipColor
- getBlipIcon
- getBlipOrdering
- getBlipSize
- getBlipVisibleDistance
- setBlipColor
- setBlipIcon
- setBlipOrdering
- setBlipSize
- setBlipVisibleDistance
Browser functions
- canBrowserNavigateBack
- canBrowserNavigateForward
- createBrowser
- executeBrowserJavascript
- focusBrowser
- getBrowserProperty
- getBrowserSettings
- getBrowserSource
- getBrowserTitle
- getBrowserURL
- injectBrowserMouseDown
- injectBrowserMouseMove
- injectBrowserMouseUp
- injectBrowserMouseWheel
- isBrowserDomainBlocked
- isBrowserFocused
- isBrowserLoading
- loadBrowserURL
- navigateBrowserBack
- navigateBrowserForward
- reloadBrowserPage
- requestBrowserDomains
- resizeBrowser
- setBrowserAjaxHandler
- setBrowserProperty
- setBrowserRenderingPaused
- setBrowserVolume
- toggleBrowserDevTools
GUI Functions
Camera functions
- fadeCamera
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraInterior
- getCameraMatrix
- getCameraShakeLevel
- getCameraTarget
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraInterior
- setCameraMatrix
- setCameraShakeLevel
- setCameraTarget
- setCameraViewMode
Clothes and body functions
- addPedClothes
- getBodyPartName
- getClothesByTypeIndex
- getClothesTypeName
- getPedClothes
- getTypeIndexFromClothes
- removePedClothes
Collision shape functions
Cursor functions
Drawing functions
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
FROM VERSION 1.5.7 r19626 ONWARDS
- dxDrawMaterialSectionLine3D
- dxDrawRectangle
- dxDrawText
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsSize
- dxGetPixelsFormat
- dxGetStatus
- dxGetTextWidth
- dxGetTexturePixels
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderValue
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource
Effects functions
- createEffect
- fxAddBlood
- fxAddBulletImpact
- fxAddBulletSplash
- fxAddDebris
- fxAddFootSplash
- fxAddGlass
- fxAddGunshot
- fxAddPunchImpact
- fxAddSparks
- fxAddTankFire
- fxAddTyreBurst
- fxAddWaterHydrant
- fxAddWaterSplash
- fxAddWood
- getEffectDensity
- getEffectSpeed
- setEffectDensity
- setEffectSpeed
Element functions
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementBoundingBox
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementColShape
- getElementCollisionsEnabled
- getElementData
- getElementDimension
- getElementDistanceFromCentreOfMassToBaseOfModel
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRadius
- getElementRotation
- getElementType
- getElementVelocity
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementCollidableWith
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLocal
- isElementLowLOD
- isElementOnScreen
- isElementStreamable
- isElementStreamedIn
- isElementSyncer
- isElementWaitingForGroundToLoad
- isElementWithinColShape
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollidableWith
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementMatrix
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementStreamable
- setElementVelocity
- setLowLODElement
Engine functions
- engineApplyShaderToWorldTexture
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.5.7 r20147 ONWARDS
- engineGetModelTextureNames
- engineGetVisibleTextureNames
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIFP
- engineLoadTXD
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreModel
- engineSetAsynchronousLoading
- engineSetModelLODDistance
- engineSetSurfaceProperties
- engineGetSurfaceProperties
- engineResetSurfaceProperties
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- triggerLatentServerEvent
- triggerServerEvent
- wasEventCancelled
Explosion functions
File functions
Fire functions
GUI functions
General functions
- guiBlur
- guiFocus
- guiGetAlpha
- guiGetCursorType
- guiGetEnabled
- guiGetFont
- guiGetInputEnabled
- guiGetInputMode
- guiGetPosition
- guiGetProperties
- guiGetProperty
- guiGetScreenSize
- guiGetSize
- guiGetText
- guiGetVisible
- guiMoveToBack
- guiSetAlpha
- guiSetEnabled
- guiSetFont
- guiSetInputEnabled
- guiSetInputMode
- guiSetPosition
- guiSetProperty
- guiSetSize
- guiSetText
- guiSetVisible
- isChatBoxInputActive
- isConsoleActive
- isDebugViewActive
- isMainMenuActive
- isMTAWindowActive
- isTransferBoxActive
- setDebugViewActive
Browsers
Buttons
Checkboxes
Comboboxes
- guiCreateComboBox
- guiComboBoxAddItem
- guiComboBoxClear
- guiComboBoxGetItemCount
- guiComboBoxGetItemText
- guiComboBoxGetSelected
- guiComboBoxIsOpen
- guiComboBoxRemoveItem
- guiComboBoxSetItemText
- guiComboBoxSetOpen
- guiComboBoxSetSelected
Edit Boxes
Gridlists
- guiCreateGridList
- guiGridListAddColumn
- guiGridListAddRow
- guiGridListAutoSizeColumn
- guiGridListClear
- guiGridListGetColumnCount
- guiGridListGetColumnTitle
- guiGridListGetColumnWidth
- guiGridListGetHorizontalScrollPosition
- guiGridListGetItemColor
- guiGridListGetItemData
- guiGridListGetItemText
- guiGridListGetRowCount
- guiGridListGetSelectedCount
- guiGridListGetSelectedItem
- guiGridListGetSelectedItems
- guiGridListGetSelectionMode
- guiGridListIsSortingEnabled
- guiGridListGetVerticalScrollPosition
- guiGridListInsertRowAfter
- guiGridListRemoveColumn
- guiGridListRemoveRow
- guiGridListSetColumnTitle
- guiGridListSetColumnWidth
- guiGridListSetHorizontalScrollPosition
- guiGridListSetItemColor
- guiGridListSetItemData
- guiGridListSetItemText
- guiGridListSetScrollBars
- guiGridListSetSelectedItem
- guiGridListSetSelectionMode
- guiGridListSetSortingEnabled
- guiGridListSetVerticalScrollPosition
Memos
Progressbars
Radio Buttons
Scrollbars
Scrollpanes
- guiCreateScrollPane
- guiScrollPaneGetHorizontalScrollPosition
- guiScrollPaneGetVerticalScrollPosition
- guiScrollPaneSetHorizontalScrollPosition
- guiScrollPaneSetScrollBars
- guiScrollPaneSetVerticalScrollPosition
Static Images
Tab Panels
Tabs
Text Labels
- guiCreateLabel
- guiLabelGetColor
- guiLabelGetFontHeight
- guiLabelGetTextExtent
- guiLabelSetColor
- guiLabelSetHorizontalAlign
- guiLabelSetVerticalAlign
Windows
Input functions
- getCommandHandlers
- getCommandsBoundToKey
- getFunctionsBoundToKey
- getKeyBoundToCommand
- getKeyBoundToFunction
- getKeyState
- isControlEnabled
- removeCommandHandler
- toggleAllControls
- toggleControl
- unbindKey
Light functions
- createLight
- getLightColor
- getLightDirection
- getLightRadius
- getLightType
- setLightColor
- setLightDirection
- setLightRadius
Marker functions
- createMarker
- getMarkerColor
- getMarkerCount
- getMarkerIcon
- getMarkerSize
- getMarkerTarget
- getMarkerType
- isElementWithinMarker
- setMarkerColor
- setMarkerIcon
- setMarkerSize
- setMarkerTarget
- setMarkerType
Matrix functions
Object functions
- breakObject
- createObject
- getObjectMass
- getObjectScale
- isObjectBreakable
- moveObject
- respawnObject
- setObjectBreakable
- setObjectMass
- setObjectScale
- stopObject
- toggleObjectRespawn
Output functions
Ped functions
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedOxygenLevel
- getPedSimplestTask
- getPedStat
- getPedTarget
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedTotalAmmo
- getPedVoice
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponMuzzlePosition
- getPedWeaponSlot
- getValidPedModels
- givePedWeapon
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDoingTask
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedClothes
- removePedFromVehicle
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.5.7 r19626 ONWARDS
- setPedFootBloodEnabled
- setPedHeadless
- setPedLookAt
- setPedOnFire
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle
Pickup functions
Player functions
- forcePlayerMap
- getLocalPlayer
- getPlayerBlurLevel
- getPlayerFromName
- getPlayerMapBoundingBox
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerTeam
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerHudComponentVisible
- isPlayerMapForced
- isPlayerMapVisible
- isPlayerNametagShowing
- isVoiceEnabled
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
Projectile functions
- createProjectile
- detonateSatchels
- getProjectileCounter
- getProjectileCreator
- getProjectileForce
- getProjectileTarget
- getProjectileType
- setProjectileCounter
Radar area functions
- createRadarArea
- getRadarAreaColor
- getRadarAreaSize
- isInsideRadarArea
- isRadarAreaFlashing
- setRadarAreaColor
- setRadarAreaFlashing
- setRadarAreaSize
Resource functions
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceGUIElement
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo
- abortRemoteRequest
Searchlight functions
- createSearchLight
- getSearchLightEndPosition
- getSearchLightEndRadius
- getSearchLightStartPosition
- getSearchLightStartRadius
- setSearchLightEndPosition
- setSearchLightEndRadius
- setSearchLightStartPosition
- setSearchLightStartRadius
Team functions
- countPlayersInTeam
- getPlayerTeam
- getPlayersInTeam
- getTeamColor
- getTeamFriendlyFire
- getTeamFromName
- getTeamName
Utility functions
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace
- createTrayNotification
- debugSleep
- downloadFile
- decodeString
- encodeString
- fromJSON
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getFPSLimit
- getKeyboardLayout
- getLocalization
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimers
- getTimerDetails
- gettok
- getUserdataType
- getVersion
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- isTrayNotificationEnabled
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setClipboard
- setDevelopmentMode
- setFPSLimit
- setTimer
- setWindowFlashing
- sha256
- split
- teaDecode
- teaEncode
- tocolor
- toJSON
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub
UTF8 Library
- utf8.byte
- utf8.char
- utf8.charpos
- utf8.escape
- utf8.find
- utf8.fold
- utf8.gmatch
- utf8.gsub
- utf8.insert
- utf8.len
- utf8.lower
- utf8.match
- utf8.ncasecmp
- utf8.next
- utf8.remove
- utf8.reverse
- utf8.sub
- utf8.title
- utf8.upper
- utf8.width
- utf8.widthindex
Vehicle functions
FROM VERSION 1.5.7 r19626 ONWARDS
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getHeliBladeCollisionsEnabled
- getHelicopterRotorSpeed
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- getVehicleAdjustableProperty
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleComponentPosition
- getVehicleComponentRotation
- getVehicleComponentScale
- getVehicleComponentVisible
- getVehicleComponents
- getVehicleController
- getVehicleCurrentGear
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleGravity
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelDummyPosition
- getVehicleModelExhaustFumesPosition
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleNitroCount
- getVehicleNitroLevel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirens
- getVehicleSirensOn
- getVehicleSirenParams
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainChainEngine
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleNitroActivated
- isVehicleNitroRecharging
- isVehicleOnGround
- isVehicleTaxiLightOn
- isVehicleWheelOnGround
- isVehicleWindowOpen
- removeVehicleUpgrade
- resetVehicleComponentPosition
- resetVehicleComponentRotation
- resetVehicleComponentScale
- setHeliBladeCollisionsEnabled
- setHelicopterRotorSpeed
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- setVehicleAdjustableProperty
- setVehicleColor
- setVehicleComponentPosition
- setVehicleComponentRotation
- setVehicleComponentScale
- setVehicleComponentVisible
- setVehicleDamageProof
- setVehicleDirtLevel
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleGravity
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleModelDummyPosition
- setVehicleModelExhaustFumesPosition
- setVehicleNitroActivated
- setVehicleNitroCount
- setVehicleNitroLevel
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
Water functions
- createWater
- getWaterColor
- getWaterLevel
- getWaterVertexPosition
- getWaveHeight
- isWaterDrawnLast
- resetWaterColor
- resetWaterLevel
- setWaterColor
- setWaterDrawnLast
- setWaterLevel
- setWaterVertexPosition
- setWaveHeight
Weapon functions
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- getWeaponProperty
Weapon creation functions
- createWeapon
- fireWeapon
- getWeaponAmmo
- getWeaponClipAmmo
- getWeaponFiringRate
- getWeaponFlags
- getWeaponOwner
- getWeaponProperty
- getWeaponState
- getWeaponTarget
- resetWeaponFiringRate
- setWeaponAmmo
- setWeaponClipAmmo
- setWeaponFiringRate
- setWeaponFlags
- setWeaponProperty
- setWeaponState
- setWeaponTarget
World functions
- areTrafficLightsLocked
- createSWATRope
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getBirdsEnabled
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGravity
- getGroundPosition
- getHeatHaze
- getInteriorFurnitureEnabled
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getNearClipDistance
- getOcclusionsEnabled
- getPedsLODDistance
- setPedsLODDistance
- resetPedsLODDistance
- getPlayerBlurLevel
- getRainLevel
- getScreenFromWorldPosition
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getVehiclesLODDistance
- getWeather
- getWindVelocity
- getWorldFromScreenPosition
- getZoneName
- isAmbientSoundEnabled
- isGarageOpen
- isLineOfSightClear
- isWorldSoundEnabled
- isWorldSpecialPropertyEnabled
- processLineOfSight
- removeWorldModel
- resetAmbientSounds
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetVehiclesLODDistance
- resetWindVelocity
- resetWorldSounds
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setAmbientSoundEnabled
- setBirdsEnabled
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorFurnitureEnabled
- setInteriorSoundsEnabled
- setJetpackMaxHeight
- setMinuteDuration
- setMoonSize
- setNearClipDistance
- setOcclusionsEnabled
- setPlayerBlurLevel
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setVehiclesLODDistance
- setWeather
- setWeatherBlended
- setWindVelocity
- setWorldSoundEnabled
- setWorldSpecialPropertyEnabled
- testLineAgainstWater
XML functions
FROM VERSION 1.5.7 r19626 ONWARDS