Client Functions

From GTA Connected
Jump to navigation Jump to search

This is a list of all client functions. For more information on using functions, visit the how to use functions page.

Audio Functions[edit]

audio.createSound
gta.addOneOffSound
gta.playFrontEndSound
gta.playSuspectLastSeen

sound.play
sound.position
sound.stop
sound.volume

Blip Functions[edit]

createBlip
createBlipAttachedTo

blip.children
blip.dimension
blip.getData
blip.getRotation
blip.id
blip.isLocal
blip.isSyncer
blip.isType
blip.name
blip.parent
blip.position
blip.removeAllData
blip.removeData
blip.setData
blip.setRotation
blip.syncer
blip.type

Building Functions[edit]

createBuilding
gta.getBuildings - Previous Name: getBuildings

building.alpha
building.boundingCentre
building.boundingMax
building.boundingMin
building.boundingRadius
building.centerOfMass
building.children
building.collisionPower
building.collisionsEnabled
building.dimension
building.distanceFromCentreOfMassToBaseOfModel
building.getData
building.getRotation
building.heading
building.id
building.interior
building.isLocal
building.isOnScreen
building.isSyncer
building.isType
building.markAsNoLongerNeeded
building.mass
building.matrix
building.modelIndex
building.name
building.parent
building.position
building.removeAllData
building.removeData
building.setData
building.setProofs
building.setRotation
building.status
building.syncer
building.type

Camera Functions[edit]

gta.cameraInterior - Previous Name: cameraInterior
gta.cameraMatrix - Previous Name: cameraMatrix
gta.cameraTarget - Previous Name: cameraTarget
gta.fadeCamera - Previous Name: fadeCamera
gta.fading
gta.restoreCamera - Previous Name: restoreCamera
gta.setCameraLookAt - Previous Name: setCameraLookAt
gta.setCameraLookAtEntity - Previous Name: setCameraLookAtEntity
gta.setCameraMatrix - Previous Name: setCameraMatrix
gta.setCameraTarget - Previous Name: setCameraTarget
gta.setGenerateCarsAroundCamera - Previous Name: setGenerateCarsAroundCamera
gta.updateCamera - Previous Name: updateCamera

Chatbox Functions[edit]

message
setChatWindowEnabled

Cheat Functions[edit]

gta.isCheatEnabled
gta.setCheatEnabled

Civilian Functions[edit]

createCivilian

civilian.alpha
civilian.armour
civilian.boundingCentre
civilian.boundingMax
civilian.boundingMin
civilian.boundingRadius
civilian.buyIceCream
civilian.canBeKnockedOffBike
civilian.centerOfMass
civilian.children
civilian.clearObjective
civilian.clearThreatSearch
civilian.clearWeapons
civilian.collisionPower
civilian.collisionsEnabled
civilian.crouching
civilian.dimension
civilian.distanceFromCentreOfMassToBaseOfModel
civilian.duck
civilian.enterVehicle
civilian.exitVehicle
civilian.getData
civilian.getRotation
civilian.giveWeapon
civilian.hailTaxi
civilian.heading
civilian.health
civilian.heedThreats
civilian.id
civilian.interior
civilian.invincible
civilian.isInVehicle
civilian.isLocal
civilian.isOnScreen
civilian.isSyncer
civilian.isType
civilian.jumping
civilian.lookAt
civilian.markAsNoLongerNeeded
civilian.mass
civilian.matrix
civilian.maxStamina
civilian.modelIndex
civilian.name
civilian.parent
civilian.pointGunAt
civilian.position
civilian.removeAllData
civilian.removeBodyPart
civilian.removeData
civilian.removeFromVehicle
civilian.resurrect
civilian.runTo
civilian.say
civilian.setData
civilian.setPedStats
civilian.setProofs
civilian.setRotation
civilian.setThreatSearch
civilian.setWanderPath
civilian.skin
civilian.sprintTo
civilian.stamina
civilian.staminaDuration
civilian.status
civilian.stayInSamePlace
civilian.syncer
civilian.turnVelocity
civilian.type
civilian.upperTorsoRotation
civilian.vehicle
civilian.velocity
civilian.walkStyle
civilian.walkTo
civilian.warpIntoVehicle
civilian.weapon

Client Functions[edit]

getClientFromPlayerElement
getClients
localClient

client.game
client.getData
client.index
client.name
client.player
client.removeAllData
client.removeData
client.setData

Command Functions[edit]

addCommandHandler
consoleCommand
removeCommandHandler

Cursor Functions[edit]

gta.getMouseSpeed

Custom Text Functions[edit]

gta.clearCustomText
gta.printBig
gta.setCustomText

Cutscene Functions[edit]

gta.cutscene.finished
gta.cutscene.load
gta.cutscene.loadStatus
gta.cutscene.start
gta.cutscene.stop
gta.cutscene.time

Debug Functions[edit]

debugMode

Drawing Functions[edit]

gta.drawRectangle

Effect Functions[edit]

gta.addMovingParticleEffect - Previous Name: addMovingParticleEffect
gta.addParticleEffect - Previous Name: addParticleEffect
gta.createSingleParticle - Previous Name: createSingleParticle

Element Functions[edit]

createElement
destroyElement
getElementFromId
getElementFromName
getElementsByType

element.children
element.dimension
element.getData
element.id
element.isLocal
element.isSyncer
element.isType
element.name
element.parent
element.removeAllData
element.removeData
element.setData
element.syncer
element.type

Entity Functions[edit]

entity.alpha
entity.boundingCentre
entity.boundingMax
entity.boundingMin
entity.boundingRadius
entity.centerOfMass
entity.children
entity.collisionPower
entity.collisionsEnabled
entity.dimension
entity.distanceFromCentreOfMassToBaseOfModel
entity.getData
entity.getRotation
entity.heading
entity.id
entity.interior
entity.isLocal
entity.isOnScreen
entity.isSyncer
entity.isType
entity.markAsNoLongerNeeded
entity.mass
entity.matrix
entity.modelIndex
entity.name
entity.parent
entity.position
entity.removeAllData
entity.removeData
entity.setData
entity.setProofs
entity.setRotation
entity.status
entity.syncer
entity.type

Event Functions[edit]

addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
unbindEventHandler

event.isDefaultPrevented
event.preventDefault

File Functions[edit]

createFile
openFile

Font Functions[edit]

lucasFont.createDefaultFont
lucasFont.createFont
lucasFont.enumFontFamilies

font.measure
font.render
font.size

Game Functions[edit]

gta.game
gta.gameSpeed
gta.loadCOL
gta.loadDFF
gta.loadTXD
gta.standardControls

Game Stat Functions[edit]

gta.getGameStat
gta.setGameStat

Garage Functions[edit]

closeGarage
isGarageClosed
openGarage

Garbage Collection Functions[edit]

collectAllGarbage

graphics Functions[edit]

graphics.drawLine3D
graphics.drawPrimitive3D
graphics.drawQuad3D
graphics.drawRectangle
graphics.drawTriangle3D
graphics.loadBMP
graphics.loadPNG

GUI Functions[edit]

gui.cursorEnabled
gui.cursorPosition
gui.showCursor

HUD Functions[edit]

setHUDEnabled

Key Functions[edit]

bindKey
isKeyDown
isScancodePressed
unbindAllKeys
unbindKey

KeyEvent Functions[edit]

keyEvent.down
keyEvent.isDefaultPrevented
keyEvent.keyCode
keyEvent.mod
keyEvent.preventDefault
keyEvent.repeat
keyEvent.scanCode

Kill Frenzy Functions[edit]

gta.startKillFrenzy

Marker Functions[edit]

marker.children
marker.colour
marker.dimension
marker.getData
marker.getRotation
marker.id
marker.isLocal
marker.isSyncer
marker.isType
marker.name
marker.parent
marker.position
marker.removeAllData
marker.removeData
marker.setData
marker.setRotation
marker.syncer
marker.type

Matrix4x4 Functions[edit]

matrix4x4.getElement
matrix4x4.getVector3
matrix4x4.m11
matrix4x4.m12
matrix4x4.m13
matrix4x4.m14
matrix4x4.m21
matrix4x4.m22
matrix4x4.m23
matrix4x4.m24
matrix4x4.m31
matrix4x4.m32
matrix4x4.m33
matrix4x4.m34
matrix4x4.m41
matrix4x4.m42
matrix4x4.m43
matrix4x4.m44
matrix4x4.multiply
matrix4x4.setElement
matrix4x4.setIdentity
matrix4x4.setInverse
matrix4x4.setMultiply
matrix4x4.setRotate
matrix4x4.setRotateX
matrix4x4.setRotateY
matrix4x4.setRotateZ
matrix4x4.setScale
matrix4x4.setTranslate
matrix4x4.transformCoordinate

Message Functions[edit]

gta.bigMessage
gta.clearMessages
gta.pagerMessage
gta.smallMessage

Miscellaneous Functions[edit]

gta.getRandomSkin
gta.processLineOfSight
gta.setDefaultInteriors
gta.setIsland
gta.tickCount
platform
toColour

Mission Functions[edit]

gta.cancelMission
gta.onMission
gta.startMission

Network Functions[edit]

addNetworkHandler
connect
disconnect
isConnected
isConnecting
removeNetworkHandler
triggerNetworkEvent

Object Functions[edit]

createObject
getObjects
gta.removeWorldObject

object.alpha
object.boundingCentre
object.boundingMax
object.boundingMin
object.boundingRadius
object.centerOfMass
object.children
object.collisionPower
object.collisionsEnabled
object.dimension
object.distanceFromCentreOfMassToBaseOfModel
object.getData
object.getRotation
object.heading
object.id
object.interior
object.isLocal
object.isOnScreen
object.isSyncer
object.isType
object.markAsNoLongerNeeded
object.mass
object.matrix
object.modelIndex
object.name
object.parent
object.position
object.removeAllData
object.removeData
object.setData
object.setProofs
object.setRotation
object.status
object.syncer
object.turnVelocity
object.type
object.velocity

Path Functions[edit]

gta.setCiviliansEnabled - Previous Name: setCiviliansEnabled
gta.setTrafficEnabled - Previous Name: setTrafficEnabled
gta.trafficDensity

Pause Functions[edit]

gta.paused

Ped Functions[edit]

getPeds
gta.forceRandomPedType
gta.pedDensity
gta.tommyFatness

ped.alpha
ped.armour
ped.boundingCentre
ped.boundingMax
ped.boundingMin
ped.boundingRadius
ped.buyIceCream
ped.canBeKnockedOffBike
ped.centerOfMass
ped.children
ped.clearObjective
ped.clearThreatSearch
ped.clearWeapons
ped.collisionPower
ped.collisionsEnabled
ped.crouching
ped.dimension
ped.distanceFromCentreOfMassToBaseOfModel
ped.duck
ped.enterVehicle
ped.exitVehicle
ped.getData
ped.getRotation
ped.giveWeapon
ped.hailTaxi
ped.heading
ped.health
ped.heedThreats
ped.id
ped.interior
ped.invincible
ped.isInVehicle
ped.isLocal
ped.isOnScreen
ped.isSyncer
ped.isType
ped.jumping
ped.lookAt
ped.markAsNoLongerNeeded
ped.mass
ped.matrix
ped.maxStamina
ped.modelIndex
ped.name
ped.parent
ped.pointGunAt
ped.position
ped.removeAllData
ped.removeBodyPart
ped.removeData
ped.removeFromVehicle
ped.resurrect
ped.runTo
ped.say
ped.setData
ped.setPedStats
ped.setProofs
ped.setRotation
ped.setThreatSearch
ped.setWanderPath
ped.skin
ped.sprintTo
ped.stamina
ped.staminaDuration
ped.status
ped.stayInSamePlace
ped.syncer
ped.turnVelocity
ped.type
ped.upperTorsoRotation
ped.vehicle
ped.velocity
ped.walkStyle
ped.walkTo
ped.warpIntoVehicle
ped.weapon

Physical Functions[edit]

physical.alpha
physical.boundingCentre
physical.boundingMax
physical.boundingMin
physical.boundingRadius
physical.centerOfMass
physical.children
physical.collisionPower
physical.collisionsEnabled
physical.dimension
physical.distanceFromCentreOfMassToBaseOfModel
physical.getData
physical.getRotation
physical.heading
physical.id
physical.interior
physical.isLocal
physical.isOnScreen
physical.isSyncer
physical.isType
physical.markAsNoLongerNeeded
physical.mass
physical.matrix
physical.modelIndex
physical.name
physical.parent
physical.position
physical.removeAllData
physical.removeData
physical.setData
physical.setProofs
physical.setRotation
physical.status
physical.syncer
physical.turnVelocity
physical.type
physical.velocity

Pickup Functions[edit]

createPickup
gta.removeHelpPickup
gta.removeHelpPickups

pickup.collected

Player Functions[edit]

createPlayer
gta.setPlayerControl
localPlayer
spawnPlayer

player.alcoholLevel
player.alpha
player.armour
player.boundingCentre
player.boundingMax
player.boundingMin
player.boundingRadius
player.buyIceCream
player.canBeKnockedOffBike
player.centerOfMass
player.children
player.clearObjective
player.clearThreatSearch
player.clearWeapons
player.collisionPower
player.collisionsEnabled
player.crouching
player.dimension
player.distanceFromCentreOfMassToBaseOfModel
player.duck
player.enterVehicle
player.exitVehicle
player.getData
player.getRotation
player.giveWeapon
player.hailTaxi
player.heading
player.health
player.heedThreats
player.id
player.interior
player.invincible
player.isInVehicle
player.isLocal
player.isOnScreen
player.isSyncer
player.isType
player.jumping
player.lookAt
player.markAsNoLongerNeeded
player.mass
player.matrix
player.maxStamina
player.modelIndex
player.money
player.name
player.parent
player.pointGunAt
player.position
player.removeAllData
player.removeBodyPart
player.removeData
player.removeFromVehicle
player.resurrect
player.runTo
player.say
player.setData
player.setInitialState
player.setPedStats
player.setProofs
player.setRotation
player.setThreatSearch
player.setWanderPath
player.skin
player.sprintTo
player.stamina
player.staminaDuration
player.status
player.stayInSamePlace
player.syncer
player.turnVelocity
player.type
player.upperTorsoRotation
player.vehicle
player.velocity
player.walkStyle
player.walkTo
player.wantedLevel
player.warpIntoVehicle
player.weapon

Radar Functions[edit]

gta.radar.mapCenter
gta.radar.mapSize
gta.radar.mapSizeMultiplier
gta.radar.position
gta.radar.range
gta.radar.size

Radio Functions[edit]

gta.forceRadioChannel
gta.setRadioChannel

Reflection Functions[edit]

exportFunction
reflection.call
reflection.clone
reflection.createFunction
reflection.move
reflection.tostring
setErrorMode

Renderware Functions[edit]

gta.rwRenderStateSet

Resource Functions[edit]

findResourceByName
getResources
thisResource

resource.exports
resource.getExport
resource.isStarted
resource.isStarting
resource.name
resource.restart
resource.start
resource.stop

Save Game Functions[edit]

gta.saveGame

Screen Functions[edit]

getScreenFromWorldPosition
getWorldFromScreenPosition
gta.aspectRatio
gta.height
gta.width

Script Functions[edit]

gta.getActiveScripts
gta.scriptCommand
gta.terminateScript

SDL Functions[edit]

sdl.getKeyboardState
sdl.getKeyFromName
sdl.getKeyFromScancode
sdl.getKeyName
sdl.getModState
sdl.getScancodeFromKey
sdl.getScancodeFromName
sdl.getScancodeName
sdl.platform
sdl.setModState
sdl.ticks

Socket Functions[edit]

newSocket

socket.close
socket.connect
socket.delete
socket.send
socket.sendClient
socket.start
socket.stop

Sphere Functions[edit]

createSphere

Stream Functions[edit]

stream.close
stream.length
stream.position
stream.readBytes
stream.readDouble
stream.readFloat
stream.readInt16
stream.readInt32
stream.readInt64
stream.readInt8
stream.readLine
stream.readString
stream.readUInt16
stream.readUInt32
stream.readUInt64
stream.readUInt8
stream.writeBytes
stream.writeDouble
stream.writeFloat
stream.writeInt16
stream.writeInt32
stream.writeInt64
stream.writeInt8
stream.writeString
stream.writeUInt16
stream.writeUInt32
stream.writeUInt64
stream.writeUInt8

Time Functions[edit]

gta.time.hour
gta.time.minute
gta.time.minuteDuration
gta.time.second
gta.timeStep

Timer Functions[edit]

clearImmediate
clearInterval
clearTimeout
setImmediate
setInterval
setTimeout

Train Functions[edit]

train.derailed
train.direction
train.speed
train.track
train.trackPosition

Transformable Functions[edit]

transformable.children
transformable.dimension
transformable.getData
transformable.getRotation
transformable.id
transformable.isLocal
transformable.isSyncer
transformable.isType
transformable.name
transformable.parent
transformable.position
transformable.removeAllData
transformable.removeData
transformable.setData
transformable.setRotation
transformable.syncer
transformable.type

Vec2 Functions[edit]

vec2.addPolar
vec2.cartesianToPolar
vec2.extrapolate
vec2.interpolate
vec2.sphericalExtrapolate
vec2.sphericalInterpolate
vec2.x
vec2.y

Vec3 Functions[edit]

vec3.absDotProduct
vec3.addPolar
vec3.addSpherical
vec3.cartesianToPolar
vec3.cartesianToSpherical
vec3.crossProduct
vec3.distance
vec3.dotProduct
vec3.extrapolate
vec3.interpolate
vec3.length
vec3.midPoint
vec3.normalise
vec3.sphericalExtrapolate
vec3.sphericalInterpolate
vec3.squaredDistance
vec3.squaredLength
vec3.x
vec3.y
vec3.z

Vehicle Functions[edit]

createVehicle
getVehicles

vehicle.addUpgrade
vehicle.alarm
vehicle.alpha
vehicle.blow
vehicle.boundingCentre
vehicle.boundingMax
vehicle.boundingMin
vehicle.boundingRadius
vehicle.carWanderRandomly
vehicle.centerOfMass
vehicle.children
vehicle.collisionPower
vehicle.collisionsEnabled
vehicle.colour1
vehicle.colour2
vehicle.colour3
vehicle.colour4
vehicle.dimension
vehicle.distanceFromCentreOfMassToBaseOfModel
vehicle.driveTo
vehicle.drowned
vehicle.engine
vehicle.fix
vehicle.flipped
vehicle.gear
vehicle.getData
vehicle.getDoorStatus
vehicle.getLightStatus
vehicle.getOccupant
vehicle.getPanelStatus
vehicle.getRotation
vehicle.getSuspensionHeight
vehicle.getWheelStatus
vehicle.handlingIndex
vehicle.heading
vehicle.health
vehicle.horn
vehicle.id
vehicle.interior
vehicle.isLocal
vehicle.isOnScreen
vehicle.isSyncer
vehicle.isType
vehicle.lights
vehicle.locked
vehicle.markAsNoLongerNeeded
vehicle.mass
vehicle.matrix
vehicle.modelIndex
vehicle.name
vehicle.parent
vehicle.position
vehicle.radioStation
vehicle.removeAllData
vehicle.removeData
vehicle.removeUpgrade
vehicle.setCarCruiseSpeed
vehicle.setCarMission
vehicle.setColours
vehicle.setData
vehicle.setDoorStatus
vehicle.setDrivingStyle
vehicle.setLightStatus
vehicle.setPaintJob
vehicle.setPanelStatus
vehicle.setProofs
vehicle.setRGBColours
vehicle.setRotation
vehicle.setSuspensionHeight
vehicle.setWheelStatus
vehicle.siren
vehicle.status
vehicle.subType
vehicle.syncer
vehicle.turnVelocity
vehicle.type
vehicle.velocity

Weather Functions[edit]

forceSnowing
gta.forceWeather - Previous Name: forceWeather
gta.weather - Previous Name: weather
snowing

World Functions[edit]

addToWorld
gta.findGroundZForCoord - Previous Name: findGroundZForCoord
gta.setPlanesEnabled - Previous Name: setPlanesEnabled
gta.setTrainsEnabled - Previous Name: setTrainsEnabled
removeFromWorld

XML Functions[edit]

xmlDocument.load
xmlDocument.rootElement

xmlElement.attributes
xmlElement.children
xmlElement.childrenCount
xmlElement.clear
xmlElement.getBoolAttribute
xmlElement.getFloatAttribute
xmlElement.getIntegerAttribute
xmlElement.getStringAttribute
xmlElement.name
xmlElement.parent
xmlElement.text