Firespider Posted May 19, 2023 Share Posted May 19, 2023 Hello, I would like to solve the problem so that DXdrawrectangle can only be seen by a specific person, can you help? Link to comment
βurak Posted May 19, 2023 Share Posted May 19, 2023 (edited) 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 May 19, 2023 by Burak5312 Link to comment
Firespider Posted May 20, 2023 Author Share Posted May 20, 2023 I have already solved it, but there is a small problem. statusMarker = createMarkerAttachedTo(source, "checkpoint") Doesn't working Link to comment
Firespider Posted May 20, 2023 Author Share Posted May 20, 2023 Idk why doesn't working. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now