Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-01-04, 18:36


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Jak ten kod przerobi? aby si? gracze wy?wietlali od razu, a nie po ok. 10 minutach? Gdy restartuje skrypt to tak oko?o 10 minut musi min?? aby si? wy?wietli?y tam nicki graczy.


local admins ""

function processAdminList()
   players getElementsByType "player" )
   admins ""
   for k,v in ipairs(players) do
      local accountname ""
      if (isGuestAccount(getPlayerAccount(v)) == falsethen
         accountname getAccountName (getPlayerAccount(v))
         if isObjectInACLGroup "user." .. accountnameaclGetGroup "Admin" ) ) or isObjectInACLGroup "user." .. accountnameaclGetGroup "" ) ) or isObjectInACLGroup "user." .. accountnameaclGetGroup "" ) ) then
            if (admins == ""then
               admins getPlayerName(v)
            else
               admins admins .. ", " .. getPlayerName(v)
            end
         end
      end
   end
end

addEventHandler"onPlayerLogin"getRootElement(), processAdminList )
addEventHandler"onPlayerLogout"getRootElement(), processAdminList )
addEventHandler"onPlayerQuit"getRootElement(), processAdminList )




function setAdminList(Player,command)
   if admins ~= "" then
outputChatBox("RCONi:" getRootElement(), 100 00true)
outputChatBox("RCONi:"..admins getRootElement(), player)
   else
      outputChatBox("RCONi:" getRootElement(), 100 00true)
      outputChatBox("brak" getRootElement(), player)
   end
end
addCommandHandler("admins"setAdminList)

--- !admins or !onlineadmins or !Admins
 function tAdmins(message,messageType)
 if message == "!admins" or message == "!Admins" or message =="!onlineadmins" then
 local playeraccount getPlayerAccount(source)
    if admins ~= "" then
outputChatBox("RCONi:" getRootElement(), 100 00true)
outputChatBox("RCONi:"..admins getRootElement(), player)
   else
     outputChatBox("RCONi:" getRootElement(), 100 00true)
      outputChatBox("brak" getRootElement(), player)
   end
 end
 end
 addEventHandler("onPlayerChat",getRootElement(),tAdmins)

































local admins ""

function processAdminList()
   players getElementsByType "player" )
   admins ""
   for k,v in ipairs(players) do
      local accountname ""
      if (isGuestAccount(getPlayerAccount(v)) == falsethen
         accountname getAccountName (getPlayerAccount(v))
         if isObjectInACLGroup "user." .. accountnameaclGetGroup "" ) ) or isObjectInACLGroup "user." .. accountnameaclGetGroup "" ) ) or isObjectInACLGroup "user." .. accountnameaclGetGroup "SuperModerator" ) ) then
            if (admins == ""then
               admins getPlayerName(v)
            else
               admins admins .. ", " .. getPlayerName(v)
            end
         end
      end
   end
end

addEventHandler"onPlayerLogin"getRootElement(), processAdminList )
addEventHandler"onPlayerLogout"getRootElement(), processAdminList )
addEventHandler"onPlayerQuit"getRootElement(), processAdminList )




function setAdminList(Player,command)
   if admins ~= "" then
      outputChatBox("Admini:" getRootElement(), 255 00true)
      outputChatBox("Admini:"..admins getRootElement(), player)
   else
   outputChatBox("Admini:" getRootElement(), 255 00true)
      outputChatBox("brak" getRootElement(), player)
   end
end
addCommandHandler("admins"setAdminList)

--- !admins or !onlineadmins or !Admins
 function tAdmins(message,messageType)
 if message == "!admins" or message == "!Admins" or message =="/admins" then
 local playeraccount getPlayerAccount(source)
    if admins ~= "" then
      outputChatBox("Admini:" getRootElement(), 255 00true)
      outputChatBox("Admini:"..admins getRootElement(), player)
   else
      outputChatBox("Admini:" getRootElement(), 255 00true)
      outputChatBox("brak" getRootElement(), player)
   end
 end
 end
 addEventHandler("onPlayerChat",getRootElement(),tAdmins)
























































local admins ""

function processAdminList()
   players getElementsByType "player" )
   admins ""
   for k,v in ipairs(players) do
      local accountname ""
      if (isGuestAccount(getPlayerAccount(v)) == falsethen
         accountname getAccountName (getPlayerAccount(v))
         if isObjectInACLGroup "user." .. accountnameaclGetGroup "Moderator" ) ) or isObjectInACLGroup "user." .. accountnameaclGetGroup "" ) ) or isObjectInACLGroup "user." .. accountnameaclGetGroup "" ) ) then
            if (admins == ""then
               admins getPlayerName(v)
            else
               admins admins .. ", " .. getPlayerName(v)
            end
         end
      end
   end
end

addEventHandler"onPlayerLogin"getRootElement(), processAdminList )
addEventHandler"onPlayerLogout"getRootElement(), processAdminList )
addEventHandler"onPlayerQuit"getRootElement(), processAdminList )




function setAdminList(Player,command)
   if admins ~= "" then
     outputChatBox("Moderatorzy:" getRootElement(), 100 100255true)
     outputChatBox("Moderatorzy:"..admins getRootElement(), player)
   else
      outputChatBox("Moderatorzy:" getRootElement(), 100 100255true)
      outputChatBox("brak" getRootElement(), player)
   end
end
addCommandHandler("admins"setAdminList)

--- !admins or !onlineadmins or !Admins
 function tAdmins(message,messageType)
 if message == "!admins" or message == "!Admins" or message =="/admins" then
 local playeraccount getPlayerAccount(source)
    if admins ~= "" then
     outputChatBox("Moderatorzy:" getRootElement(), 100 100255true)
     outputChatBox("Moderatorzy:"..admins getRootElement(), player)
   else
      outputChatBox("Moderatorzy:" getRootElement(), 100 100255true)
      outputChatBox("brak" getRootElement(), player)
   end
 end
 end
 addEventHandler("onPlayerChat",getRootElement(),tAdmins)



Za pomoc piwko i respekt.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-01-04, 18:38


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Je?li jest, wyeliminuj setTimer, nie zagl?da?em w kod bo jest strasznie d?ugi, powiene? da? kawa?ek kodu gdzie jest b?ad, a nie ca?o?c.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-01-04, 18:43


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

W?a?nie w ca?o?ci jest b??d, bo w RCONi, Admini i Moderatorzy wy?wietla graczy dopiero po oko?o 10 minutach, nigdzie setTimer nie ma.

Postaw piwo autorowi tego posta
 

 
Tagi: lista :: administracji
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku