Tried to learn how to use the GUI Editor.
Can someone tell me where I made an error? Because in RC, it doesn't say any errors.
It worked, but It doesn't come up when I press the key "9"
PHP Code:
function onKeyPressed( code, key )
{
if ( key == "9" )
{
triggerserver( "gui", name, "getMessage" );
}
}
Or When on a chat command.
PHP Code:
function onPlayerChats()
{
if ( player.chat == ":test" )
{
triggerserver( "gui", name, "getMessage" );
}
}
Here's the full code
PHP Code:
//#CLIENTSIDE
function onKeyPressed( code, key )
{
if ( key == "9" )
{
triggerserver( "gui", name, "getMessage" );
}
}
function onPlayerChats()
{
if ( player.chat == ":test" )
{
triggerserver( "gui", name, "getMessage" );
}
}
function onCreated() {
new GuiWindowCtrl("test_Window1") {
profile = GuiBlueWindowProfile;
clientrelative = true;
clientextent = "114,94";
canmove = true;
canresize = true;
closequery = false;
destroyonhide = false;
text = "Poll";
x = 585;
y = 265;
new GuiCheckBoxCtrl("test_CheckBox1") {
profile = GuiBlueCheckBoxProfile;
height = 20;
text = "Yes";
width = 100;
x = 13;
y = 31;
}
new GuiCheckBoxCtrl("test_CheckBox2") {
profile = GuiBlueCheckBoxProfile;
height = 20;
text = "No";
width = 100;
x = 13;
y = 56;
}
new GuiTextCtrl("test_Text1") {
profile = GuiBlueTextProfile;
height = 20;
text = "Do you like pie?";
width = 75;
x = 9;
y = 7;
}
}
}
Can someone please help!