Sign in to follow this  
Renazz

Chat Só pra ACL

Recommended Posts

como eu criar um chat só para quem está em uma acl poder ver e escrever nele?

Share this post


Link to post
Posted (edited)
addCommandHandler
isObjectInACLGroup
getAccountName
getPlayerAccount
aclGetGroup
table.concat
outputChatBox

Edit: função para mostrar a msg só pra quem é do grupo:

--https://wiki.multitheftauto.com/wiki/IsPlayerInACL
function isPlayerInACL(player, acl)
   local accountName = getAccountName( getPlayerAccount(player) )
   if accountName ~= "guest" and type( aclGetGroup(acl) ) == "userdata" then
      return isObjectInACLGroup( "user."..accountName, aclGetGroup(acl) )
   end
   return false
end

Use-a num loop com getElementsByType.

Edited by DNL291

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.