Jump to content

[Help] 2 Questions [ Help]


damien111

Recommended Posts

Posted

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?

Posted

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?

Posted

I tryed that, now i need some help , sorry bout this, but i think i did this wrong :P

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) 

Posted
addEventHandler ( "onPlayerLogin", getRootElement ( ), 
    function ( ) 
        triggerClientEvent ( source, "onLogin", source ) 
    end 
) 

And change "source()" at client side with "root".

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...