dxDrawWiredSphere
Client-side
Server-side
Shared
This function drawn same sphere as /showcol. It provides 4 levels of iterations which mean density of sphere.
Important
Adjust radius to iterations to get optimum density of mesh. About 50 spheres with iterations = 4 can cause fps drop.
Syntax
bool dxDrawWiredSphere ( float x, float y, float z, float radius, int theColor, float fLineWidth, int iterations )Required Arguments
- x: X position in world of sphere.
- y: Y position in world of sphere.
- z: Z position in world of sphere.
- radius: A radius of sphere.
- theColor: A color of sphere from tocolor function or in the AARRGGBB format.
- fLineWidth: A width of line.
- iterations: Number 1, 2, 3 or 4. 1 mean low density, 4 mean high.
Returns
- bool: result
Returns a true if the operation was successful, false otherwise.
Code Examples
client
local BONE_IDS = {1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54}
addEventHandler('onClientRender', root, function() for k, v in ipairs(BONE_IDS) do local x, y, z = getPedBonePosition(localPlayer, v) local color = tocolor(math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255)) dxDrawWiredSphere(x, y, z, 0.1, color, 0.1, 4) endend)See Also
Drawing Functions
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTargetUpdated
- dxCreateScreenSource
- dxCreateShader
- dxCreateTextureUpdated
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawModel3DNew
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsFormat
- dxGetPixelsSize
- dxGetStatusUpdated
- dxGetTextSize
- dxGetTexturePixelsUpdated
- dxGetTextWidth
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetShaderValue
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource
