Pierce Posted April 13, 2014 Share Posted April 13, 2014 ive changed just image name in script but other stuff is from wiki local screenWidth,screenHeight = guiGetScreenSize() -- Get screen resolution. function renderDisplay ( ) local seconds = getTickCount() / 1000 local angle = math.sin(seconds) * 80 -- This will draw the graphic file 'arrow.png' at the top middle of the screen -- using the size of 100 pixels wide, and 240 pixels high. -- The center of rotation is at the top of the image. dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, 'lvl61.png', angle, 0, -120 ) end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), renderDisplay) -- Keep everything visible with onClientRender. end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) this doesn't draw this picture no errors my res is 1920x1080 Link to comment
Dealman Posted April 13, 2014 Share Posted April 13, 2014 Is screenWidth defined? Did you add the image to the meta.xml file? Link to comment
Pierce Posted April 13, 2014 Author Share Posted April 13, 2014 yeah its set in meta,also now i've noticed in console it outputs this: Download error: Invalid file (draw) lvl61.png Link to comment
manve1 Posted April 13, 2014 Share Posted April 13, 2014 can you show us your meta file? Link to comment
Pierce Posted April 13, 2014 Author Share Posted April 13, 2014 <meta> <script src="script.lua" type="client" /> <file src="lvl61.png" /> </meta> i guess the image was damaged or something,idk how,but when i changed image,it worked Link to comment
Dealman Posted April 13, 2014 Share Posted April 13, 2014 Make sure the image is located in your resource's root folder. IE, "resources/MyResource/lvl61.png". Then add this to your meta file; <file src="lvl61.png"/> Edit: You beat me to it, glad you got it 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