Jump to content

Join Quit // Why it doesn't show?


papam77

Recommended Posts

Posted

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" ?

Posted

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

Posted
----------------------------------------- 
-- 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 ) 

Posted
joinPlayerShowName = guiCreateLabel(0.89, 0.00, 0.11, 0.05, "ahoj " .. getPlayerName(playerName), true) 

Please do not PM me with scripting related question nor support, use the forums instead.

Posted

To the label? Use guiLabelSetColor.

Please do not PM me with scripting related question nor support, use the forums instead.

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