HU/getElementsWithinColShape
Jump to navigation
Jump to search
Ez function arra szolgál, hogy az összes colshape-ban lévő elemet kilistázza, a megadott típustát.
Megjegyzés:
|
Szintaxis
table getElementsWithinColShape ( colshape theShape [, string elemType = nil ] )
OOP Syntax Help! I don't understand this!
- Method: colshape:getElementsWithin(...)
- Variable: .elementsWithin
Kötelező paraméterek
- theShape: A colshape, ahonnan az elemet szeretné megkapni.
Tetszőleges paraméterek
- elemType: Az elem típusa, amit listázni szeretne. Ez bármilyen elemtípus lehet, a gyakoriakat lentebb találja:
- "player": A szerverhez csatlakoztatott játékos
- "ped": Egy ped
- "vehicle": Egy jármű
- "object": Egy object
- "pickup": Egy pickup
- "marker": Egy marker
Visszatérési érték
Returns a table containing all the elements inside the colshape, of the specified type. Returns an empty table if there are no elements inside. Returns false if the colshape is invalid.
Példa
This example retrieves a table of players inside a colshape and prints their name to the chat.
local newColShape = createColSphere( 1, 2, 3, 4 ) -- create our new colshape local players = getElementsWithinColShape( newColShape, "player" ) -- get all the players inside the sphere for _, thePlayer in ipairs( players ) do -- use a generic for loop to step through each player outputChatBox( getPlayerName( thePlayer ) .. " is in our new sphere" ) -- print their name to the chat end
Changelog
Version | Description |
---|
1.5.5-3.12286 | Added elementsWithin OOP variable |
Lásd még
- HU/attachElements
- HU/clearElementVisibleTo
- HU/cloneElement
- HU/createElement
- HU/destroyElement
- HU/detachElements
- HU/getAllElementData
- HU/getAttachedElements
- HU/getElementAlpha
- HU/getElementAttachedOffsets
- HU/getElementAttachedTo
- HU/getElementCollisionsEnabled
- HU/getElementByID
- HU/getElementByIndex
- HU/getElementChild
- HU/getElementChildren
- HU/getElementChildrenCount
- HU/getElementColShape
- HU/getElementData
- HU/getElementDimension
- HU/getElementHealth
- HU/getElementID
- HU/getElementInterior
- HU/getElementMatrix
- HU/getElementModel
- HU/getElementParent
- HU/getElementPosition
- HU/getElementRotation
- HU/getElementSyncer
- HU/getElementType
- HU/getElementVelocity
- HU/getElementZoneName
- HU/getElementsByType
- HU/getElementsWithinColShape
- HU/getLowLODElement
- HU/getRootElement
- HU/isElement
- HU/isElementAttached
- HU/isElementCallPropagationEnabled
- HU/isElementDoubleSided
- HU/isElementFrozen
- HU/isElementInWater
- HU/isElementLowLOD
- HU/isElementVisibleTo
- HU/isElementWithinColShape
- HU/isElementWithinMarker
- HU/removeElementData
- HU/setElementAlpha
- HU/setElementAngularVelocity
- HU/getElementAngularVelocity
- HU/setElementAttachedOffsets
- HU/setElementCallPropagationEnabled
- HU/setElementCollisionsEnabled
- HU/setElementData
- HU/setElementDimension
- HU/setElementDoubleSided
- HU/setElementFrozen
- HU/setElementHealth
- HU/setElementID
- HU/setElementInterior
- HU/setElementModel
- HU/setElementParent
- HU/setElementPosition
- HU/setElementRotation
- HU/setElementSyncer
- HU/setElementVelocity
- HU/setElementVisibleTo
- HU/setLowLODElement