DarkByte Posted January 8, 2016 Posted January 8, 2016 I made a command that sets a player to be on duty but it wont work. function duty (playerSource) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( playerSource ) ), aclGetGroup ( "Admin" ) ) setElementData(playerSource,"duty",true) outputChatBox("It works") else setElementData(playerSource,"duty",false) end end addCommandHandler("duty",duty) When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Revolt Posted January 8, 2016 Posted January 8, 2016 It has to be server-sided. Need a scripter? Feel free to contact me for inexpensive high-quality service! Skype username: friedonibot
DarkByte Posted January 8, 2016 Author Posted January 8, 2016 It is.Nothing in debug When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Revolt Posted January 8, 2016 Posted January 8, 2016 function duty (playerSource) local acc = getPlayerAccount ( playerSource ) if (acc and not isGuestAccount(acc)) then if isObjectInACLGroup ( "user.".. getAccountName ( acc ), aclGetGroup ( "Admin" ) ) setElementData(playerSource,"duty",true) outputChatBox("It works", playerSource) else setElementData(playerSource,"duty",false) outputChatBox("You're not an Admin!", playerSource) end else outputChatBox("You're not logged it!", playerSource) end end addCommandHandler("duty",duty) Try this. Need a scripter? Feel free to contact me for inexpensive high-quality service! Skype username: friedonibot
1LoL1 Posted January 8, 2016 Posted January 8, 2016 function duty (playerSource) local acc = getPlayerAccount ( playerSource ) if (acc and not isGuestAccount(acc)) then if isObjectInACLGroup ( "user.".. getAccountName ( acc ), aclGetGroup ( "Admin" ) ) setElementData(playerSource,"duty",true) outputChatBox("It works", playerSource) else setElementData(playerSource,"duty",false) outputChatBox("You're not an Admin!", playerSource) end else outputChatBox("You're not logged it!", playerSource) end end addCommandHandler("duty",duty) Try this. You forgot "then". if isObjectInACLGroup ("user.".. getAccountName (acc), aclGetGroup ("Admin")) then
Revolt Posted January 8, 2016 Posted January 8, 2016 , yep Need a scripter? Feel free to contact me for inexpensive high-quality service! Skype username: friedonibot
DarkByte Posted January 8, 2016 Author Posted January 8, 2016 Works, but when i type duty 2nd time it wont set to false When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Revolt Posted January 8, 2016 Posted January 8, 2016 function duty (playerSource) local acc = getPlayerAccount ( playerSource ) if (acc and not isGuestAccount(acc)) then if isObjectInACLGroup ( "user.".. getAccountName ( acc ), aclGetGroup ( "Admin" ) ) then setElementData(playerSource,"duty",not getElementData(playerSource,"duty")) else outputChatBox("You're not an Admin!", playerSource) end else outputChatBox("You're not logged it!", playerSource) end end addCommandHandler("duty",duty) Need a scripter? Feel free to contact me for inexpensive high-quality service! Skype username: friedonibot
DarkByte Posted January 8, 2016 Author Posted January 8, 2016 Thanks, working When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
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