Jump to content

help dxDraw3DText


Nicolas ECM

Recommended Posts

Hi I want help text appears in 3D when / doton command took place this cast but nothing happens please help

local dxDraw3DText = exports.3D_DX_Texts:dxDraw3DText 
  
addCommandHandler("doton" mogolla ) 
function mogolla () 
local x, y, z = getElementPosition ( sourcePlayer )  
local theText = dxDraw3DText( "Doton doriu jehiquin" x, y, z, 2, "default", 255, 255, 255, 12 ) 
if theText then  
setTimer( destroyElement, 10000, 1, theText )  
end 
end 
  

Link to comment
local dxDraw3DText = exports.3D_DX_Texts:dxDraw3DText 
  
function mogolla ( ) 
    local x, y, z = getElementPosition ( sourcePlayer ) 
    local theText = dxDraw3DText( "Doton doriu jehiquin" x, y, z, 2, "default", 255, 255, 255, 12 ) 
    if theText then 
        setTimer ( destroyElement, 10000, 1, theText ) 
    end 
end 
addCommandHandler ( "doton" mogolla ) 

Link to comment

Not really, he forgot the comma.

function mogolla ( ) 
    local x, y, z = getElementPosition ( localPlayer ) 
    local theText = dxDraw3DText ( "Doton doriu jehiquin" x, y, z, 2, "default", 255, 255, 255, 12 ) 
    if theText then 
        setTimer ( destroyElement, 10000, 1, theText ) 
    end 
end 
addCommandHandler ( "doton", mogolla ) 

Link to comment

Apart from missing commas and usage of variable before it is assigned the function value, this line hardly has any meaning:

local dxDraw3DText = exports.3D_DX_Texts:dxDraw3DText 

This syntax:

table:method(arguments) 

is another way to write this call:

table.method(table, arguments) 

So it's not like 'table:method' has any meaning without a call.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...