Jump to content

redar98

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by redar98

  1. it will work ? addEventHandler("onPlayerChat", root, function (msg, msgType) if msgType == 0 then if msg == "!admins" then function createAdminList() adminlist = { } supermodlist = { } modlist = { } for k, v in ipairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(v)) then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Admin")) then table.insert(adminlist, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("SuperModerator")) then table.insert(supermodlist, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Moderator")) then table.insert(modlist, v) end end end return adminlist, supermodlist, modlist end function AdminList(sourcePlayer, command) local admins, supmods, mods = createAdminList() if #admins == 0 then outputConsole("#ff6600[iNFO]#00ff00 Online Admin yok!", sourcePlayer,false ) else for k, v in ipairs(admins) do outputChatBox("Admin : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) end end if #supmods == 0 then outputConsole("#ff6600[iNFO]#00ff00 Online SuperModerator yok!", sourcePlayer,false ) else for k, v in ipairs(supmods) do outputChatBox("SuperModerator : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) end end if #mods == 0 then outputConsole("#ff6600[iNFO]#00ff00 Online Moderator yok!", sourcePlayer,false ) else for k, v in ipairs(mods) do outputChatBox("Moderator : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) end end end end end end )
  2. I think he is trying to make something like change commands from like "/admins" to "!admins" if that is what your trying to do, i guess you would just have to find the string of "!admins," when someone types a message... yes
  3. can anyone teach me first steps in scripting for example when player write something happens something or it answers
  4. How to use "!" instead of "/" for example here : function createAdminList() adminlist = { } supermodlist = { } modlist = { } for k, v in ipairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(v)) then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Admin")) then table.insert(adminlist, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("SuperModerator")) then table.insert(supermodlist, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Moderator")) then table.insert(modlist, v) end end end return adminlist, supermodlist, modlist end function AdminList(sourcePlayer, command) local admins, supmods, mods = createAdminList() if #admins == 0 then outputConsole("#ff6600[iNFO]#00ff00 Online Admin yok!", sourcePlayer,false ) else for k, v in ipairs(admins) do outputChatBox("Admin : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) end end if #supmods == 0 then outputConsole("#ff6600[iNFO]#00ff00 Online SuperModerator yok!", sourcePlayer,false ) else for k, v in ipairs(supmods) do outputChatBox("SuperModerator : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) end end if #mods == 0 then outputConsole("#ff6600[iNFO]#00ff00 Online Moderator yok!", sourcePlayer,false ) else for k, v in ipairs(mods) do outputChatBox("Moderator : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) end end end addCommandHandler("admins", AdminList)
×
×
  • Create New...