Kazafka Posted January 24, 2020 Share Posted January 24, 2020 (edited) This, don't work. Idk why. Look: addEventHandler("onClientRender", resourceRoot, function() dxDrawTextOnElement(localPlayer, "P L A Y E R", 1, 20, 0, 0, 255, 255, 1, "pricedown") end) Ofcourse, I have dxDrawTextOnElement() function in my script and script is in type client. Edited January 24, 2020 by VaporZ Link to comment
Moderators Patrick Posted January 24, 2020 Moderators Share Posted January 24, 2020 Replace source of event to root instead of resourceRoot. 1 1 Link to comment
Kazafka Posted January 24, 2020 Author Share Posted January 24, 2020 1 minute ago, stPatrick said: Replace source of event to root instead of resourceRoot. ur right Why imma so dumb to not think about it and dont test it out. PS.: I have 3rd grade from maths, thats why I guess 1 Link to comment
Moderators IIYAMA Posted January 24, 2020 Moderators Share Posted January 24, 2020 (edited) 2 hours ago, VaporZ said: ur right Why imma so dumb to not think about it and dont test it out. PS.: I have 3rd grade from maths, thats why I guess It has nothing to do with maths. But with breaking down the instructions (for the computer) in to pieces and debug every piece individually. When running this code you gave the computer 4 instructions. 1. Load the file Runs a debug line if added. 2. Attach the eventhandler (returns true if attached, which is a value you can debug) 3. The event is fired, which calls the function you have attached. If you did add a debug line here, you would have noticed that the code didn't run. (If the debug line is not visible, then there must have been something with the addEventHandler) Hmmmmaybe compare the code to something similar that does work? 4. Call your custom function. Check which value it returns. This is something that takes time to learn. So maybe put some more time in debug your code in details. This will save you a lot of time in the long run. Edited January 24, 2020 by IIYAMA 1 1 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