Wysłany: 2016-02-12, 19:55
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
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.
Wysłany: 2016-02-12, 20:06
#404
Wiek: 26 Na forum: 4772 dni Posty: 1438
Piwa : 2512
Tam masz taki przyk?ad, wystarczy przerobi?.
Wysłany: 2016-02-12, 20:09
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
A m?g?by? troszku pot?umaczy?? Bo na razie to ma?o ?apie Oczywi?cie poleci
Wysłany: 2016-02-12, 20:28
#404
Wiek: 26 Na forum: 4772 dni Posty: 1438
Piwa : 2512
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.
Wysłany: 2016-02-12, 20:29
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
Dzi?ki, leci obiecane
Tagi: on-line
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: