PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : kann das jemand ?



Tom Tom
23.12.2008, 21:08
Moin,

ich habe mir was gedacht vor lauter langeweile. Folgendes: nach 24h wird man in ulx auf respected gesetzt.

Die Theorie:

Utime zeichnet ja die zeit wie lange du aufm server bist auf , das script oder lua nimmt die zeit und für denn ein befehlt aus (ulx adduser name respected) das dich respected setzt

machbar:?:

Edit by Pac:
LOL, ROFL, etc. sind nicht im Titel gewünscht! ...

RP-01
23.12.2008, 22:34
Moin,

ich habe mir was gedacht vor lauter langeweile. Folgendes: nach 24h wird man in ulx auf respected gesetzt.

Die Theorie:

Utime zeichnet ja die zeit wie lange du aufm server bist auf , das script oder lua nimmt die zeit und für denn ein befehlt aus (ulx adduser name respected) das dich respected setzt

machbar:?:

Also willst du jetz das man diese Funktion macht oder was genau?

Mfg,
RP-01

Tom Tom
23.12.2008, 22:55
Also willst du jetz das man diese Funktion macht oder was genau?

Mfg,
RP-01

das einer dieser script schreib das ein nach 24h auf respected in ulx befödert

RP-01
23.12.2008, 23:18
frag da mal Dr.Tight...wir haben das aufm GMod.de | Server GEHABT (damn..)!

Mfg,
RP-01 (Fröhliche Weihnachten!)

DrTight
24.12.2008, 00:12
So habs nun endlich fertig bekommen.
function Autorespected()
for k,v in pairs(player.GetAll()) do
if v and v:IsValid() then
if ULib.ucl.authed[v] and table.Count(ULib.ucl.authed[v].groups) == 1 and table.HasValue(ULib.ucl.authed[v].groups,"user") then
if v:GetUTimeTotalTime() > (6*3600) then
ULib.ucl.addUser( v:Nick(), "steamid", v:SteamID(), {"respected"}, {allow={}, deny={}} , _, _, true )
end
end
end
end
end

timer.Create("Autorespectedtimer",30,0,Autorespected)


Und mit Assmod
function Autorespected()
for k,v in pairs(player.GetAll()) do
if v and v:IsValid() then
local time = v:GetUTimeTotalTime()
if time > (6*3600) then
if ULib.ucl.authed[v] and table.Count(ULib.ucl.authed[v].groups) == 1 and table.HasValue(ULib.ucl.authed[v].groups,"user") then
ULib.ucl.addUser( v:Nick(), "steamid", v:SteamID(), {"respected"}, {allow={}, deny={}} , _, _, true )
end
end
if time > (4*3600) then
if !v:IsRespected() then
game.ConsoleCommand("ass_PromotePlayer "..v:UserID().." 4\n")
end
end
end
end
end

timer.Create("Autorespectedtimer",30,0,Autorespected)



So war etwas hartnäckig, da ich mit Ulib zu Kämpfen hatte.
Nun werden alle User auf die das zutrifft Respected gesetz.

Mfg Tight

Tom Tom
24.12.2008, 10:50
So habs nun endlich fertig bekommen.
function Autorespected()
for k,v in pairs(player.GetAll()) do
if v and v:IsValid() then
if !ULib.ucl.authed[v] or (ULib.ucl.authed[v] and table.HasValue(ULib.ucl.authed[v].groups,"user") ) and !v:IsUserGroup("respected") then
if v:GetUTimeTotalTime() > (6*3600) then
ULib.ucl.addUser( v:Nick(), "steamid", v:SteamID(), {"respected"}, {allow={}, deny={}} , _, _, true )
end
end
end
end
end

timer.Create("Autorespectedtimer",30,0,Autorespected)


Und mit Assmod
function Autorespected()
for k,v in pairs(player.GetAll()) do
if v and v:IsValid() then
local time = v:GetUTimeTotalTime()
if time > (6*3600) then
if !ULib.ucl.authed[v] or (ULib.ucl.authed[v] and table.HasValue(ULib.ucl.authed[v].groups,"user") ) and !v:IsUserGroup("respected") then
ULib.ucl.addUser( v:Nick(), "steamid", v:SteamID(), {"respected"}, {allow={}, deny={}} , _, _, true )
end
end
if time > (4*3600) then
if !v:HasLevel(4) then
game.ConsoleCommand("ass_PromotePlayer "..v:UserID().." 4\n")
end
end
end
end
end

timer.Create("Autorespectedtimer",30,0,Autorespected)



So war etwas hartnäckig, da ich mit Ulib zu Kämpfen hatte.
Nun werden alle User auf die das zutrifft Respected gesetz.

Mfg Tight

gute arbeit.. :gmod:

DrTight
24.12.2008, 15:43
Habs nochmal abgeändert. Bitte übernehmen. Beim alten Code überschreibt er alle User auf Respected. Auch Admins. Nun sollte alles gehen.

Mfg Tight