Jump to content

[HELP]


Recommended Posts

you can use a variable you set it to false by default if true you can draw anything you want
If you want to show it to another player, you can run the setVisible event with triggerClientEvent if you want to do it from the server side, if it is on the client side, just set the visible variable to true

by the way, the player parameter in the triggerClientEvent may vary depending on where you use it, for example, it becomes "source" in the onPlayerWasted event

local visible = false

function render()
   if(visible) then
      dxDrawRectangle(300, 300, 50, 50)
   end
end
addEventHandler("onClientRender", root, render)

addEvent("setVisible",true)
addEventHandler("setVisible",root,
    function(value)
       visible = value
    end
)
--server
triggerClientEvent(player, "setVisible", player, true) --show someone the rectangle
Edited by Burak5312
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...