Turbe$Z Posted February 11, 2017 Posted February 11, 2017 addEventHandler("onPlayerLogout", getRootElement(), function () local name = getPlayerName ( source ) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then exports[getResourceName(resource)]:addNotification(root, name.." kilépett a tulajdonos szolgálatból!", "success") end end ) what wrong? onPlayerLogin working with this.. wtf?! My Fun server: My DD server:
NeXuS™ Posted February 11, 2017 Posted February 11, 2017 Does it give you any error in debugscript? Did I help you? NeXuS™#0001
pa3ck Posted February 11, 2017 Posted February 11, 2017 (edited) Maybe because when they logout they are no longer in any team? (guest account). onPlayerLogout passes through 2 arguments, one of them is the oldAccount, use that instead. Edited February 11, 2017 by pa3ck
Turbe$Z Posted February 12, 2017 Author Posted February 12, 2017 8 hours ago, Patrik91 said: Does it give you any error in debugscript? No My Fun server: My DD server:
Turbe$Z Posted February 12, 2017 Author Posted February 12, 2017 8 hours ago, pa3ck said: Maybe because when they logout they are no longer in any team? (guest account). onPlayerLogout passes through 2 arguments, one of them is the oldAccount, use that instead. Like this? function test() if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then exports[getResourceName(resource)]:addNotification(root, " logged out", "success") end end end My Fun server: My DD server:
WhoAmI Posted February 12, 2017 Posted February 12, 2017 (edited) Man, when player logs out he is no longer logged in. Look what argument onPlayerLogout event gives. account thePreviousAccount, account theCurrentAccount Do you see? So, addEventHandler("onPlayerLogout", getRootElement(), function (acc, _) local name = getPlayerName ( source ) if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin")) then exports[getResourceName(resource)]:addNotification(root, name.." kilépett a tulajdonos szolgálatból!", "success") end end ) Edited February 12, 2017 by WhoAmI 1
Turbe$Z Posted February 12, 2017 Author Posted February 12, 2017 3 minutes ago, WhoAmI said: Man, when player logs out he is no longer logged in. Look what argument onPlayerLogout event gives. account thePreviousAccount, account theCurrentAccount Do you see? So, addEventHandler("onPlayerLogout", getRootElement(), function (acc, _) local name = getPlayerName ( source ) if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin")) then exports[getResourceName(resource)]:addNotification(root, name.." kilépett a tulajdonos szolgálatból!", "success") end end ) thanks My Fun server: My DD server:
koragg Posted February 13, 2017 Posted February 13, 2017 Man, when player logs out he is no longer logged in. I love rock/metal/pop but don't mind any other music genre except чалга...that thing sux I also love cars PS I'm friendly
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