Jump to content

dxDrawImage


GanJaRuleZ

Recommended Posts

Posted

Hai allz ..

Since , i got some problems with rendering of " dxDrawImage"

And here are some questions ..

1. How to make a image showing just for one player.

2. How to make a certain image to be visible to a player , an another image to a another player ( The images are in the same place )

3. How to make a certain image , showing for all players

I'm asking these questions , because i develop a gamemode , and i got stuck :)

Posted

1 and 2.

addEventHandler ( 'onClientRender', element, 
     function ( ) 
           dxDrawText ( ... ) 
     end 
) 

3. I will not answer this oO

Posted

You can't attach element to event handler onClientRender. You can only use root.

The source of this event is the client's root element.
Posted
addEventHandler( 'onClientRender', root, 
    function( ) 
        if getElementData( localPlayer, 'onlyMe' ) then 
            -- dxDrawText( ... ) 
        end  
    end 
)    
  
addCommandHandler( 'draw', 
    function( ) 
        setElementData( localPlayer, 'onlyMe', true ) 
    end 
)    
  

It's just example.

You can use variables, element data, ...

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