damien111 Posted February 1, 2013 Share Posted February 1, 2013 I need to ask two questions about scripting. 1. How can i trigger something to a player when he logs in, onPlayerLogin is server side and i dont know how to get the variable ive made to it, and use it to triggera gui just for that player. 2. How do i draw images onto something and put them ingame, do i have to edit the .txd of a object? Link to comment
Castillo Posted February 1, 2013 Share Posted February 1, 2013 1: triggerClientEvent 2: You mean on a wall? if so, you can use shaders. Link to comment
damien111 Posted February 1, 2013 Author Share Posted February 1, 2013 I tryed triggerClientEvent, but it would create the GUI for everyone.. also how would i do that with shaders, is there a tutorial on the forums i should look for or what? Link to comment
Castillo Posted February 1, 2013 Share Posted February 1, 2013 Instead of triggering to root, use the player that logged in ( source ). Link to comment
damien111 Posted February 1, 2013 Author Share Posted February 1, 2013 I tryed that, now i need some help , sorry bout this, but i think i did this wrong ServerSide Snippit addEventHandler("onPlayerLogin", getRootElement ( ), function() triggerClientEvent ( "onLogin", source() ) end ) Clientside Snippit function loginStuff() showCursor( true ) guiSetVisible(GUIEditor.window[1],true) end addEvent( "onLogin", true ) addEventHandler( "onLogin", source(), loginStuff) Link to comment
Castillo Posted February 1, 2013 Share Posted February 1, 2013 addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( ) triggerClientEvent ( source, "onLogin", source ) end ) And change "source()" at client side with "root". Link to comment
damien111 Posted February 1, 2013 Author Share Posted February 1, 2013 Ah, Resolved, Thankyou very much! One more question if you have time, how can i anchor something to the middle of the screen, so its not in diffrent places on diffrent resolutions 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