Wysłany: 2017-11-14, 22:24
EvilXmik
Wiek: 28 Na forum: 3620 dni Posty: 148
Nick w MP: EvilXmik
Piwa : 399
Tak jak w temacie
B??d wyskakuje mi w 11 linijce
https://imgur.com/a/LhU6v
Kod:
addCommandHandler ( "admins", function ( plr, cmd )
Root = {}
Administrator = {}
Moderator = {}
for _,v in ipairs ( getElementsByType ( "player" ) ) do
if getElementData(plr, "duty") == 3 then
nick = "#ffff00Root#ffffff| "..getPlayerName ( v )..""
table.insert ( Root, nick )
end
end
outputChatBox ( "RCONi: ", plr, 128,0,0 )
outputChatBox ( " ", plr, 255, 255, 0 )
if #Root > 0 then
c = table.concat ( Root, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak", plr )
end
for _,v in ipairs ( getElementsByType ( "player" ) ) do
if getElementData(plr, "duty") == 2 then
nick = "#ff9900Administrator#ffffff| "..getPlayerName ( v )..""
table.insert ( Administrator, nick )
end
end
outputChatBox ( "#ff9900Administratorzy: ", plr, 255,0,0, true )
outputChatBox ( " ", plr, 0, 255, 255, true )
if #Administrator > 0 then
c = table.concat ( Administrator, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak", plr )
end
for _,v in ipairs ( getElementsByType ( "player" ) ) do
if getElementData(plr, "duty") == 1 then
nick = "#0EC711Moderator#ffffff:"..getPlayerName ( v ).." "
table.insert ( Moderator, nick )
end
end
outputChatBox ( "#0EC711Moderatorzy: ", plr, 0, 255, 255, true )
outputChatBox ( " ", plr, 0, 255, 255, true )
if #Moderator > 0 then
c = table.concat ( Moderator, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak", plr )
end
end)
[ Dodano : 2017-11-14, 22:29 ]
Przepraszam pomyli?em si?
[ Dodano : 2017-11-14, 22:29 ]
Chodzi o ten skrypt
Kod:
addCommandHandler ( "admins", function ( plr, cmd )
admini = {}
support = {}
super = {}
for _,v in ipairs ( getElementsByType ( "player" ) ) do
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(v)), aclGetGroup ( "Admin" ) ) then
nick = "[#ffff00RCON#ffffff] "..getPlayerName ( v ).." ( "..getElementData ( v, "playerid" ).." )"
table.insert ( admini, nick )
end
end
outputChatBox ( "________", plr, 0, 255, 255, true )
outputChatBox ( "RCON-i :", plr, 255, 255, 0 )
--outputChatBox ( " ", plr, 255, 255, 0 )
if #admini > 0 then
c = table.concat ( admini, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak administracji online", plr )
end
for _,v in ipairs ( getElementsByType ( "player" ) ) do
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(v)), aclGetGroup ( "Support" ) ) then
nick = "[#ff9900Support#ffffff] "..getPlayerName ( v ).." ( "..getElementData ( v, "playerid" ).." )"
table.insert ( support, nick )
end
end
outputChatBox ( "________", plr, 0, 255, 255, true )
outputChatBox ( "#ff9900Support :", plr, 0, 255, 255, true )
--outputChatBox ( " ", plr, 0, 255, 255, true )
if #support > 0 then
c = table.concat ( support, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak support online", plr )
end
for _,v in ipairs ( getElementsByType ( "player" ) ) do
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(v)), aclGetGroup ( "SSupport" ) ) then
nick = "[#0EC711Super Support#ffffff] "..getPlayerName ( v ).." ( "..getElementData ( v, "playerid" ).." )"
table.insert ( super, nick )
end
end
outputChatBox ( "________", plr, 0, 255, 255, true )
outputChatBox ( "#0EC711Super Support :", plr, 0, 255, 255, true )
--outputChatBox ( " ", plr, 0, 255, 255, true )
if #super > 0 then
c = table.concat ( super, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak Super Support online", plr )
end
end)
Wysłany: 2017-11-14, 22:31
Pevo
Jabłko
Wiek: 23 Na forum: 3590 dni Posty: 356
Nick w MP: Pevo
Piwa : 1571
Mo?e powiesz, kt?ra to 11. linijka? B?dzie szybciej.
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Wysłany: 2017-11-14, 22:36
EvilXmik
Wiek: 28 Na forum: 3620 dni Posty: 148
Nick w MP: EvilXmik
Piwa : 399
nick = "[#ffff00RCON#ffffff] "..getPlayerName ( v ).." ( "..getElementData ( v, "playerid" ).." )"
Wysłany: 2017-11-14, 22:47
Pevo
Jabłko
Wiek: 23 Na forum: 3590 dni Posty: 356
Nick w MP: Pevo
Piwa : 1571
To napewno ten skrypt? Na oko, to tu jest wszystko dobrze...
[ Dodano : 2017-11-14, 22:48 ]
I tego si? nie robi p?tl?, po prostu instrukcj? warunkow?. Np. if rcon then co?tam elseif admin then co?tam elseif support then co?tam end
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Wysłany: 2017-11-14, 22:53
EvilXmik
Wiek: 28 Na forum: 3620 dni Posty: 148
Nick w MP: EvilXmik
Piwa : 399
Wysłany: 2017-11-14, 23:04
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
przemek1835 , jak ty chcesz wzi?? ifem wszystkich graczy?
Podpis
"amited" napisał/a :
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Wysłany: 2017-11-14, 23:06
EvilXmik
Wiek: 28 Na forum: 3620 dni Posty: 148
Nick w MP: EvilXmik
Piwa : 399
nie tylko pod ACL ?eby by?o
[ Dodano : 2017-11-14, 23:06 ]
a skrypt nie jest m?j
tak na marginesie
Wysłany: 2017-11-14, 23:07
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
EvilXmik , nie ma nic po tym boolean value?
Podpis
"amited" napisał/a :
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Wysłany: 2017-11-14, 23:11
Pevo
Jabłko
Wiek: 23 Na forum: 3590 dni Posty: 356
Nick w MP: Pevo
Piwa : 1571
"amited" napisał/a :przemek1835 , jak ty chcesz wzi?? ifem wszystkich graczy?
heh, ?le powiedzia?em. Jestem troch? zaspany i zauwa?y?em 2 p?tle.
addCommandHandler ( "admins" ,function( plr , cmd )
rcon ={}
admin ={}
support ={}
for i , v in pairs ( getElementsBytType ( "player" )) do
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "rcon" )) then
table . insert ( rcon , getPlayerName ( v ))
elseif isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "admin" )) then
table . insert ( admin , getPlayerName ( v ))
elseif isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "support" )) then
table . insert ( support , getPlayerName ( v ))
end
end
end )
i dalej wystarczy da? output do rcon admin i support.
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Wysłany: 2017-11-14, 23:22
EvilXmik
Wiek: 28 Na forum: 3620 dni Posty: 148
Nick w MP: EvilXmik
Piwa : 399
emm jako? mi to nie wychodzi
Wysłany: 2017-11-14, 23:25
Pevo
Jabłko
Wiek: 23 Na forum: 3590 dni Posty: 356
Nick w MP: Pevo
Piwa : 1571
"EvilXmik" napisał/a :emm jako? mi to nie wychodzi
Jak to nie? Na pewno masz serwer pod ACL i czy robisz po stronie serwera?
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Wysłany: 2017-11-14, 23:29
EvilXmik
Wiek: 28 Na forum: 3620 dni Posty: 148
Nick w MP: EvilXmik
Piwa : 399
Kod: addCommandHandler("admins",function(plr,cmd)
rcon={}
admin={}
support={}
for i,v in pairs(getElementsBytType("player")) do
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(plr)),aclGetGroup("rcon")) then
table.insert(rcon,getPlayerName(v))
outputChatBox ( "________", plr, 0, 255, 255, true )
outputChatBox ( "RCON-i :", plr, 255, 255, 0 )
--outputChatBox ( " ", plr, 255, 255, 0 )
if #rcon > 0 then
c = table.concat ( rcon, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak administracji online", plr )
end
elseif isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(plr)),aclGetGroup("admin")) then
table.insert(admin,getPlayerName(v))
outputChatBox ( "________", plr, 0, 255, 255, true )
outputChatBox ( "#ff9900Support :", plr, 0, 255, 255, true )
--outputChatBox ( " ", plr, 0, 255, 255, true )
if #admin > 0 then
c = table.concat ( admin, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak admin online", plr )
elseif isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(plr)),aclGetGroup("support")) then
table.insert(support,getPlayerName(v))
outputChatBox ( "________", plr, 0, 255, 255, true )
outputChatBox ( "#0EC711Super Support :", plr, 0, 255, 255, true )
--outputChatBox ( " ", plr, 0, 255, 255, true )
if #support > 0 then
c = table.concat ( support, ", " )
outputChatBox ( c, plr, 255, 255, 255, true )
else
outputChatBox ( "Brak support Support online", plr )
end
end
end)
emm chyba zwali?em serio te? ju? dzi? nie ogarniam zaspany :C
Wysłany: 2017-11-15, 18:23
Pevo
Jabłko
Wiek: 23 Na forum: 3590 dni Posty: 356
Nick w MP: Pevo
Piwa : 1571
addCommandHandler ( "admins" ,function( plr , cmd )
rcon ={}
admin ={}
support ={}
for i , v in pairs ( getElementsBytType ( "player" )) do
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "rcon" )) then
table . insert ( rcon , getPlayerName ( v ))
elseif isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "admin" )) then
table . insert ( admin , getPlayerName ( v ))
elseif isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "support" )) then
table . insert ( support , getPlayerName ( v ))
end
end
outputChatBox ( "Rconi:" , plr )
for i , v in pairs ( rcon ) do
outputChatBox ( " " .. v , true )
end
end )
i tak dalej, zrobi?em, ?e pokazuje samych rcon?w. Na tej podstawie mo?esz zrobi? pokazywanie admin?w i support?w.
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Wysłany: 2017-11-15, 20:59
EvilXmik
Wiek: 28 Na forum: 3620 dni Posty: 148
Nick w MP: EvilXmik
Piwa : 399
Czyli co ma to tak wygl?da? ?
Kod:
addCommandHandler("admins",function(plr,cmd)
rcon={}
admin={}
support={}
for i,v in pairs(getElementsBytType("player")) do
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(plr)),aclGetGroup("rcon")) then
table.insert(rcon,getPlayerName(v))
elseif isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(plr)),aclGetGroup("admin")) then
table.insert(admin,getPlayerName(v))
elseif isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(plr)),aclGetGroup("support")) then
table.insert(support,getPlayerName(v))
end
end
outputChatBox("rcon:",plr)
for i,v in pairs(admin) do
outputChatBox(" "..v,true)
end
outputChatBox("admin:",plr)
for i,v in pairs(rcon) do
outputChatBox(" "..v,true)
end
outputChatBox("support:",plr)
for i,v in pairs(rcon) do
outputChatBox(" "..v,true)
end
end)
Wysłany: 2017-11-15, 21:05
Pevo
Jabłko
Wiek: 23 Na forum: 3590 dni Posty: 356
Nick w MP: Pevo
Piwa : 1571
Tak, tylko sp?jrz, ?e pomiesza?e? to, gdzie ma by? rcon, admin i support
Więcej szczegółów
Wystawiono 1 piw(a):EvilXmik
Tagi: dodaje :: kogoś :: kogo :: nie :: powinno
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: