Stevenn Posted April 5, 2012 Share Posted April 5, 2012 Hello. I seem to have a problem with a VIP script I'm trying to make. addEventHandler("onClientPlayerLogin",root, function() local account = getAccountName(getPlayerAccount(source)) local lp = getLocalPlayer() if isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then triggerServerEvent("isVIP",lp) elseif not isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then -- if the player isn't in the VIP group we should trigger this event. triggerServerEvent("notVIP",lp) end end) Link to comment
Alpha Posted April 5, 2012 Share Posted April 5, 2012 You have a mix of server sided functions and client sided functions. Server: addEventHandler("onPlayerLogin",root, function(_, account) local accountName = getAccountName(account) if isObjectInACLGroup("user." .. accountName, aclGetGroup("VIP")) then triggerEvent("isVIP", source) else triggerEvent("notVIP", source) end end ) 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