Jump to content

Help with scripting !!


Jean MTA

Recommended Posts

Hello!
You can make it with onClientClick event.
Here is an example code:

local showDX = false

function Click(btn, state, x, y, wx, wy, wz, obj)
  if (obj == nil) then return end
  if (isElement(obj)) then
    if (getElementType(obj) == "player" then
      showDX = true
    end
  end
end
addEventHandler("onClientClick", getRootElement(), Click)
  
function render()
  if (showDX) then
    -- Write here the DX lines
  end
end
addEventHandler("onClientRender", getRootElement(), render)

 

I hope I can help you!

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