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

Wysłany: 2016-02-12, 19:55


Axmell

E-Commerce






Wiek: 24
Na forum: 3951 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

co dodac do kodu zeby wyswietla?o graczy ON-LINE po wpisaniu komendy
function komenda ()
outputChatBox (" ")
outputChatBox ("RCON:",thePlayer,255,0,0)
outputChatBox ("Axmell",thePlayer,255,255,255)
outputChatBox ()
outputChatBox ("Administracja:",thePlayer,255,0,0)
outputChatBox ("BRAK",thePlayer,255,255,255)
outputChatBox ()
outputChatBox ()
end
addCommandHandler( "admins", komenda)

np. Jestem na serverze - wyswietla mnie, nie jestem - nie wyswietla.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-12, 20:06


#404







Wiek: 27
Na forum: 4913 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%

Więcej informacji znajdziesz w Wikipedii MTA:

getOnlineAdmins


Tam masz taki przyk?ad, wystarczy przerobi?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-12, 20:09


Axmell

E-Commerce






Wiek: 24
Na forum: 3951 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

A m?g?by? troszku pot?umaczy?? Bo na razie to ma?o ?apie :P Oczywi?cie :piwo: poleci :D

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-12, 20:28


#404







Wiek: 27
Na forum: 4913 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
No powiedzmy, ?e to gotowiec, upewnij si? tylko czy grupy acl si? zgadzaj?:


Admin = aclGetGroup ( "Admin" )
Rcon = aclGetGroup ( "RCON" )

function jestRCONem(gracz)
        if not getPlayerAccount(gracz) then return false end
accName = getAccountName(getPlayerAccount(gracz))
        if not accName then return false end
if isObjectInACLGroup ("user."..accName, Rcon ) then return true end
end


function jestADMINem(gracz)
if not getPlayerAccount(gracz) then return false end
accName = getAccountName(getPlayerAccount(gracz))
if not accName then return false end
if isObjectInACLGroup ("user."..accName, Admin ) then return true end
end


addCommandHandler("admins", function(gracz,cmd)
    admini = {}
    rconi = {}
            for k,v in ipairs(getElementsByType("player")) do
                if jestRCONem(v) then
                    table.insert(rconi, getPlayerName(v))
                elseif jestADMINem(v) then
                    table.insert(admini, getPlayerName(v))
                end
             end
    for i=0,10 do
    outputChatBox(" ", gracz)
    end
    outputChatBox("Dost?pni RCON'i:", gracz)
        if #rconi > 0 then
            outputChatBox(table.concat(rconi, ", "), gracz)
        else
            outputChatBox("Brak", gracz)
        end
    outputChatBox(" ", gracz)
    outputChatBox("Dost?pni Admini:", gracz)
        if #admini > 0 then
            outputChatBox(table.concat(admini, ", "), gracz)
        else
            outputChatBox("Brak", gracz)
        end
    
end
)


Strona serwera oczywi?cie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-12, 20:29


Axmell

E-Commerce






Wiek: 24
Na forum: 3951 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Dzi?ki, leci obiecane :piwo:

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: on-line
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » ON-LINE 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