Jump to content

help dxDraw3DText


Nicolas ECM

Recommended Posts

Posted

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 
  

Posted
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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Post the source code from this function: dxDraw3DText

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

-

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...