Wita,posiadam skrypt na duty admin z pystories 3.0, i robie kolejną range Testowy Support,lecz jest problem że mnie nie ma pod /admins
KOD:
s_utilty
[lua]function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end
function getAdmin(plr,level)
if getElementData(plr,"Ryjek") then return true end
if level then
local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=? AND level=?", getPlayerSerial(plr), level)
if result and #result > 0 then
return true
else
return false
end
else
local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
return true
else
return false
end
end
end
function cmd_admins(plr)
local moderatorzy={}
local admini={}
local rconi={}
local owner={}
for i,v in ipairs(getElementsByType("player")) do
local adminer = getElementData(v,"player:id")
if not getElementData(v,"Ryjek") then
--if not getElementData(v, "p:inv") then
if (getAdmin(v,...
Witam, dzisiaj chciałbym wam zaprezentować skrypt, który umożliwiał będzie nam sprawdzenie aktualnej administracji online na serwerze za pomocą komendy /admins.
Skrypt jest bardzo prosty, więc nie chcę za niego piwka .
Link: http://www93.zippyshare.com/v/OyDJMpCD/file.html
Dodam, że aby skrypt poprawnie działał, trzeba być w ACL, ponieważ bazuję na rangach z acl'a. Mam nadzieję, że komuś ten skrypt w jakimś stopniu się przyda, bez zbędnego gadania życzę miłego użytkowania .
PS: Jeśli komuś coś nie działa lub nie wie jak to wszystko pozmieniać itd, to piszcie, a się jak najszybciej odezwę
SS: https://imgur.com/a/oLPnq
Siema mam problem z /admins
Jak wpisze sie tą komende to pokazuje:
RCON:
Administratorzy:
Supporterzy:
I jak jestem w ACL w tym RCON to nie pokazuje mnie tam.
Bo wydaje mi się że na XyzzyRP to są połączone kilka skryptów i dam tu kilka takich rzeczy i doradzicie co robic żeby działało?
lss-admin/base.lua
[lua]
function isRCON(player)
local accName = getAccountName ( getPlayerAccount ( player ) )
if accName and isObjectInACLGroup ("user."..accName, aclGetGroup ( "RCON" ) ) then
return true
end
return false
end
function getAdminName(player)
local accName = getAccountName ( getPlayerAccount ( player ) )
if accName and isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" )) and not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Administrator" )) then
return "Zdalny"
else
return (getElementData(player,"auth:login") or getPlayerName(player))
end
end
function isSupport(player)
local accName = getAccountName ( getPlayerAccount ( player ) )
if accName and isObjectInACLGroup ("user."..accName, aclGetGroup ( "Support" ) ) then
return true
end
return false
end
function msgToSupport(text)
for i,v in ipairs(getElementsByType("player")) do
if (getElementData(v,"auth:support")) then
outputChatBox(text, v)
end
end
end
Siema mam problem z /admins
Jak wpisze sie tą komende to pokazuje:
RCON:
Administratorzy:
Supporterzy:
I jak jestem w ACL w tym RCON to nie pokazuje mnie tam.
Bo wydaje mi się że na XyzzyRP to są połączone kilka skryptów i dam tu kilka takich rzeczy i doradzicie co robic żeby działało?
lss-admin/base.lua
[lua]
function isRCON(player)
local accName = getAccountName ( getPlayerAccount ( player ) )
if accName and isObjectInACLGroup ("user."..accName, aclGetGroup ( "RCON" ) ) then
return true
end
return false
end
function getAdminName(player)
local accName = getAccountName ( getPlayerAccount ( player ) )
if accName and isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" )) and not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Administrator" )) then
return "Zdalny"
else
return (getElementData(player,"auth:login") or getPlayerName(player))
end
end
function isSupport(player)
local accName = getAccountName ( getPlayerAccount ( player ) )
if accName and isObjectInACLGroup ("user."..accName, aclGetGroup ( "Support" ) ) then
return true
end
return false
end
function msgToSupport(text)
for i,v in ipairs(getElementsByType("player")) do
if (getElementData(v,"auth:support")) then
outputChatBox(text, v)
end
end
end
Cześć, głowie się nad komendą admins.
A dokładniej nad tym, że jeśli ktoś ma elementdate player:dutyrcon to wyświetla jego nick w RCONach, mógłbym otrzymać jakiś przykład jak to zrobić? Z góry dziękuje
Witajcie,
To znowu ja i nadchodzę z kolejnymi problemami.
Otóż chodzi mi oto że na mapie jak i na radarze nie widać graczy,jak to ustawić?
Do tego jak dodać nowe rangi do acl by wyświetlały się pod /admins
(dodałem tam tylko moderatora]
[lua]Admin = aclGetGroup ( "Admin" )
Rcon = aclGetGroup ( "RCON" )
Moderator = aclGetGroup ( "Moderator" )
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
function jestModem(gracz)
if not getPlayerAccount(gracz) then return false end
accName = getAccountName(getPlayerAccount(gracz))
if not accName then return false end
if isObjectInACLGroup ("user."..accName, Moderator ) then return true end
end
addCommandHandler("admins", function(gracz,cmd)
admini = {}
rconi = {}
moderatorzy = {}
for k,v in ipairs(getElementsByType("player")) do
if jestRCONem(v) then
table.insert(rconi, getPlayerName(v))
elseif jestModem (v) then
table.insert(moderatorzy, getPlayerName(v))
elseif jestADMINem(v) then
table.insert(admini, getPla...
1 ----- Witam, mam pytania jednakże zrobiłem sobie skrypt na spawnowanie pojazdów lecz, chcę aby np jeżeli siedzę w pojeździe i wpisuje /veh.create to zamieniałby się pojazd na ten nowy a nie tworzył nowy na moim pojeździe.
Na listę GUI. Tak jak np. na net4game, ls-rp itp. Proszę o pomoc, gdyż chce się tego nauczyć. Najlepiej prosiłbym o podesłanie jakiegoś kodu, z którego wszystkiego bym się nauczył.