DxDrawModel3D: Difference between revisions
Jump to navigation
Jump to search
CrosRoad95 (talk | contribs) (Created page with "__NOTOC__ {{Client function}} {{Important Note|You can not use this function to draw vehicles and ped}} {{Important Note|This function doesn't obey any streaming limits, you can draw as many models as you want}} {{Important Note|You can not render model to render target.}} This function draws a 3D model - rendered for '''one''' frame. Drawn models are indistinguishable from this one created by "createObject" function. This should be used in conjunction with onClientR...") |
CrosRoad95 (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
{{Important Note|This function doesn't obey any streaming limits, you can draw as many models as you want}} | {{Important Note|This function doesn't obey any streaming limits, you can draw as many models as you want}} | ||
{{Important Note|You can not render model to render target.}} | {{Important Note|You can not render model to render target.}} | ||
This function draws a 3D model - rendered for '''one''' frame. Drawn models are indistinguishable from this one created by | This function draws a 3D model - rendered for '''one''' frame. Drawn models are indistinguishable from this one created by [[createObject]] function. This should be used in conjunction with [[onClientRender]] in order to display continuously. | ||
==Syntax== | ==Syntax== | ||
Line 24: | Line 24: | ||
===Returns=== | ===Returns=== | ||
Returns true if the operation was successful, false otherwise. | Returns true if the operation was successful, false otherwise. | ||
==Example== | ==Example== |
Revision as of 06:06, 14 October 2023
Important Note: You can not use this function to draw vehicles and ped |
Important Note: This function doesn't obey any streaming limits, you can draw as many models as you want |
Important Note: You can not render model to render target. |
This function draws a 3D model - rendered for one frame. Drawn models are indistinguishable from this one created by createObject function. This should be used in conjunction with onClientRender in order to display continuously.
Syntax
bool dxDrawModel( int modelId, float positionX, float positionY, float positionZ, float rotationX, float rotationY, float rotationZ [, float scaleX, float scaleY, float scaleZ ])
Required Arguments
- modelId: Model you want to draw, must be regular object, you can not draw vehicles and peds
- positionX/Y/Z: Position of model
- rotationX/Y/Z: Rotation of model
Optional Arguments
- scaleX/Y/Z: Scale of model, by default {1,1,1}
Returns
Returns true if the operation was successful, false otherwise.
Example
Click to collapse [-]
ClientSimple example
addEventHandler("onClientPreRender", root, function() dxDrawModel3d(3276, -719.64984, 951.26685, 12.13281, 0, 0,90) end)
See Also
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsSize
- dxGetPixelsFormat
- dxGetStatus
- dxGetTextSize
- dxGetTextWidth
- dxGetTexturePixels
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderValue
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource