Furious^ONE! Posted August 17, 2014 Share Posted August 17, 2014 Hi, I have problem with this script: function toggleGGun(player) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) local on = not exports.gravity_gun:isGravityGunEnabled(player) exports.gravity_gun:togglePlayerGravityGun(player,on) outputChatBox("gravity gun "..(on and "on" or "off"),player) end addCommandHandler("ggun",toggleGGun) I want this script is reserved to Admin. I add this code: local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) but its not working please help me.. Link to comment
Et-win Posted August 17, 2014 Share Posted August 17, 2014 getPlayerAccount ( source ) ) source to player Link to comment
Furious^ONE! Posted August 17, 2014 Author Share Posted August 17, 2014 Its not working Link to comment
undefined Posted August 18, 2014 Share Posted August 18, 2014 This type is server. What is the this type on xml? Link to comment
Saml1er Posted August 18, 2014 Share Posted August 18, 2014 function toggleGGun(player) local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then return end local accName = getAccountName ( acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) local on = not exports.gravity_gun:isGravityGunEnabled(player) exports.gravity_gun:togglePlayerGravityGun(player,on) outputChatBox("gravity gun "..(on and "on" or "off"),player) end addCommandHandler("ggun",toggleGGun) 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