Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - MrPresident

Pages: 1 ... 4 5 [6]
76
I am thinking about restricting tools to groups on my server..

I searched for it and it seems like a LOT of people have been asking for this.. so I wont ask for it.. well okay.. I kind of will.. but mainly..

I was just curious.. you guys have been saying stuff about implimenting the ulx toolallowgroup and tooldenygroup for a while but it hasn't been done.. is it harder than you expected? or just something that has been overlooked in lieu of more important matters  ;D ;D ;D ;)

Also.. if anyone has working code that will do this.. I'd love you forever...


also.. If I do... 'ulx tooldeny' does the tool it denies only stay denied for the session? or Does it stay denied forever until you allow it again? Also.. same question with the 'ulx tooldenyuser <player>' does this write this access to the user.txt file? or just something until they rejoin the server? I wonder, because if I cant find a way to allow and deny by group, I'll just deny a tool globally and allow it to individual users. I'm sure I could test this for myself.. but it would require a restart.. and I'm lazy... and it's not important so just if anyone knows.. an answer would be appreciated.. =) thanks guys.

77
Off-Topic / Game Modes
« on: September 20, 2007, 06:26:48 PM »
First off.. Id like to apologize if this is the wrong forum for this question. I asked on facepunch but after 12 hours, I get no reply so Im hoping someone here might have some more manners and knowledge.

I am running a second dedicated server and I would like to host a game mode. Spacebuild to be specific. What do I need to do to my server configs to ensure that the server boots in spacebuild every time it loads? (ie. crash reload, manual reset)

also.. to keep this pseudo on topic... ULX works with the spacebuild game mode correct?

thanks.. please help if you can.. or point me in the right direction at least =)

-Mr.President


EDIT: Got it.. perimeter in the command line =)

78
General Chat & Help and Support / new user.lua
« on: September 19, 2007, 11:46:17 AM »
None of these commands are loading..

ulx adduser
ulx userallow
ulx userdeny

everything that was split into the new lua file is not loading for me.. I can try to restart, maybe that'll help.

ideas?


Code: [Select]
ULib.ucl.groups (#=6):
superadmin:
deny:
allow:
1 = ulx rcon
2 = ulx luarun
3 = ulx ent
4 = ulx cexec
5 = ulx adduser
6 = ulx removeuser
7 = ulx userallow
8 = ulx userdeny
9 = ulx hiddenecho
10 = overcomeimmunity
inherit_from:
1 = admin
admin:
deny:
allow:
1 = ulib_passtime
2 = ulib_passtimeout
3 = ulx slap
4 = ulx whip
5 = ulx slay
6 = ulx sslay
7 = ulx ignite
8 = ulx playsound
9 = ulx freeze
10 = ulx unfreeze
11 = ulx god
12 = ulx ungod
13 = ulx noclip
14 = ulx hp
15 = ulx cloak
16 = ulx uncloak
17 = ulx blind
18 = ulx unblind
19 = ulx jail
20 = ulx unjail
21 = ulx bring
22 = ulx goto
23 = ulx send
24 = ulx teleport
25 = ulx ghost
26 = ulx unghost
27 = ulx ragdoll
28 = ulx unragdoll
29 = ulx vote
30 = ulx gimp
31 = ulx mute
32 = ulx ungimp
33 = ulx unmute
34 = ulx maul
35 = ulx gag
36 = ulx ungag
37 = ulx rslotsmode
38 = ulx rslots
39 = ulx rslotsvisible
40 = reservedslots
41 = ulx tooldeny
42 = ulx toolallow
43 = ulx tooldenyuser
44 = ulx toolallowuser
45 = ulx tsay
46 = ulx csay
47 = ulx exec
48 = ulx map
49 = ulx kick
50 = ulx ban
51 = ulx spectate
52 = ulx adminmenu
53 = ulx clientmenu
54 = ulx mapsmenu
55 = ulx votemap2
56 = ulx votekick
57 = ulx voteban
58 = ulx mingekick
59 = ulx welcomemessage
60 = ulx showmotd
61 = ulx chattime
62 = ulx veto
63 = ulx banid
64 = ulx spawnecho
65 = ulx banmenu
66 = ulx reservedslots
67 = ulx tooldenyoverride
68 = ulx unban
inherit_from:
user:
deny:
allow:
1 = _pw
2 = ulx
3 = ulx help
4 = ulx who
5 = ulx psay
6 = ulx asay
7 = ulx thetime
8 = ulx menu
9 = ulx motd
10 = ulx_valueupdate
11 = ulx votemap
12 = ulx_cvar
13 = ulx_getgamemodes
14 = ulx_getbans
inherit_from:
member:
deny:
allow:
1 = _pw
2 = ulx
3 = ulx help
4 = ulx who
5 = ulx psay
6 = ulx asay
7 = ulx thetime
8 = ulx menu
9 = ulx motd
10 = ulx_valueupdate
11 = ulx votemap
12 = ulx votekick
inherit_from:
operator:
deny:
allow:
1 = _pw
2 = ulx
3 = ulx help
4 = ulx who
5 = ulx psay
6 = ulx asay
7 = ulx thetime
8 = ulx menu
9 = ulx motd
10 = ulx_valueupdate
11 = ulx votemap
12 = ulx votekick
13 = ulx goto
14 = ulx god
15 = ulx ungod
16 = ulx spectate
17 = ulx cloak
18 = ulx uncloak
19 = ulx vote
20 = ulx hp
21 = ulx teleport
22 = ulx clientmenu
inherit_from:
none:
deny:
allow:
1 = ulx addgimpsay
2 = ulx logecho
3 = ulx logfile
4 = ulx logevents
5 = ulx logchat
6 = ulx logspawns
7 = ulx logspawnsecho
8 = ulx logdir
9 = ulx addadvert
10 = ulx addcsayadvert
11 = ulx addforceddownload
12 = ulx votemapenabled
13 = ulx votemapmintime
14 = ulx votemapwaittime
15 = ulx votemapsuccessratio
16 = ulx votemapminvotes
17 = ulx votemapvetotime
18 = ulx votemapmapmode
19 = ulx votemapaddmap
20 = ulx debuginfo
21 = ulx voteecho
22 = ulx votemap2successratio
23 = ulx votemap2minvotes
24 = ulx votekicksuccessratio
25 = ulx votekickminvotes
26 = ulx votebansuccessratio
27 = ulx votebanminvotes
inherit_from:

okay.. notice how the commands loaded for this output.. however...

Code: [Select]
14:54:23 ulx adduser
14:54:23 Invalid command entered. If you need help, please type "ulx help" in your console.
is what Im getting from the console.


79
General Chat & Help and Support / ulx physgunplayer
« on: September 18, 2007, 03:41:13 PM »
First off I would like to say that I update ULX on my server 2 or 3 times a week and I grunt through all the redoing user files for new formats.. which I LOVE THE NEW FORMAT.. thanks soo much.. finally fixed the problem I was having with it saving weird in notepad =)

So if I'm reporting things all the time, it's simply because I want to help with the beta testing phase and make ULX better.. anyways..

here is my problem

Admins with the ulx physgunplayer access can not move players with their physgun. Worked fine until I installed the latest rev. of the SVN. Did you remove that? or maybe it's broken?

It's not a red alert kind of bug.. just something I noticed =)

80
This LUA was written for my server by a community member to add a few things I suggested, however, when it is run it breaks all of my chat based ULX commands.

anyone know what in this code has a problem with ULX and can you suggest a way to fix it to allow both to run together? I'm thinking it might be the function BTS.PlayerSay( ply, text, public ) or something.. The code used to only show the time played on the server until he added support for the point system which is when the code started conflicting with ULX.

Code: [Select]
// By: ^>:B!G-A:<^

BTS = {}
BTS.CheckedFile = false
BTS.Panel = nil
SetGlobalInt( "BTS_ServerTime", 0 )
BTS.JoinTimes = {}
BTS.LastSave = 0
BTS.LeaveSave = false

AddCSLuaFile( "autorun/big_timespent.lua" )

if SERVER then
function BTS.PlayerLoad( player )
if !BTS.CheckedFile then
BTS.CheckFile()
BTS.CheckedFile = true
end

local times = {}
local myinfo = nil
if file.Exists( "timespent_players.txt" ) then
times = util.KeyValuesToTable(file.Read( "timespent_players.txt" ))
end
player:SendLua("BTS.SendGUI()")
for i, v in pairs(times) do
if string.upper( i ) == player:SteamID( ) then
myinfo = v
break
end
end
if myinfo != nil then
BTS.JoinTimes[player:SteamID()] = {}
BTS.JoinTimes[player:SteamID()].time = GetGlobalInt( "BTS_ServerTime" ) - myinfo.time
BTS.JoinTimes[player:SteamID()].points = myinfo.points
else
BTS.JoinTimes[player:SteamID()] = {}
BTS.JoinTimes[player:SteamID()].time = GetGlobalInt( "BTS_ServerTime" )
BTS.JoinTimes[player:SteamID()].points = 0
end
player:SetNetworkedInt( "BTS_JoinTime", BTS.JoinTimes[player:SteamID()].time )
player:SetNetworkedInt( "BTS_Points", BTS.JoinTimes[player:SteamID()].points )
end
hook.Add( "PlayerInitialSpawn", "BTS_PlayerLoad", BTS.PlayerLoad );

function BTS.PlayerLeave( player )
BTS.LeaveSave = true
BTS.Save()
end
hook.Add( "PlayerDisconnected", "BTS_PlayerLeave", BTS.PlayerLeave );

function BTS.PlayerSpawn( player )
player:SetNetworkedInt( "BTS_JoinTime", BTS.JoinTimes[player:SteamID()].time )
player:SetNetworkedInt( "BTS_Points", BTS.JoinTimes[player:SteamID()].points )
end
hook.Add( "PlayerSpawn", "BTS_PlayerSpawn", BTS.PlayerSpawn );

function BTS.Timer()
local t = GetGlobalInt( "BTS_ServerTime" )
SetGlobalInt( "BTS_ServerTime", t + 1 )
end
timer.Create( "BTS_Timer", 1, 0, BTS.Timer )

function BTS.CheckFile()
local times = {}
local newtimes = {}
if file.Exists( "timespent_players.txt" ) then
times = util.KeyValuesToTable(file.Read( "timespent_players.txt" ))
else
return
end

for i, v in pairs(times) do
if type(v) == "number" then
newtimes[i] = {}
newtimes[i].time = v
newtimes[i].points = 0
else
newtimes[i] = {}
newtimes[i].time = v.time
newtimes[i].points = v.points
end
end

if file.Exists( "timespent_players.txt" ) then
file.Delete( "timespent_players.txt" )
end
file.Write( "timespent_players.txt", util.TableToKeyValues(newtimes) )
end

function BTS.Save()
if !BTS.CheckedFile then
BTS.CheckFile()
BTS.CheckedFile = true
end

local players = player.GetAll( )
local times = {}
local added = ""
if file.Exists( "timespent_players.txt" ) then
times = util.KeyValuesToTable(file.Read( "timespent_players.txt" ))
end

for i, v in pairs(times) do
local ply = nil
for e, k in ipairs(player.GetAll( )) do
if string.upper( i ) == k:SteamID( ) then
ply = k
break
end
end
if ply != nil then
if BTS.LeaveSave then
times[i].time = v.time + (GetGlobalInt( "BTS_ServerTime" ) - BTS.LastSave)
else
times[i].time = v.time + GetConVarNumber( "BTS_SaveFreq" )
end
times[i].points = ply:GetNetworkedInt( "BTS_Points" )
added = added .. i
end
end

for i, v in ipairs(player.GetAll( )) do
if string.find(added,v:SteamID( )) == nil then
times[v:SteamID( )] = {}
times[v:SteamID( )].time = GetGlobalInt("BTS_ServerTime")-v:GetNetworkedInt( "BTS_JoinTime" )
times[v:SteamID( )].points = v:GetNetworkedInt( "BTS_Points" )
end
end

if file.Exists( "timespent_players.txt" ) then
file.Delete( "timespent_players.txt" )
end
file.Write( "timespent_players.txt", util.TableToKeyValues(times) )

BTS.LastSave = GetGlobalInt( "BTS_ServerTime" )
if BTS.LeaveSave then
BTS.LeaveSave = false
end
end
timer.Create( "BTS_Save", 120, 0, BTS.Save )

function BTS.PlayerSay( ply, text, public )
if !ply:IsAdmin( ) and !ply:IsSuperAdmin( ) then return text end
local given = nil
local x = 0

local args = string.Explode( " ", text )
if table.getn(args) < 4 then return text end

if string.upper(args[1]..args[2]) == "/PPADD" then
x = 1
elseif string.upper(args[1]..args[2]) == "/PPREM" then
x = -1
else
return text
end
if x == 0 then return text end

if string.len(args[3]) < 3 then
ply:PrintMessage( HUD_PRINTTALK, "You must enter atleast 3 characters for a name!" ) 
return ""
end

for i, v in ipairs(player.GetAll( )) do
if string.find(string.upper(v:GetName()),string.upper(args[3])) != nil then
given = v
break
end
end
if given == nil then
ply:PrintMessage( HUD_PRINTTALK, "Player not found!" ) 
return ""
end

if BTS.JoinTimes[given:SteamID()] == nil or BTS.JoinTimes[given:SteamID()].points == nil then
ply:PrintMessage( HUD_PRINTTALK, "### There was an internal scripting variable error and the players data has been lost," ) 
ply:PrintMessage( HUD_PRINTTALK, "    have the player reconnect to reload his/her data." ) 
return ""
end

if x == 1 then
BTS.JoinTimes[given:SteamID()].points = BTS.JoinTimes[given:SteamID()].points + math.abs(tonumber(args[4]))
given:SetNetworkedInt( "BTS_Points", BTS.JoinTimes[given:SteamID()].points )
for i, v in ipairs(player.GetAll( )) do
v:PrintMessage( HUD_PRINTTALK, ply:GetName( ).." has given "..given:GetName( ).." "..math.abs(tonumber(args[4])).." Presidential Point(s)." ) 
end
else
BTS.JoinTimes[given:SteamID()].points = BTS.JoinTimes[given:SteamID()].points - math.abs(tonumber(args[4]))
given:SetNetworkedInt( "BTS_Points", BTS.JoinTimes[given:SteamID()].points )
for i, v in ipairs(player.GetAll( )) do
v:PrintMessage( HUD_PRINTTALK, ply:GetName( ).." has taken "..math.abs(tonumber(args[4])).." Presidential Point(s) from "..given:GetName( ) ) 
end
end
BTS.Save()

return ""
end
hook.Add( "PlayerSay", "BTS_PlayerSay", BTS.PlayerSay );
end

if CLIENT then
BTS.Scale = 0.50
BTS.Aim = nil
BTS.AimLock = -1

function BTS.ToYearsDaysHoursMinutesSeconds( i )
local input = i
local temp = 0
local output = ""

temp = math.floor(input / 31536000)
input = input - (temp * 31536000)
if temp < 10 then
output = output.."0"..tostring(temp)..":"
else
output = output..tostring(temp)..":"
end

temp = math.floor(input / 86400)
input = input - (temp * 86400)
if temp < 10 then
output = output.."0"..tostring(temp)..":"
else
output = output..tostring(temp)..":"
end

temp = math.floor(input / 3600)
input = input - (temp * 3600)
if temp < 10 then
output = output.."0"..tostring(temp)..":"
else
output = output..tostring(temp)..":"
end

temp = math.floor(input / 60)
input = input - (temp * 60)
if temp < 10 then
output = output.."0"..tostring(temp)..":"
else
output = output..tostring(temp)..":"
end

if input < 10 then
output = output.."0"..tostring(input)
else
output = output..tostring(input)
end

return output
end

function BTS.SendGUI()
BTS.Panel = vgui.Create( "Panel" )
BTS.Panel:SetName("vgui_timespent")
BTS.Panel:SetPos(ScrW()-170,10)
BTS.Panel:SetSize(160,84)

function BTS.Panel:Paint()
draw.RoundedBox( 8, 0, 0, self:GetWide(), self:GetTall()*BTS.Scale, Color(50,50,75,160) )
surface.SetFont( "Default" )
surface.SetTextColor( 255, 255, 255, 220 )
surface.SetTextPos( 10, 9 )
surface.DrawText( "Time Spent: " .. BTS.ToYearsDaysHoursMinutesSeconds(GetGlobalInt("BTS_ServerTime")-LocalPlayer( ):GetNetworkedInt( "BTS_JoinTime" )) )
surface.SetTextPos( 10, 21 )
surface.DrawText( "Points: " .. LocalPlayer( ):GetNetworkedInt( "BTS_Points" ) )
if ValidEntity( BTS.Aim ) then
if BTS.Scale > 0.50 then
draw.RoundedBox( 8, 3, 37, self:GetWide()-6, 44*((BTS.Scale-0.50)/0.50), Color(50,50,135,160*((BTS.Scale-0.50)/0.50)) )
surface.SetTextColor( 255, 255, 255, 220*((BTS.Scale-0.50)/0.50) )
surface.SetTextPos( 10, 40 )
surface.DrawText( "Name: " .. BTS.Aim:GetName( ) )
surface.SetTextPos( 10, 52 )
surface.DrawText( "Time Spent: " .. BTS.ToYearsDaysHoursMinutesSeconds(GetGlobalInt("BTS_ServerTime")-BTS.Aim:GetNetworkedInt( "BTS_JoinTime" )) )
surface.SetTextPos( 10, 64 )
surface.DrawText( "Points: " .. BTS.Aim:GetNetworkedInt( "BTS_Points" ) )
end
end
end

BTS.Panel:SetVisible( true )
end

function BTS.CheckAim()
local p = LocalPlayer()
local a = nil
local traceRes = p:GetEyeTrace()
if traceRes.Entity != nil then
a = player.GetByID(traceRes.Entity:EntIndex())
end

if (ValidEntity( a ) || ValidEntity( BTS.Aim )) && BTS.Scale < 1.00 then
BTS.Scale = BTS.Scale + 0.01
if BTS.AimLock == -1 && ValidEntity( a ) then
BTS.Aim = a
BTS.AimLock = GetGlobalInt("BTS_ServerTime")
end
end
if ( (!ValidEntity( a ) && !ValidEntity( BTS.Aim )) || GetGlobalInt("BTS_ServerTime") - BTS.AimLock >= 2 ) && BTS.Scale > 0.50 then
BTS.Scale = BTS.Scale - 0.01
BTS.Aim = nil
BTS.AimLock = -1
end
end
hook.Add( "Think", "BTS_CheckAim", BTS.CheckAim );
end

Please.. any help would be appreciated. Thanks.

81
General Chat & Help and Support / gag.. anomoly.. maybe a bug?
« on: September 15, 2007, 10:09:47 PM »
I usually gag all of my players to prevent ping issues when everyone wants to talk a lot.. which isn't a huge deal because I offer ventrilo service to my users which runs on a different server.

Here is what happened..

I did !gag <all>

Player was still able to speak over his microphone?!

I tried to gag him individually.

Still.. didn't work.. he could talk still.

I thought maybe it was the user group he was in.. so I demoted one of my members to test that theory.. nope...

No one else could talk.. so it wasn't a broken command.. just didn't work on that one guy..

The echo said it was gaggin him... I have no idea why he could still talk.

Anyone seen this before? or know what causes it?

82
General Chat & Help and Support / Downloading Maps
« on: August 31, 2007, 02:10:44 PM »
hey guys.. it's my turn for a little help if you don't mind.. shouldn't be too hard..

ulx addForcedDownload...

can I use this command in my server.ini to allow users to download maps from my server if they dont have it already?

like... ulx addForcedDownload maps/whatever.mapextension

if this isn't possible with ulx, do you know how it is? Ive looked around on Google.. and I cant find any solutions. I know it is possible, because like with Counterstrike.. or whatever, you can get the maps from them..


Thanks a lot guys. =)

83
General Chat & Help and Support / File Formatting.
« on: August 30, 2007, 09:36:00 PM »
okay.. I replied in the usergroup post with this.. but I thought it might be worth making a seperate thread for it so as to not distract the other thread from its intended purpose.


The user.txt and groups.txt files that ULX saves for you in data/ULib give me some really ackward formatting by default.. lets see...

Here is my User.txt file how it should be formatted.. this is also how it IS formatted if I dont try and edit it..

Quote
"saabnl"   

{

   "deny"   

   {

   }

   "type"   "steamid"

   "groups"   

   {

      "admin"

   }

   "id"   "STEAM_0:1:8454402"

   "pass"   ""

   "allow"   

   {

   }

}

"‡????‡ rar"   

{

   "deny"   

   {

   }

   "type"   "steamid"

   "groups"   

   {

      "member"

   }

   "id"   "STEAM_0:1:15207260"

   "pass"   ""

   "allow"   

   {

   }

}



THis is how it gets formatted when I try to save it or edit it.
Quote
"saabnl"    {    "deny"       {    }    "type"   "steamid"    "groups"       {       "admin"    }    "id"   "STEAM_0:1:8454402"    "pass"   ""    "allow"       {    } } "‡????‡ rar"    {    "deny"       {    }    "type"   "steamid"    "groups"       {       "member"    }    "id"   "STEAM_0:1:15207260"    "pass"   ""    "allow"       {    } }

I can go through line by line and reformat it every time.. but this takes ages and doesn't even gurentee that it will work. =-\.. any ideas?

84
General Chat & Help and Support / ulx adduser
« on: August 25, 2007, 11:28:41 AM »
I'm sorry if this issue has been addressed, but I looked and couldn't find anything.

I am using the SVN version 2.20 and one of the new features is that when a user is added to a usergroup it updates without the need to reconnect. This works when adding someone to the admin group, but doesnt work with custom groups. Is this working as intended, or a bug?


example for clarity... I add someone to a 'goldmember' or 'member' gorup, they still have to reconnect before teh change is shown.. however, I add someone to the superadmin group.. the change is shown instantly like the change notes suggest.

85
Off-Topic / @ Megiddo
« on: August 16, 2007, 09:03:02 PM »
College? o'rly?

What year? What Major?

I am just getting back to college myself.. 3rd year Freshman ftw.. and im not even joking.. I wish I was...

86
Suggestions / !strip <player>
« on: August 11, 2007, 08:50:10 PM »
There have been plenty of times when simply stripping the weapons from an abusive player might solve some issues or whatever. I noticed how COnna had included a command to strip a player of all their weapons including their tool gun with SAT and I was wondering if this could be added to ULX. I think it is a needed addition to the best admin mod out there.

Please consider it.

Pages: 1 ... 4 5 [6]