Poll

Did you find this helpful?

Yes
No

Author Topic: [Tutorial] Making a Gui  (Read 45126 times)


Hi,

I'm having problems trying to make my gui show up once the bound key is pressed. The gui consists of only a single floating button (In the center of the users screen). Whenever the key is pressed, this error shows up in console:

Quote
pushDialog(): Invalid control: MyTestgui

I figured this would be the best place to ask considering I was following this guide.


Edit: Forgot to change the control name from NewGui. Silly me.
« Last Edit: July 26, 2009, 06:19:17 PM by Intrebal »

Maybe I should PM Badspot to consider stickying this. I don't see why not, unless he thinks it's not good enough, in which case, I completely understand. But the making Weapons stickied topic has even less relevance, as it's out of date.

ok now i am confused it crashes everytime i open the shortcut what do i do?

Very good, I might try to do this.

Seems confusing.  ahow long does it take?


This tutorial is for people who make add-ons Justin.

Oh and Badspot, consider stickying this if it meets your standards. Read through this and tell me what you think, if you want.
« Last Edit: July 31, 2009, 05:28:14 PM by AGlass0fMilk »

how do i make it so that when i press a button, it plays a sound?

You can do that, make the command:

Code: [Select]
alxPlay(Sound);

A little help with the key bindings please.
Code: [Select]
exec("./Testgui.gui");
moveMap.bind(keyboard, "m", pushTestgui);

function testcommand()
{
MessageBoxOK("Thanks!","You have just pressed a button on a test GUI!");
}
Sorry but I just don't want it like that ^^^

So... I tried to use a different method
Code: [Select]
exec("./Testgui.gui");
if (!$TestGuiBindings)
{
   $remapDivision[$remapCount] = "Test Gui";
   $remapName[$remapCount] = "Activate/Deacticate";
   $remapCmd[$remapCount] = "TestGuiToggle";
   $remapCount++;
   $TestGui=true;
}

This worked many times for me making avatar changers. Some reason it doesn't work the same way for my gui. It doesn't show up in the option/controls menu. Is this normal for guis?

Use Randy's support script for key bindings.



I know, big bump.  How would I make a text box display a variable?

Ex: You have pushed the button (variable here) times! 

Every time I try it just shows the variable name, not the variable itself.