devildead622 Posted March 12, 2013 Posted March 12, 2013 I can not add anyone with this command! is something wrong? function givevip (playerSource, commandName, accountName) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if accountName then aclGroupAddObject (aclGetGroup("Vip"), "user."..accountName) outputChatBox ("Conta '"..accountName.."' add aos Vips com sucesso!", playerSource) else outputChatBox ("Nome incorreto", playerSource) outputChatBox ("Correto: /darvip [accountName]", playerSource) end end end addCommandHandler ("darvip", givevip)
Castillo Posted March 12, 2013 Posted March 12, 2013 The script seems to be fine, did you set it as server side on the meta.xml? is the resource added to "Admin" group on the acl.xml?
devildead622 Posted March 12, 2013 Author Posted March 12, 2013 meta.xml <meta> <info author="aafaahafae" version="1.0" name="vip" type="misc" /> <script src="vip.lua" type="server" /> </meta> acl.xml <group name="Admin"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="resource.admin"></object> <object name="resource.webadmin"></object> <object name="resource.DayZ"></object> <object name="resource.login"></object> <object name="resource.slothbot"></object> <object name="user.Devil_Dead"></object> -- My account name <object name="user.Angel_Dead"></object> <object name="user.ADHOCNEW"></object> </group> <group name="Vip"> <object name="resource.vip"></object> <object name="user.Devil_Dead"></object> <object name="user.Angel_Dead"></object> -- I add these 2 names in the file, not by command </group>
Castillo Posted March 12, 2013 Posted March 12, 2013 That won't fix anything, Pain. @devildead: Your acl is wrong, use this: "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "resource.admin"> "resource.webadmin"> "resource.DayZ"> "resource.login"> "resource.slothbot"> "user.Devil_Dead"> -- My account name "user.Angel_Dead"> "user.ADHOCNEW"> "resource.vip"> "Vip"> "user.Devil_Dead"> "user.Angel_Dead"> -- I add these 2 names in the file, not by command
devildead622 Posted March 12, 2013 Author Posted March 12, 2013 enable function once the player enters the game? function vipentered( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Vip" ) ) then outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( "#4200FF Voce e um VIP!", player, 255,0,0) outputChatBox ( "#4200FF Para ver seus comandos, use #ff0000 /ajudavip", player, 255,0,0) end end
devildead622 Posted March 12, 2013 Author Posted March 12, 2013 addEventHandler("onPlayerLogin", root, function ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Vip" ) ) then outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( "#4200FF Voce e um VIP!", player, 255,0,0) outputChatBox ( "#4200FF Para ver seus comandos, use #ff0000 /ajudavip", player, 255,0,0) outputChatBox ( "#4200FF E para ver os comandos do servidor: #ff0000 /ajuda", player, 255,0,0) else outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( " ", player, 255,0,0) outputChatBox ( "#4200FF Compre sua base+vip por apenas RS5.00", player, 255,0,0) outputChatBox ( "#4200FF Add skype: devildead622 e confira!", player, 255,0,0) outputChatBox ( "#4200FF Para ver os comandos do servidor: #ff0000 /ajuda", player, 255,0,0) end end ) so? ^^
Castillo Posted March 12, 2013 Posted March 12, 2013 addEventHandler("onPlayerLogin", root, function ( _, account ) local accName = getAccountName ( account ) outputChatBox ( " ", source, 255,0,0) outputChatBox ( " ", source, 255,0,0) outputChatBox ( " ", source, 255,0,0) outputChatBox ( " ", source, 255,0,0) outputChatBox ( " ", source, 255,0,0) outputChatBox ( " ", source, 255,0,0) outputChatBox ( " ", source, 255,0,0) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Vip" ) ) then outputChatBox ( "#4200FF Voce e um VIP!", source, 255,0,0) outputChatBox ( "#4200FF Para ver seus comandos, use #ff0000 /ajudavip", source, 255,0,0) outputChatBox ( "#4200FF E para ver os comandos do servidor: #ff0000 /ajuda", source, 255,0,0) else outputChatBox ( "#4200FF Compre sua base+vip por apenas RS5.00", source, 255,0,0) outputChatBox ( "#4200FF Add skype: devildead622 e confira!", source, 255,0,0) outputChatBox ( "#4200FF Para ver os comandos do servidor: #ff0000 /ajuda", source, 255,0,0) end end )
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