Jump to content

[РЕШЕНО]при написании имени,дает аккаунт


Recommended Posts

Привет,мне надо сделать так,что бы если я ввел ник игрока,мне в чат написало имя аккаунта этого игрока...

У меня не получается,пишет 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 by Guest
Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...