GerardWay Posted July 25, 2013 Share Posted July 25, 2013 None of these images are showing up when I start the resource. Could anyone help please? client.lua function draw() dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), draw) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) Meta.xml <meta> <info author="Booker" name="image" version="0.1" type="script"/> <script src="client.lua" type="client" /> <!-- gameplay icons --> <file src="mtalogo.png" /> </meta> Link to comment
MIKI785 Posted July 25, 2013 Share Posted July 25, 2013 (edited) Why the onClientResourceStart? Why? function draw() dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end addEventHandler("onClientRender", getRootElement(), draw) The same thing... i don't think the problem was in that, the debug doesn't output anything? EDIT: You had ')' in the code that didn't close anything. Edited July 25, 2013 by Guest Link to comment
Alen141 Posted July 25, 2013 Share Posted July 25, 2013 addEventHandler("onClientRender", root, function () dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) Link to comment
MIKI785 Posted July 25, 2013 Share Posted July 25, 2013 addEventHandler("onClientRender", root, function () dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) You didn't change anything there... the same code. Link to comment
Alen141 Posted July 25, 2013 Share Posted July 25, 2013 addEventHandler("onClientRender", root, function () dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) You didn't change anything there... the same code. it should work anyway ( one or another ).. Once I had same problem, but when I changed code to this it worked Link to comment
GerardWay Posted July 25, 2013 Author Share Posted July 25, 2013 Nope. still nothing. Link to comment
Alen141 Posted July 25, 2013 Share Posted July 25, 2013 Nope. still nothing. try something silly.. if this dosen't work, maybe your coords aren't alright : addEventHandler("onClientResourceStart", resourceRoot, function() end ) addEventHandler("onClientRender", root, function () dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) Link to comment
MIKI785 Posted July 25, 2013 Share Posted July 25, 2013 The debug must output something then, you still didn't reply on the debug.... Link to comment
Alen141 Posted July 25, 2013 Share Posted July 25, 2013 The debug must output something then, you still didn't reply on the debug.... it's possible that he didn't set type="client" in meta Link to comment
GerardWay Posted July 25, 2013 Author Share Posted July 25, 2013 There aren't any errors in the Debug. Link to comment
Castillo Posted July 25, 2013 Share Posted July 25, 2013 addEventHandler ( "onClientRender", root, function ( ) outputChatBox ( "RENDERING IMAGES" ) dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) Use that and see what it outputs to the chat box. Link to comment
GerardWay Posted July 26, 2013 Author Share Posted July 26, 2013 Nothing, didn't work and it failed to output anything to the Chatbox, thanks anyway. Link to comment
GerardWay Posted July 26, 2013 Author Share Posted July 26, 2013 meta.xml "Booker" name="image" version="0.1" type="script"/> Link to comment
iMr.3a[Z]eF Posted July 26, 2013 Share Posted July 26, 2013 "Booker" name="image" version="0.1" type="script"/> Link to comment
Baseplate Posted July 26, 2013 Share Posted July 26, 2013 lol, deleting this from the meta will make the script work! great thinking, my friend! <!-- gameplay icons --> And this scripts works, except there was an extra ")" near the end of "draw" function. function draw() dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), draw) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) Link to comment
qaisjp Posted July 26, 2013 Share Posted July 26, 2013 lol, deleting this from the meta will make the script work! great thinking, my friend! <!-- gameplay icons --> That, should NOT be the case. Link to comment
GerardWay Posted July 26, 2013 Author Share Posted July 26, 2013 Thanks for all of your help guys, abxf sent me the solution through Facebook and it works now. Link to comment
Castillo Posted July 26, 2013 Share Posted July 26, 2013 Well, and what was the problem? Link to comment
Baseplate Posted July 26, 2013 Share Posted July 26, 2013 And this scripts works, except there was an extra ")" near the end of "draw" function. Link to comment
Castillo Posted July 26, 2013 Share Posted July 26, 2013 So, that means that he never used my code at all, which has no errors. Link to comment
Baseplate Posted July 26, 2013 Share Posted July 26, 2013 I dunno, I just deleted the extra ")" from his code, he tested it and it works. Link to comment
Alen141 Posted July 27, 2013 Share Posted July 27, 2013 So, that means that he never used my code at all, which has no errors. he probably failed at copy/paste 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