Types: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
* {{Side|client=1}} <code>Effect</code> - effect (FX) | * {{Side|client=1}} <code>Effect</code> - effect (FX) | ||
* {{Side|shared=1}} <code>Element</code> - element | * {{Side|shared=1}} <code>Element</code> - element | ||
** {{Side|shared=1}} <code>Blip</code> - blip | |||
** {{Side|shared=1}} <code>Entity</code> - entity | |||
*** {{Side|shared=1}} <code>Building</code> - building (GTA Building) | |||
*** {{Side|shared=1}} <code>Physical</code> - object that interacts with physics | |||
**** {{Side|shared=1}} <code>Object</code> - placeable object | |||
**** {{Side|shared=1}} <code>Ped</code> - pedestrian | |||
***** {{Side|shared=1}} <code>Player</code> - player | |||
**** {{Side|shared=1}} <code>Vehicle</code> - any vehicle | |||
***** {{Side|shared=1}} <code>Train</code> - train | |||
** {{Side|shared=1}} <code>Marker</code> - marker | |||
** {{Side|shared=1}} <code>Pickup</code> - pickup | |||
* {{Side|shared=1}} <code>Event</code> - event | * {{Side|shared=1}} <code>Event</code> - event | ||
** {{Side|shared=1}} <code>CancellableEvent</code> - cancellable event | ** {{Side|shared=1}} <code>CancellableEvent</code> - cancellable event | ||
| Line 49: | Line 48: | ||
{{InformationBox|1= | {{InformationBox|1= | ||
Blip | Blip : Element | ||
Building : Entity | Building : Entity : Element | ||
Marker | Marker : Element | ||
Object : Physical : Entity | Object : Physical : Entity : Element | ||
Pickup | Pickup : Element | ||
Player : Ped : Physical : Entity | Player : Ped : Physical : Entity : Element | ||
Train : Vehicle : Physical : Entity | Train : Vehicle : Physical : Entity : Element}} | ||
==Abstract Base Types== | ==Abstract Base Types== | ||
| Line 84: | Line 83: | ||
==Previous Versions== | ==Previous Versions== | ||
Type <code>Civilian</code> was removed. All functionality from type <code>Civilian</code>was moved to type <code>Ped</code>. | Type <code>Civilian</code> was removed. All functionality from type <code>Civilian</code>was moved to type <code>Ped</code>.<br> | ||
Type <code>Transformable</code> was removed. All functionality from type <code>Transformable</code>was moved to type <code>Element</code>.<br> | |||
Revision as of 01:56, 24 December 2021
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 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 : 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.