Bu[R]nS Posted July 5, 2013 Posted July 5, 2013 Recentemente Coloquei sistema de VIP no meu sv,Ai criei um tele pra uma "area" VIP,o Problema é que todo mundo por digitar o comando e ir '--' Aqui o codigo: -----------------------------------------------------------------Area VIP--------------------------------------------------------------------------- function tele (thePlayer) setElementPosition ( thePlayer, -564.47814941406, 310.98858642578, 491.93438720703 ) outputChatBox ('#FF0000[ #00ff00/areavip#FF0000 ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #828282Foi para a Area VIP !', root, 255, 255, 255, true) end addCommandHandler ( "areavip", tele ) Tambem se fosse possivel queria bloquear o warp para esse player Mais acho que não tem como.
manawydan Posted July 5, 2013 Posted July 5, 2013 Tente o seguinte (não testado) se no acl o grupo não for 'VIP" troque o para qual é o seu! -----------------------------------------------------------------Area VIP--------------------------------------------------------------------------- function tele (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then setElementPosition ( thePlayer, -564.47814941406, 310.98858642578, 491.93438720703 ) outputChatBox ('#FF0000[ #00ff00/areavip#FF0000 ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #828282Foi para a Area VIP !', root, 255, 255, 255, true) else outputChatBox ('Apenas VIPs podem usar esse comando', thePlayer, 255, 255, 255, true) end end addCommandHandler ( "areavip", tele )
Bu[R]nS Posted July 7, 2013 Author Posted July 7, 2013 Tente o seguinte (não testado)se no acl o grupo não for 'VIP" troque o para qual é o seu! -----------------------------------------------------------------Area VIP--------------------------------------------------------------------------- function tele (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then setElementPosition ( thePlayer, -564.47814941406, 310.98858642578, 491.93438720703 ) outputChatBox ('#FF0000[ #00ff00/areavip#FF0000 ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #828282Foi para a Area VIP !', root, 255, 255, 255, true) else outputChatBox ('Apenas VIPs podem usar esse comando', thePlayer, 255, 255, 255, true) end end addCommandHandler ( "areavip", tele ) Aqui o Resource nem ligou
DNL291 Posted July 7, 2013 Posted July 7, 2013 O código não tem erros, veja se o meta.xml está correto e se você atualizou a lista de recursos do servidor.
LucasBaker Posted July 9, 2013 Posted July 9, 2013 function tele (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then setElementPosition ( thePlayer, -564.47814941406, 310.98858642578, 491.93438720703 ) outputChatBox ('#FF0000[ #00ff00/areavip#FF0000 ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #828282Foi para a Area VIP !', root, 255, 255, 255, true) else outputChatBox ('Apenas VIPs podem usar esse comando', thePlayer, 255, 255, 255, true) end end addCommandHandler ( "areavip", tele ) Crie uma acl com o nome VIP, verifique o meta
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