Server Functions

From GTA Connected
Jump to navigation Jump to search

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

Blip Functions[edit]

createBlip
createBlipAttachedTo

blip.children
blip.dimension
blip.getData
blip.getRotation
blip.id
blip.isType
blip.name
blip.onAllDimensions
blip.parent
blip.position
blip.removeAllData
blip.removeData
blip.resource
blip.setData
blip.setRotation
blip.setSyncer
blip.syncer
blip.type

Building Functions[edit]

createBuilding

building.children
building.dimension
building.getData
building.getRotation
building.heading
building.id
building.interior
building.isType
building.matrix
building.modelIndex
building.name
building.onAllDimensions
building.parent
building.position
building.removeAllData
building.removeData
building.resource
building.setData
building.setRotation
building.setSyncer
building.syncer
building.type

Camera Functions[edit]

fadeCamera

Chatbox Functions[edit]

message
messageAllExcept
messageClient

Civilian Functions[edit]

createCivilian

civilian.children
civilian.dimension
civilian.getData
civilian.getRotation
civilian.heading
civilian.health
civilian.id
civilian.interior
civilian.isType
civilian.matrix
civilian.modelIndex
civilian.name
civilian.onAllDimensions
civilian.parent
civilian.position
civilian.removeAllData
civilian.removeData
civilian.resource
civilian.setData
civilian.setRotation
civilian.setSyncer
civilian.syncer
civilian.type
civilian.vehicle
civilian.warpIntoVehicle

Client Functions[edit]

getClient
getClientFromPlayerElement
getClients

client.administrator
client.despawnPlayer
client.disconnect
client.game
client.gameVersion
client.getData
client.index
client.ip
client.name
client.ping
client.player
client.removeAllData
client.removeData
client.setData

Command Functions[edit]

addCommandHandler
consoleCommand
removeCommandHandler

Element Functions[edit]

createElement
destroyElement
getElementFromId
getElementFromName
getElementsByType

element.children
element.dimension
element.getData
element.id
element.isType
element.name
element.onAllDimensions
element.parent
element.removeAllData
element.removeData
element.resource
element.setData
element.setSyncer
element.syncer
element.type

Entity Functions[edit]

entity.children
entity.dimension
entity.getData
entity.getRotation
entity.heading
entity.id
entity.interior
entity.isType
entity.matrix
entity.modelIndex
entity.name
entity.onAllDimensions
entity.parent
entity.position
entity.removeAllData
entity.removeData
entity.resource
entity.setData
entity.setRotation
entity.setSyncer
entity.syncer
entity.type

Event Functions[edit]

addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
unbindEventHandler

event.isDefaultPrevented
event.preventDefault

File Functions[edit]

createFile
openFile

Garbage Collection Functions[edit]

collectAllGarbage

HTTP Functions[edit]

httpGet

Key Functions[edit]

bindKey
unbindAllKeys
unbindKey

KeyEvent Functions[edit]

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

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

Miscellaneous Functions[edit]

platform
toColour

Network Functions[edit]

addNetworkHandler
removeNetworkHandler
triggerNetworkEvent

Object Functions[edit]

createObject

object.children
object.dimension
object.getData
object.getRotation
object.heading
object.id
object.interior
object.isType
object.matrix
object.modelIndex
object.name
object.onAllDimensions
object.parent
object.position
object.removeAllData
object.removeData
object.resource
object.setData
object.setRotation
object.setSyncer
object.syncer
object.type

Ped Functions[edit]

ped.children
ped.dimension
ped.getData
ped.getRotation
ped.heading
ped.health
ped.id
ped.interior
ped.isType
ped.matrix
ped.modelIndex
ped.name
ped.onAllDimensions
ped.parent
ped.position
ped.removeAllData
ped.removeData
ped.resource
ped.setData
ped.setRotation
ped.setSyncer
ped.syncer
ped.type
ped.vehicle
ped.warpIntoVehicle

Pickup Functions[edit]

createPickup

Player Functions[edit]

createPlayer
spawnPlayer

player.children
player.dimension
player.getData
player.getRotation
player.heading
player.health
player.id
player.interior
player.isType
player.matrix
player.modelIndex
player.name
player.onAllDimensions
player.parent
player.position
player.removeAllData
player.removeData
player.resource
player.setData
player.setRotation
player.setSyncer
player.syncer
player.type
player.vehicle
player.warpIntoVehicle

Reflection Functions[edit]

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

Resource Functions[edit]

findResourceByName
getResources
thisResource

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

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

Server Functions[edit]

server.game
server.gameMode
server.maxClients
server.name
server.port

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.second

Timer Functions[edit]

clearImmediate
clearInterval
clearTimeout
setImmediate
setInterval
setTimeout

Train Functions[edit]

train.derailed
train.headlights
train.speed
train.taillights
train.track
train.trackPosition

Transformable Functions[edit]

transformable.children
transformable.dimension
transformable.getData
transformable.getRotation
transformable.id
transformable.isType
transformable.name
transformable.onAllDimensions
transformable.parent
transformable.position
transformable.removeAllData
transformable.removeData
transformable.resource
transformable.setData
transformable.setRotation
transformable.setSyncer
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

vehicle.children
vehicle.colour1
vehicle.colour2
vehicle.colour3
vehicle.colour4
vehicle.dimension
vehicle.engine
vehicle.fix
vehicle.getData
vehicle.getRotation
vehicle.heading
vehicle.id
vehicle.interior
vehicle.isType
vehicle.locked
vehicle.matrix
vehicle.modelIndex
vehicle.name
vehicle.onAllDimensions
vehicle.parent
vehicle.position
vehicle.randomiseColours
vehicle.removeAllData
vehicle.removeData
vehicle.resource
vehicle.setColours
vehicle.setData
vehicle.setRGBColours
vehicle.setRotation
vehicle.setSyncer
vehicle.strongGrip
vehicle.syncer
vehicle.type

Weather Functions[edit]

gta.forceWeather
gta.weather

World Functions[edit]

addToWorld
gta.planesEnabled
gta.ssvBridgeEnabled
gta.trainsEnabled

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