ThePhill97 Posted January 6, 2013 Share Posted January 6, 2013 Inserting a GUI? I put this addEventHandler("onClientResourceStart", resourceRoot, function() end ) addEventHandler("onClientRender", root, function() dxDrawText("DEADLYDUCKZ FREEROAM SERVER", 19, 544, 739, 684, tocolor(204, 45, 24, 255), 1, "bankgothic", "left", "top", false, false, true, false, false) end ) Into my script, is that what I do? How do I implement it? Link to comment
Anderl Posted January 6, 2013 Share Posted January 6, 2013 That draws a text with DirectX only. And "onClientResourceStart" event isn't needed. Link to comment
ThePhill97 Posted January 6, 2013 Author Share Posted January 6, 2013 That draws a text with DirectX only. And "onClientResourceStart" event isn't needed. I used viewtopic.php?f=108&t=22831 What do you mean? How can I see it in-game? Link to comment
ThePhill97 Posted January 6, 2013 Author Share Posted January 6, 2013 Did you copy this? As I said in my post above, I used viewtopic.php?f=108&t=22831 To make it IG Link to comment
GhostXoP Posted January 6, 2013 Share Posted January 6, 2013 To make it IG Is not what you said in the post, so i had assumed you stole. You said I used viewtopic.php?f=108&t=22831 So it sounded more like you just copied it. You fool no one unless english isn't your first language. Research what onClientResourceStart does, you will see when it fires and why it is not needed here. It is usually used to initialize resources like GUI's UNLESS they are a per frame render. This is usually used for one time render, then set visible when used. Link to comment
ThePhill97 Posted January 6, 2013 Author Share Posted January 6, 2013 To make it IG Is not what you said in the post, so i had assumed you stole. You said I used viewtopic.php?f=108&t=22831 So it sounded more like you just copied it. You fool no one unless english isn't your first language. Research what onClientResourceStart does, you will see when it fires and why it is not needed here Why does nobody just tell me how to put it in game also: You fool no one unless english isn't your first language. - English clearly isn't your main language. Link to comment
GhostXoP Posted January 6, 2013 Share Posted January 6, 2013 English clearly isn't your main language. You make as much sense as my 4 year old brother does, and so far he's winning this battle against you. You do exactly what you did to get the code, copy it into your client side script because all drawing engine functions are client side. (and if you still don't know what that means, then go to The Wiki and get learning.) If you want to make it in this forum, you had better read and learn. I don't just answer one question, i answer a couple hundred more you will post here in the next week just by telling you to research. Link to comment
ThePhill97 Posted January 6, 2013 Author Share Posted January 6, 2013 English clearly isn't your main language. You make as much sense as my 4 year old brother does, and so far he's winning this battle against you. You do exactly what you did to get the code, copy it into your client side script because all drawing engine functions are client side. (and if you still don't know what that means, then go to The Wiki and get learning.) If you want to make it in this forum, you had better read and learn. I don't just answer one question, i answer a couple hundred more you will post here in the next week just by telling you to research. Well, thank-you. We got somewhere. I've implemented the text, thank you for your help. Even if we did half-argue about it. Is there also a way that when for EG: I press F1 I can make this appear? Link to comment
Anderl Posted January 6, 2013 Share Posted January 6, 2013 bindKey addEventHandler removeEventHandler Lua tutorials, click in this text and learn before trying to do anything Link to comment
ThePhill97 Posted January 6, 2013 Author Share Posted January 6, 2013 bindKey addEventHandler removeEventHandler Lua tutorials, click in this text and learn before trying to do anything I was looking at those, I still don't understand. Please, just show me show to bind F1 to show the text? Link to comment
Anderl Posted January 6, 2013 Share Posted January 6, 2013 As I already said, you should learn Lua before trying to do things. We aren't here to make the things for you, we're here to help you fixing the code. Link to comment
ThePhill97 Posted January 6, 2013 Author Share Posted January 6, 2013 As I already said, you should learn Lua before trying to do things. We aren't here to make the things for you, we're here to help you fixing the code. And all I want, is an example so I can analyse it and use it in future. Link to comment
ThePhill97 Posted January 6, 2013 Author Share Posted January 6, 2013 Thanks for the help -facepalm. I managed to do it myself. Link to comment
Anderl Posted January 6, 2013 Share Posted January 6, 2013 People isn't here 24/7 just to help you. If you want help, you need to wait like everybody else. Link to comment
Blaawee Posted January 6, 2013 Share Posted January 6, 2013 here is an Example for you : function drawSomthing( ) dxDrawText( "DEADLYDUCKZ FREEROAM SERVER", 19, 544, 739, 684, tocolor(204, 45, 24, 255), 1, "bankgothic", "left", "top", false, false, true, false, false ) end local shown = false bindKey ( "b", "down", function( ) if shown == false then shown = true addEventHandler( "onClientRender", root, drawSomthing ) else shown = false removeEventHandler( "onClientRender", root, drawSomthing ) end end ) plus, read more about bindKey Link to comment
Lloyd Logan Posted January 6, 2013 Share Posted January 6, 2013 Thanks for the help -facepalm.I managed to do it myself. That's good! Have you had a look at the Wiki? Check the GUI tuturials section? It will help you with this stuff. 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