Author Topic: [GUI]Server command window  (Read 936 times)

Beary

  • Newbie
  • *
  • Posts: 39
  • Karma: +2/-5
    • View Profile
[GUI]Server command window
« on: December 22, 2014, 11:30:58 pm »
Edit to change By:Beary

----------------------------------------------------------------------
g_bEnabled <- false;
g_pLocalPlayer <- FindLocalPlayer();

function onScriptLoad()
{
BindKey( 'H', BINDTYPE_DOWN, "HalloThere", 123 );
BindKey( 'M', BINDTYPE_DOWN, "Mouse", 123 );
::g_Window <- GUIWindow( VectorScreen( ScreenWidth - ( ScreenWidth / 1.5 ), ScreenHeight - ( ScreenHeight / 1.5 ) ), ScreenSize( 382, 285 ), "Servers Commands" );
::g_Button <- GUIButton( VectorScreen( 157, 255 ), ScreenSize( 50, 25 ), "OK" );
::g_Text <- GUILabel( VectorScreen( 100, 5 ), ScreenSize( 0, 0 ), "" );
::g_Text1 <- GUILabel( VectorScreen( 10, 5 ), ScreenSize( 0, 0 ), "-------------------- help Commands -------------------" );
::g_Text2 <- GUILabel( VectorScreen( 10, 35 ), ScreenSize( 0, 0 ), "/cmds, /loccmds, /register, /login, /wep, /kill" );
::g_Text3 <- GUILabel( VectorScreen( 10, 55 ), ScreenSize( 0, 0 ), "-------------------- Loc Commands --------------------" );
::g_Text4 <- GUILabel( VectorScreen( 10, 75 ), ScreenSize( 0, 0 ), "/taxi, /jcj, /trj, /airport, /dodo, /jcj2, /hz, /dq, /gd, /tcc, /tyc" );
::g_Text5 <- GUILabel( VectorScreen( 10, 95 ), ScreenSize( 0, 0 ), "/dtz, /fz, /ljc, /xcc, /gt, /cc, /gy, /jcj3, /casino, /home, /sdj" );
::g_Text6 <- GUILabel( VectorScreen( 10, 115 ), ScreenSize( 0, 0 ), "------------------------ Game Commands -----------------------" );
::g_Text7 <- GUILabel( VectorScreen( 10, 135 ), ScreenSize( 0, 0 ), "/report, /spree, /stats, /cash, /car, /goto, /getcar, /getveh" );
::g_Text8 <- GUILabel( VectorScreen( 10, 155 ), ScreenSize( 0, 0 ), "/count, /fix, /heal, /arm, /wep, /changeskin, /statswitch" );
::g_Text9 <- GUILabel( VectorScreen( 10, 175 ), ScreenSize( 0, 0 ), "/s, /time, /findsphere, /find, /speedo, /lockcar, /gotoloc" );
::g_Text10 <- GUILabel( VectorScreen( 10, 195 ), ScreenSize( 0, 0 ), "------------------------ Admin Commands ------------------------" );
::g_Text11 <- GUILabel( VectorScreen( 10, 215 ), ScreenSize( 0, 0 ), "/aplogin, /ann, /get, /freeze, /unfreeze, /mute, /acmds" );
::g_Text12 <- GUILabel( VectorScreen( 10, 235 ), ScreenSize( 0, 0 ), "/kick, /ban, /unban, /alias, /getip, /setlevel, /giveadmin" );

::g_Window.Visible = false;
::g_Window.Colour = Colour( 0, 0, 0 );
::g_Window.Alpha = 150;
::g_Button.Colour = Colour( 100, 100, 100 );
::g_Button.Alpha = 180;
::g_Text.TextColour = Colour( 160, 160, 160 );
::g_Text.FontSize = 11;
::g_Text1.TextColour = Colour( 255, 255, 0 );
::g_Text1.FontSize = 13;
::g_Text2.TextColour = Colour( 127, 255, 212 );
::g_Text2.FontSize = 11;
::g_Text3.TextColour = Colour( 255, 255, 0 );
::g_Text3.FontSize = 13;
::g_Text4.TextColour = Colour( 127, 255, 212 );
::g_Text4.FontSize = 11;
::g_Text5.TextColour = Colour( 127, 255, 212 );
::g_Text5.FontSize = 11;
::g_Text6.TextColour = Colour( 255, 255, 0 );
::g_Text6.FontSize = 11;
::g_Text7.TextColour = Colour( 127, 255, 212 );
::g_Text7.FontSize = 11;
::g_Text8.TextColour = Colour( 127, 255, 212 );
::g_Text8.FontSize = 11;
::g_Text9.TextColour = Colour( 127, 255, 212 );
::g_Text9.FontSize = 11;
::g_Text10.TextColour = Colour( 255, 255, 0 );
::g_Text10.FontSize = 11;
::g_Text11.TextColour = Colour( 127, 255, 212 );
::g_Text11.FontSize = 11;
::g_Text12.TextColour = Colour( 127, 255, 212 );
::g_Text12.FontSize = 11;

AddGUILayer( ::g_Window );
::g_Window.AddChild( ::g_Button );
::g_Window.AddChild( ::g_Text );
::g_Window.AddChild( ::g_Text1 );
::g_Window.AddChild( ::g_Text2 );
::g_Window.AddChild( ::g_Text3 );
::g_Window.AddChild( ::g_Text4 );
::g_Window.AddChild( ::g_Text5 );
::g_Window.AddChild( ::g_Text6 );
::g_Window.AddChild( ::g_Text7 );
::g_Window.AddChild( ::g_Text8 );
::g_Window.AddChild( ::g_Text9 );
::g_Window.AddChild( ::g_Text10 );
::g_Window.AddChild( ::g_Text11 );
::g_Window.AddChild( ::g_Text12 );
::g_Button.SetCallbackFunc( "DeleteCommands" );

return 1;
}

function HalloThere( somenumber )
{
::g_bEnabled = true;
CMDS( true );
Message( "Click OK to close, if not please press [M] By:"   somenumber );

}
 
function Mouse( somenumber )
{
ShowMouseCursor( false );
ToggleCameraMovement ( true );
Message( "You have restored the mouse By:"   somenumber );
}
 

function onClientCommand( cmd, text )
{
if ( cmd == "cmds" )
{
if ( ( text ) && ( text == "off" ) )
{
::g_bEnabled = false;
CMDS( false );
}
else
{
::g_bEnabled = true;
CMDS( true );
}
}

return 1;
}

function DeleteCommands()
{
::g_bEnabled = false;
CMDS( false );
}

function CMDS( enabled )
{
if ( enabled )
{
::g_Window.Visible = true;
ShowMouseCursor( true );
ToggleCameraMovement ( false );
g_pLocalPlayer.Frozen = true;
}
else
{
::g_Window.Visible = false;
ShowMouseCursor( false );
ToggleCameraMovement ( true );
g_pLocalPlayer.Frozen = false;
}
}
----------------------------------------------------------------------
Maybe you should create a new cmd.nut and Script.xml joined <script file= in "cmd.nut" client= "1" / >

????? :)  I from china

Beary

  • Newbie
  • *
  • Posts: 39
  • Karma: +2/-5
    • View Profile
Re: [GUI]Server command window
« Reply #1 on: December 22, 2014, 11:41:29 pm »

 

© Liberty Unleashed Team.