Jump to content

question about log


Chaos

Recommended Posts

hey,

so the question is why when others logged in it's won't appear his login log in memo and only show my login log ?

server side :

  
  
    function showStatus () 
    name = getPlayerName(source) 
    account = getPlayerAccount(source) 
    accountName = getAccountName (account) 
    triggerClientEvent(source,"showStatus",source,name,accountName) 
        end 
  
    addEventHandler ("onPlayerLogin", getRootElement(), showStatus) 

Client side:

  
  
  
GUIEditor = { 
    button = {}, 
    window = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        wnd = guiCreateWindow(194, 118, 349, 331, "Info Panel", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible ( wnd, false ) 
         
        memo = guiCreateMemo(10, 22, 328, 261, "", false, wnd) 
    
    end 
) 
  
function otworz () 
if ( guiGetVisible ( wnd )) == false then 
guiSetVisible ( wnd, true ) 
showCursor ( true ) 
else 
guiSetVisible ( wnd, false ) 
showCursor ( false ) 
end 
end 
addCommandHandler("showlog",otworz) 
  
  
  
function changer (name,accountName) 
    local gText = guiGetText(memo) 
    if (gText ~= false) then 
   guiSetText(memo,"\n"..name.." has logged in as "..accountName) 
   end 
   end 
addEvent ( "showStatus", true ) 
addEventHandler ( "showStatus", getRootElement(), changer ) 
  
  
  

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