Ulysses Stuff > General Chat & Help and Support
how to get an array[playerid] = access ?
Andbusy:
moin moin
--- Code: ---
function ecsulx.teams.importUlxUser (loop)
local count = 0
if _file.Exists ("lua/ULib/init.lua") then -- Import from ULib
if ULib ~= nil then
splitArgs = ULib.splitArgs
for steamid in ULib.mainUcl["steamids"] do
if (ecsulx.teams.config.members[steamid] == nil) then
ecsulx.teams.config.members[steamid] = ULib.mainUcl["steamids"][steamid]["access_flags"]
count = count + 1
end
end
elseif loop == nil then
--_Msg ("xxx-ecsulx [ULib] Initiating ...\n")
_OpenScript ("lua/ULib/init.lua")
--_Msg ("xxx-ecsulx [ULib] ... done\n")
count = ecsulx.teams.importUlxUser (true)
end
elseif _file.Exists ("lua/init/ulx_init.lua") then -- Import from ULX
if gUsers ~= nil then
for k, v in gUsers do
-- temp = string.upper (string.gsub (k, " ", ""))
temp = string.upper (k)
if (ecsulx.teams.config.members[temp] == nil) then
ecsulx.teams.config.members[temp] = v
count = count + 1
end
end
elseif loop == nil then
--_Msg ("xxx-ecsulx [ULX] Initiating ...\n")
_OpenScript ("lua/init/ulx_init.lua")
--_Msg ("xxx-ecsulx [ULX] ... done\n")
count = ecsulx.teams.importUlxUser (true)
end
else
_Msg ("// ULX -> ECS user import // - ecsulx Can not find ULib / ULX.\n")
end
return count
end
--- End code ---
thats the funktion i use now. the name says it (to import users to ECS)
i call it in the orginal funktion like
--- Code: --- _Msg ("// ULX -> ECS user import // - ".. ecsulx.teams.importUlxUser() .. " user imported\n");
--- End code ---
now all ULX admins whis the flack (in ECS config) are Admins in ECS =)
have fun with it ;)
n8
fackelkind:
--- Quote from: Andbusy on October 16, 2006, 08:45:34 AM ---moin moin
--- Code: ---
function ecsulx.teams.importUlxUser (loop)
local count = 0
if _file.Exists ("lua/ULib/init.lua") then -- Import from ULib
if ULib ~= nil then
splitArgs = ULib.splitArgs
for steamid in ULib.mainUcl["steamids"] do
if (ecsulx.teams.config.members[steamid] == nil) then
ecsulx.teams.config.members[steamid] = ULib.mainUcl["steamids"][steamid]["access_flags"]
count = count + 1
end
end
elseif loop == nil then
--_Msg ("xxx-ecsulx [ULib] Initiating ...\n")
_OpenScript ("lua/ULib/init.lua")
--_Msg ("xxx-ecsulx [ULib] ... done\n")
count = ecsulx.teams.importUlxUser (true)
end
elseif _file.Exists ("lua/init/ulx_init.lua") then -- Import from ULX
if gUsers ~= nil then
for k, v in gUsers do
-- temp = string.upper (string.gsub (k, " ", ""))
temp = string.upper (k)
if (ecsulx.teams.config.members[temp] == nil) then
ecsulx.teams.config.members[temp] = v
count = count + 1
end
end
elseif loop == nil then
--_Msg ("xxx-ecsulx [ULX] Initiating ...\n")
_OpenScript ("lua/init/ulx_init.lua")
--_Msg ("xxx-ecsulx [ULX] ... done\n")
count = ecsulx.teams.importUlxUser (true)
end
else
_Msg ("// ULX -> ECS user import // - ecsulx Can not find ULib / ULX.\n")
end
return count
end
--- End code ---
thats the funktion i use now. the name says it (to import users to ECS)
i call it in the orginal funktion like
--- Code: --- _Msg ("// ULX -> ECS user import // - ".. ecsulx.teams.importUlxUser() .. " user imported\n");
--- End code ---
now all ULX admins whis the flack (in ECS config) are Admins in ECS =)
have fun with it ;)
n8
--- End quote ---
This function looks very familiar to me :D
Golden-Death:
--- Quote from: Andbusy on October 16, 2006, 08:45:34 AM ---....funktion.....
....funktion....
--- End quote ---
Thats funky.
Hatred:
Can you explain how you put this exactly into ecs, please.
Navigation
[0] Message Index
[*] Previous page
Go to full version