KruTolic_rus Posted July 18, 2013 Share Posted July 18, 2013 (edited) Привет,мне надо сделать так,что бы если я ввел ник игрока,мне в чат написало имя аккаунта этого игрока... У меня не получается,пишет boolean value.. function GetAccountName ( thePlayer,command,account ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Zone69" ) ) then if getPlayerName (account) then outputChatBox ("He have account name :'"..getAccountName ( getPlayerAccount ( account ) ).."'",thePlayer,130,130,60,false) else outputChatBox ( "You are not argument taken", thePlayer ,255, 0, 0, false) end else outputChatBox ( "You are not Admiral", thePlayer ,255, 0, 0, false) end end addCommandHandler ("account",GetAccountName) еще есть такой вариант,но тоже не робит: function GetAccountName ( thePlayer,command,account ) local Getaccount = getPlayerFromName ( account ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Zone69" ) ) then if Getaccount then outputChatBox ("He have account name :'"..account.."'",thePlayer,130,130,60,false) else outputChatBox ( "You are not argument taken", thePlayer ,255, 0, 0, false) end else outputChatBox ( "You are not Admiral", thePlayer ,255, 0, 0, false) end end addCommandHandler ("account",GetAccountName) Edited July 18, 2013 by Guest Link to comment
KruTolic_rus Posted July 18, 2013 Author Share Posted July 18, 2013 UPD: РЕШЕНО,надо было просто добавить проверку на аккаунт,взяв имя function GetAccountName ( thePlayer,command,account ) local Getaccount = getPlayerFromName ( account ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Zone69" ) ) then if Getaccount then giveaccount = getAccountName ( getPlayerAccount ( Getaccount ) ) outputChatBox ("He have account name :'"..giveaccount.."'",thePlayer,130,130,60,false) else outputChatBox ( "You are not argument taken", thePlayer ,255, 0, 0, false) end else outputChatBox ( "You are not Admiral", thePlayer ,255, 0, 0, false) end end addCommandHandler ("account",GetAccountName) Link to comment
TheNormalnij Posted July 18, 2013 Share Posted July 18, 2013 isObjectInACLGroup Сделана не для таких целей, вам авторы предлагают использовать вместо этого hasObjectPermissionTo Так будет правильнее. 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