Jump to content

Join Quit // Why it doesn't show?


papam77

Recommended Posts

Hello, i am making my own Join Quit, but i have really stupid problem.

addEventHandler("onPlayerLogin", root, 
    function() 
    GUIEditor.label[1] = guiCreateLabel(0.89, 0.00, 0.11, 0.05, "ahoj", true, root) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
  
  
        GUIEditor.staticimage[1] = guiCreateStaticImage(0.86, 0.00, 0.14, 0.05, "img/join.png", true, root) 
        guiSetAlpha(GUIEditor.staticimage[1], 0.39)     
    end 
) 
  

Why i don't see image and text "ahoj" ?

Link to comment

join_c.lua

----------------------------------------- 
-- Join & Quit by DeeJay 
----------------------------------------- 
function ukazToGUI() 
  
   joinPlayerShowName = guiCreateLabel(0.89, 0.00, 0.11, 0.05, "ahoj", true) 
   guiLabelSetVerticalAlign(joinPlayerShowName, "center") 
  
   joinPlayerShowImage = guiCreateStaticImage(0.86, 0.00, 0.14, 0.05, "img/join.png", true) 
   guiSetAlpha(joinPlayerShowImage, 0.39) 
   outputChatBox("Ukazano") 
  
end 
addEventHandler("ukazSe", getRootElement(), ukazToGUI ) 
addEvent("ukazSe",true) 

join_s.lua

----------------------------------------- 
-- Join & Quit by DeeJay 
----------------------------------------- 
addEventHandler("onPlayerLogin", root, 
    function() 
    outputChatBox("Trigerovano") 
    triggerClientEvent("ukazSe", getRootElement(), source) 
    end) 
  

Where's error ? It doesn't work...

Link to comment
----------------------------------------- 
-- Join & Quit by DeeJay 
----------------------------------------- 
addEvent("ukazSe",true) 
function ukazToGUI( playerName ) 
  
   joinPlayerShowName = guiCreateLabel(0.89, 0.00, 0.11, 0.05, "ahoj " .. playerName .." ", true) 
   guiLabelSetVerticalAlign(joinPlayerShowName, "center") 
  
   joinPlayerShowImage = guiCreateStaticImage(0.86, 0.00, 0.14, 0.05, "img/join.png", true) 
   guiSetAlpha(joinPlayerShowImage, 0.39) 
   outputChatBox("Ukazano") 
  
end 
addEventHandler( "ukazSe", getRootElement(), ukazToGUI ) 

Link to comment

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...