E-mail Posted September 15, 2011 Share Posted September 15, 2011 Hi all before 2 years i have made this script but it need server side i forget the commcand ClientSide---- function gui ( ) window = guiCreateWindow ( 0.21, 0.12, 0.6, 0.75, "Mr.Happey", true ) showCursor ( true ) guiWindowSetSizable ( window, false ) panel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, window ) welcome = guiCreateTab( "Welcome", panel ) rules = guiCreateTab( "Rules", panel ) admins = guiCreateTab( "Admins", panel ) guiCreateStaticImage( 20, 15, 448, 30, "text.png", false, window ) guiCreateStaticImage( 7, 2, 448, 368, "rules.png", false, rules ) guiCreateStaticImage( 7, 2, 448, 368, "welcome.png", false, welcome ) xml = xmlLoadFile( "admins.xml" ) text = xmlNodeGetValue( xml ) memo = guiCreateMemo ( 0.007, 0.007, 0.987, 0.98, text, true, admins ) guiMemoSetReadOnly ( memo, true ) bindKey ( "F5", "down", show_gui ) end addEventHandler( "onClientResourceStart", getResourceRootElement(), gui ) addEventHandler( "onClientPlayerJoin", getLocalPlayer(), gui ) ----------------- function show_gui ( ) if ( guiGetVisible ( window ) == true ) then guiSetVisible ( window, false ) showCursor ( false ) else guiSetVisible ( window, true ) showCursor ( true ) end end Link to comment
Castillo Posted September 15, 2011 Share Posted September 15, 2011 Why does it need server side? I don't see any trigger in the script. Link to comment
TAPL Posted September 15, 2011 Share Posted September 15, 2011 addEventHandler( "onClientResourceStart", getResourceRootElement(), gui ) addEventHandler( "onClientPlayerJoin", getLocalPlayer(), gui ) The first event should do the job, remove the second Link to comment
mjau Posted September 15, 2011 Share Posted September 15, 2011 TAPL i think he made both to make it show up when the player joins not onlywhyen resource starts oh and if u want to have a command use addCommandHandler Link to comment
JR10 Posted September 15, 2011 Share Posted September 15, 2011 kimmis, onClientResourceStart, is triggered when the client finishes downloading. TAPL is right, he doesn't need the second one, and he doesn't need a server side for it. Link to comment
Puma Posted September 15, 2011 Share Posted September 15, 2011 You can't make it serverside, because there's GUI in it. Link to comment
mjau Posted September 15, 2011 Share Posted September 15, 2011 oh ok srry then should have readen it better Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now