Jump to content

Implementing a GUI?


ThePhill97

Recommended Posts

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
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
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
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
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...