Types
This page hosts a list of used data types for scripting.
Types
These types are used in Scripting.
A Sharedtype means that the type is available to be used on both the server and the client in scripting.
SharedClient- client representationClientEffect- effect (FX)SharedElement- elementSharedTransformable- (2D / 3D) positionable elementSharedBlip- blipSharedEntity- entitySharedBuilding- building (GTA Building)SharedPhysical- object that interacts with physicsSharedObject- placeable objectSharedPed- pedestrianSharedPlayer- player
SharedVehicle- any vehicleSharedTrain- train
SharedMarker- markerSharedPickup- pickup
SharedEvent- eventSharedCancellableEvent- cancellable eventSharedKeyEvent- key vent
ClientFont- fontClientGUIElement- gui elementClientGUIHtmlElement- gui html elementClientGUIHtmlView- gui html viewClientGUIPage- gui pageClientGUIWindow- gui windowSharedMatrix4x4- matrix of 4 by 4 numbersSharedReflectedFunction- reflected functionSharedResource- resourceClientSoundSharedStreamClientSurfaceClientRenderTarget- client representation - derives fromSurfaceClientTexture- texture - derives fromSurface
SharedTimer- timerSharedVec2- vector of 2 numbersSharedVec3- vector of 3 numbersSharedXmlDocument- xml documentSharedXmlElement- xml element
Types Derived From Element
Types derived from type Element, as shown in the list above.
Blip : Transformable : Element
Building : Entity : Transformable : Element
Marker : Transformable : Element
Object : Physical : Entity : Transformable : Element
Pickup : Transformable : Element
Player : Ped : Physical : Entity : Transformable : Element
Train : Vehicle : Physical : Entity : Transformable : ElementAbstract Base Types
These types aren't used directly in Scripting. They just represent abstract types used behind the scenes.
Surface- Anything that is drawable (RenderTarget,Texture)
Scripting-Language Types
These scripting-language types are used in the scripting interface.
Scalar types.
bool- Also known asboolean.float-Numberif the scripting language only uses 1 numerical type for ints and floats.function- For callbacks.int-Numberif the scripting language only uses 1 numerical type for ints and floats.object- For elements.Userdataif Lua.null- Also known asnil.string
Container types.
array<Type>-Tableif Lua. Keys start at 1 if Lua, otherwise keys start at 0.dictionary<KeyType,ValueType>-Tableif Lua.
Previous Versions
Type Civilian was removed. All functionality from type Civilianwas moved to type Ped.