SetElementLighting: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Client function}} __NOTOC__ {{New feature/item|3.0161|1.6.0|22862|This function changes the lighting value for the specified element. This can be a player, ped, vehicle, object, weapon.}} {{Note|Lighting is calculated in real-time, so you will likely need onClientRender or onClientPreRender.}} ==Syntax== <syntaxhighlight lang="lua"> bool setElementLighting ( element theElement, float lighting ) </syntaxhighlight> {{OOP||element:set...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
__NOTOC__ | __NOTOC__ | ||
{{New feature/item|3.0161|1.6.0|22862|This function changes the lighting value for the specified [[element]]. This can be a [[player]], [[ped]], [[vehicle]], [[object]], [[weapon]].}} | {{New feature/item|3.0161|1.6.0|22862|This function changes the lighting value for the specified [[element]]. This can be a [[player]], [[ped]], [[vehicle]], [[object]], [[Element/Weapon|weapon]].}} | ||
{{Note|Lighting is calculated in real-time, so you will likely need [[onClientRender]] or [[onClientPreRender]].}} | {{Note|Lighting is calculated in real-time, so you will likely need [[onClientRender]] or [[onClientPreRender]].}} |
Revision as of 03:02, 31 December 2024
Syntax
bool setElementLighting ( element theElement, float lighting )
OOP Syntax Help! I don't understand this!
- Method: element:setLighting(...)
- Variable: .lighting
- Counterpart: getElementLighting
Required Arguments
- theElement: The element whose lighting you want to change.
- lighting: The lighting value that you want to set.
Returns
Returns true if the function was successful, false otherwise. This function can fail if called right after element creation.
Example
![]() |
Script Example Missing Function SetElementLighting needs a script example, help out by writing one. |
Before submitting check out Editing Guidelines Script Examples. |
See Also
- getElementBoneMatrix
- getElementBonePosition
- getElementBoneRotation
- getElementBoundingBox
- getElementDistanceFromCentreOfMassToBaseOfModel
- getElementLighting
- getElementRadius
- isElementCollidableWith
- isElementLocal
- isElementOnScreen
- isElementStreamable
- isElementStreamedIn
- isElementSyncer
- isElementWaitingForGroundToLoad
- setElementBoneMatrix
- setElementBonePosition
- setElementBoneRotation
- setElementCollidableWith
- setElementStreamable
- updateElementRpHAnim
- Shared
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement