#Chris Posted June 30, 2019 Share Posted June 30, 2019 Sziasztok, Próbáltam egy Adminchat scriptet átt alakítani, de nem sikerült tehát letörölte, az van hogy van ACL admin rangok Tulajdonos,Fejlesztő,SzuperAdmin,FőAdmin,Admin5,Admin4,Admin3,Admin2,Admin1, csak ennyi és az kellene hogy amilyen rangon vagyok akkor azt írja ki infoboxba a /a parancsra hogy Tuladjonos vagyok [Adminchat]: Tulajdonos Chris: Szép napot Fejlesztő vagyok[Adminchat]: Fejlesztő Chris: Szép napot SzuperAdmin vagyok [Adminchat]: SzuperAdmin Chris: Szép napot FőAdmin vagyok [Adminchat]: FőAdmin Chris: Szép napot Link to comment
#Chris Posted June 30, 2019 Author Share Posted June 30, 2019 @stPatrick neked valami? láttam sok helyre sok jót írtál Link to comment
Moderators Patrick Posted June 30, 2019 Moderators Share Posted June 30, 2019 (edited) -- SERVER SIDE local adminACLGroupNames = {"Tuladjonos", "Fejlesztő", "SzuperAdmin", "FőAdmin", "Admin5", "Admin4", "Admin3", "Admin2", "Admin1"} local function isAdmin(player) local accName = getAccountName(getPlayerAccount(player)) for _, groupName in ipairs(adminACLGroupNames) do if isObjectInACLGroup("user."..accName, aclGetGroup(groupName)) then return groupName end end return false end addCommandHandler("a", function(player, cmd, ...) local adminGroupName = isAdmin(player) if adminGroupName then local text = table.concat({...}, " ") local name = getPlayerName(player) for _, p in ipairs(getElementsByType("player")) do if isAdmin(p) then outputChatBox("[AdminChat]: "..adminGroupName.." "..name..": "..text, p, 255, 255, 255, true) end end end end) Ez egy baromi csúnya kód, nem is teszteltem, de elméletileg nincs benne hiba. Edited June 30, 2019 by stPatrick Link to comment
#Chris Posted July 1, 2019 Author Share Posted July 1, 2019 Jó lenne, csak a 8. sorba talált valami hibát @ isObjectInAclGroup [Expected acl-group at argument 2, got b.... 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