Types: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 29: | Line 29: | ||
* {{Side|client=1}} <code>GUIPage</code> - gui page | * {{Side|client=1}} <code>GUIPage</code> - gui page | ||
* {{Side|client=1}} <code>GUIWindow</code> - gui window | * {{Side|client=1}} <code>GUIWindow</code> - gui window | ||
* {{Side|shared=1}} <code>Matrix4x4</code> - matrix of 4 by 4 numbers | * {{Side|shared=1}} <code>Matrix4x4</code> - matrix of 4 by 4 decimal numbers | ||
* {{Side|shared=1}} <code>ReflectedFunction</code> - reflected function | * {{Side|shared=1}} <code>ReflectedFunction</code> - reflected function | ||
* {{Side|shared=1}} <code>Resource</code> - resource | * {{Side|shared=1}} <code>Resource</code> - resource | ||
| Line 38: | Line 38: | ||
** {{Side|client=1}} <code>Texture</code> - texture - derives from <code>Surface</code> | ** {{Side|client=1}} <code>Texture</code> - texture - derives from <code>Surface</code> | ||
* {{Side|shared=1}} <code>Timer</code> - timer | * {{Side|shared=1}} <code>Timer</code> - timer | ||
* {{Side|shared=1}} <code>Vec2</code> - vector of 2 numbers | * {{Side|shared=1}} <code>Vec2</code> - vector of 2 decimal numbers | ||
* {{Side|shared=1}} <code>Vec3</code> - vector of 3 numbers | * {{Side|shared=1}} <code>Vec3</code> - vector of 3 decimal numbers | ||
* {{Side|shared=1}} <code>XmlDocument</code> - xml document | * {{Side|shared=1}} <code>XmlDocument</code> - xml document | ||
* {{Side|shared=1}} <code>XmlElement</code> - xml element | * {{Side|shared=1}} <code>XmlElement</code> - xml element | ||
Revision as of 21:53, 11 June 2022
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- 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 decimal numbersSharedReflectedFunction- reflected functionSharedResource- resourceClientSoundSharedStreamClientSurfaceClientRenderTarget- client representation - derives fromSurfaceClientTexture- texture - derives fromSurface
SharedTimer- timerSharedVec2- vector of 2 decimal numbersSharedVec3- vector of 3 decimal numbersSharedXmlDocument- xml documentSharedXmlElement- xml element
Types Derived From Element
Types derived from type Element, as shown in the list above.
Blip : Element
Building : Entity : Element
Marker : Element
Object : Physical : Entity : Element
Pickup : Element
Player : Ped : Physical : Entity : Element
Train : Vehicle : Physical : Entity : 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.null- Also known asnil.object- For elements.Userdataif Lua.stringundefined- Used in JS.
Container types.
array<Type>-Tableif Lua. Keys start at 1 if Lua, otherwise keys start at 0.dictionary<KeyType,ValueType>-Tableif Lua.
Other types.
void- Represents no arguments or no returns.
Previous Versions
Type Civilian was removed. All functionality from type Civilianwas moved to type Ped.
Type Transformable was removed. All functionality from type Transformablewas moved to type Element.