maauroo Posted June 26, 2012 Share Posted June 26, 2012 Hola.. Quiesiera Hacer Un Cmd /admin Que Aparescan La Lista De Admin. Como Lo Hacer? Quiero Que Me Ayuden Hacer Uno. Gracias.. Link to comment
Castillo Posted June 27, 2012 Share Posted June 27, 2012 addCommandHandler getElementsByType getPlayerAccount getAccountName isObjectInACLGroup outputChatBox Link to comment
maauroo Posted June 28, 2012 Author Share Posted June 28, 2012 Pero Como Lo Puedo Armar ? Link to comment
Arsilex Posted June 28, 2012 Share Posted June 28, 2012 Pos armándolo tío tu ad lo que puedes y posteas lo que as echo aquí nadie te va a decir como hacerlo.. Link to comment
BorderLine Posted June 28, 2012 Share Posted June 28, 2012 en caso que quieras mostrar los admins por chat. en la misma wiki hay un ejemplo players = getElementsByType ( "player" ) admins = "" for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then if (admins == "") then admins = getPlayerName(v) else admins = admins .. ", " .. getPlayerName(v) end end end end outputChatBox( "Online Admins:", getRootElement(), 255, 255, 0) outputChatBox( " " .. tostring ( admins ), getRootElement(), 255, 255, 0) Si quieres un dxdraw ya empieza a complicarse, pero ai te basas en los mismos argumentos suerte Link to comment
maauroo Posted June 29, 2012 Author Share Posted June 29, 2012 Y El Comando Como Lo Ubico En Esa Funcion? Link to comment
BorderLine Posted June 29, 2012 Share Posted June 29, 2012 players = getElementsByType ( "player" ) admins = "" funtion showadmins() for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then if (admins == "") then admins = getPlayerName(v) else admins = admins .. ", " .. getPlayerName(v) end end end end outputChatBox( "Online Admins:", getRootElement(), 255, 255, 0) outputChatBox( " " .. tostring ( admins ), getRootElement(), 255, 255, 0) addCommandHandler("admins",showadmins) intenta eso cuando pongas /admins deberian mostrarse, o hay tu cambias el comando Link to comment
maauroo Posted June 29, 2012 Author Share Posted June 29, 2012 No Me Funciona.. Me Aparece Un Error De Admins.lua:4: ´=´expected near ´showadmins ´Y Depues Warning y dice lo mismo. Qu Problema hay ? Link to comment
BorderLine Posted June 30, 2012 Share Posted June 30, 2012 lo pusiste en server side cierto? Link to comment
Recommended Posts