Jump to content

Como Hacerlo?(Admin)


maauroo

Recommended Posts

Posted
addCommandHandler 
getElementsByType 
getPlayerAccount 
getAccountName 
isObjectInACLGroup 
outputChatBox 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted
  
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

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

No Me Funciona.. Me Aparece Un Error De Admins.lua:4: ´=´expected near ´showadmins ´Y Depues Warning y dice lo mismo. Qu Problema hay ?

Posted

lo pusiste en server side cierto?

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...