Piorun Posted March 18, 2012 Share Posted March 18, 2012 How to check that player is logged or not? I can't find function which i can use. Link to comment
X-SHADOW Posted March 18, 2012 Share Posted March 18, 2012 i guss there is not function as you want but use this 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 ) Link to comment
Gr0x Posted March 18, 2012 Share Posted March 18, 2012 acc = getPlayerAccount(player) if not isGuestAccount(acc) then --Your code, if not guest account (Player logged in) else --Your code, if guest account end Link to comment
Piorun Posted March 18, 2012 Author Share Posted March 18, 2012 ... f*** it. I use setElementData when the player log in. I think first code isn't good, because i wanted to check if the player is logged when he is using command or something else (pickup, marker ..). Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now