Jump to content

Loggin in


Reflex#

Recommended Posts

    local root = getRootElement() 
      
    addEventHandler("onPlayerLogin", root, 
      function() 
        outputChatBox(getPlayerName(source).." has logged in!", root) 
      end 
    ) 
      
    local root = getRootElement() 
      
    addEventHandler("onPlayerLogout", root, 
      function() 
        outputChatBox(getPlayerName(source).." has logged out!", root) 
      end 
    ) 

Script dont work..wtf? :D

Link to comment

<meta> 
    <info author="ReFleX" type="script" name="Logged" version="1.0.3" /> 
    <script src="Logged.lua" /> 
</meta> 

Because onPlayerLogin and onPlayerLogout is server side events.

Edited by Guest
Link to comment
    local root = getRootElement() 
      
    addEventHandler("onPlayerLogin", root, 
      function() 
        outputChatBox(getPlayerName(source).." has logged in!", root) 
      end 
    ) 
      
    local root = getRootElement() 
      
    addEventHandler("onPlayerLogout", root, 
      function() 
        outputChatBox(getPlayerName(source).." has logged out!", root) 
      end 
    ) 

Script dont work..wtf? :D

All work..but i have color code in nickname and when i login..write [RHD]R#555555eFleX has logged in!

How to fix this?

Link to comment
Color code example:
  
 outputChatBox(getPlayerName(source).." has logged in!", root,255,255,255,true) 
  

No no i'm not about color code of this words.about color code in my nick..[RHD]R#555555eFleX

this is showing when i login in and out.but how fix this?

Link to comment
  
addEventHandler( "onPlayerLogin", root, 
    function( ) 
        outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!" ) 
    end 
) 
  
addEventHandler( "onPlayerLogout", root, 
    function( ) 
        outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!" ) 
    end 
) 

Link to comment
  
addEventHandler( "onPlayerLogin", root, 
    function( ) 
        outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!" ) 
    end 
) 
  
addEventHandler( "onPlayerLogout", root, 
    function( ) 
        outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!" ) 
    end 
) 

Thx all work..but when i add in outputChatBox " #0075EB [RHD]" this dont work..i show all script:

addEventHandler( "onPlayerLogin", root, 
    function( ) 
        outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!", 255,255,255,) 
    end 
) 
  
addEventHandler( "onPlayerLogout", root, 
    function( ) 
        outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!", 255,255,255) 
    end 
) 

Link to comment

Try:

addEventHandler( "onPlayerLogin", root, 
    function( ) 
        outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!", 255,255,255, true) 
    end 
) 
  
addEventHandler( "onPlayerLogout", root, 
    function( ) 
        outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!", 255,255,255, true) 
    end 
) 

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