Hello guys,
I'm trying to show a gui when a person uses a specific command like this:
else if ( cmd == "help" )
{
MessagePlayer("Showing help menu", player);
CallClientFunc(player, "Scripts/Client/HelpGui.nut", "showGui");
return 1;
}
Only it doesnt work. Also I'm not sure where the path leads from. Does it start from the root folder or from the scripts folder? The clien't function I'm calling does not need parameters.
function showGui()
{
Message( "Testing..." );
// We use VectorScreen to set the GUI position. When aligning to the center, we minus half the width/height.
local pos = VectorScreen(ScreenWidth/2-245,ScreenHeight/2-50);
// We use ScreenSize to set the GUI size.
local size = ScreenSize(490,100);
// Create the window with the title "Example Window", and declare it TheWindow
TheWindow <- GUIWindow(pos,size,"Example Window");
// Create a layer for our new window
AddGUILayer(TheWindow);
return 1;
}
Many thanks