sad-min...
The teams get fucked up all the time here.
The new version does not use teams.
[quote]- What code does it seem I stole from assmod?[/quote]
[code]function SA_isEqualOrHigher(Pl, Targ)[/code]
In particular, that. But there are trace elements all throughout. It looks less like it than the first time.
[quote]- What code can I shave down, I have no idea, and I would like to keep it small as possible.
[/quote]
1. The whole equal to or higher stuff I think isn't the greatest idea. If you have admins, you should be able to trust them to get along and not use commands on each other without consent. Adding that code is pointless because any admin who tries to abuse their power on superiors shouldn't be an admin.
2.
[code]
playervars[Pl:SteamID()] = {}
playervars[Pl:SteamID()]["isGod"] = 0
playervars[Pl:SteamID()]["isNoclip"] = 0
playervars[Pl:SteamID()]["isMuted"] = 0
playervars[Pl:SteamID()]["isVMuted"] = 0
playervars[Pl:SteamID()]["isBurning"] = 0
playervars[Pl:SteamID()]["isFrozen"] = 0
playervars[Pl:SteamID()]["isBlind"] = 0
playervars[Pl:SteamID()]["canSuicide"] = 1
playervars[Pl:SteamID()]["isRagged"] = 0
[/code]
Is scary. You shouldn't set up code for plugins inside of the server file. Plugins should be just that, plugins, things that require no code in the server file that is specific to them. You can just add one more condition to your if statements that check the toggle state that says something to the effect of:
[code]
if (not ply["isRagged"]) | (ply["isRagged"] == 0) then
[/code]
Although I'm not sure it's been a while you may not need the second condition on that line because it may be implied within the first one (which is there to check if it's nil). If you absolutely must set these player values up, do it within the individual plugins.
3. [code]function SA_getSteam(Pl, Cmd, Args)[/code]
Seems ridiculous. If you need a steam ID as a player/admin, do 'status' in console. If you need it in code, ply:SteamID()
4. [code]function SA_guiSteam(Pl, Cmd, Args)[/code]
The client side shouldn't need the Steam ID. Put everything you possibly can on the server side.
5. In [code]function SA_registerCommand(optionName, cmdName)[/code] don't sort. Instead run a sort after all of the plugins are loaded.
6.
[code]
local function InitPostEntity()
SA_client = LocalPlayer()
end
hook.Add("InitPostEntity", "WelcomeLocalPlayer", InitPostEntity)
[/code]
Need I say anything?
7. [code]
if SA_isEqualOrHigher(Pl, toBurn) == true then
Pl:PrintMessage(HUD_PRINTTALK, "Permission denied. " .. toBurn:Nick() .. " is equal or higher than you.")
return
end
[/code]
Could probably be made into a server side function that you call from your plugins.
Also, [code]if SA_isAdminOrHigher(Pl) == true then[/code] should come before the above.
8. Almost all of your GUI can be reduced. I'm not saying that my GUI is the prettiest, but it's rather efficient. I have only a few rather large functions that I call on no more than 5 lines in each plugin to create windows. Take a look at MOOCOW's gui.lua file and then look at the bottom of one of my plugins. It's amazing how much you can reduce GUI code.
[quote]- I will change the godmode command if that is the case.[/quote]
It is. Not for bullets, but for some explosions and other odd ways to die.
[quote]- What security issues could be caused by not using just the server console?[/quote]
You don't want players to be able to join after an install of your mod and go in and type the ownership command on their machines. There are people who may try to install your mod and not make themselves owners, and that would cause their server to come to risk. I admit, this isn't likely, but possible. By controlling who gets ownership via the server's console and/or the server's ranking file, you prevent this.
On another note:
in the function:
[code]function SA_setAdmin (Pl, Cmd, Args)[/code]
This:
[code]
if (!toAdmin) then
Pl:PrintMessage(HUD_PRINTTALK, "Player not found.")
return
end
[/code]
Should be the first check.
Good work so far, it's getting better.
[quote=overv]
Bullshit, it has never failed for me and it never will.
[/quote]
Not with normal bullets, no, but if you get hit by certain explosions caused by lua, it fails, whereas using hooks does not.
+1 for long post.
When some people reply to a person who used a numbered list to list some stuff, they use a list in return to insult the person they are replying to. This is not the case here; I think a list in reply to yours is most efficient.
As for the SA_isEqualOrHigher, no. I did not see any of assmod's code for this, when I wrote it it just made sense at the time to do it the way I did.
1. Equal to or higher than is there so people don't permaban owners and crap. It'll stay definitely.
2. This is a good idea. Could I do an if (SERVER) then playervars... end in the plugin file?
3 - 4. Those functions are from an older version, the new one doesn't use that. I just didn't realize I don't use them any more and forgot to erase them. Also, Pl:SteamID() doesn't work clientside.
5. I wasn't aware it was sorting after every plugin was added. Will change.
6. Yes.
7. Maybe.
8. I can't really make sense of what you mean after "it's rather efficient".
On the other note, yes.
Thanks for the time you took to write that reply, it has been most helpful.
[QUOTE=yakahughes;16100364]+1 for long post.
When some people reply to a person who used a numbered list to list some stuff, they use a list in return to insult the person they are replying to. This is not the case here; I think a list in reply to yours is most efficient.
As for the SA_isEqualOrHigher, no. I did not see any of assmod's code for this, when I wrote it it just made sense at the time to do it the way I did.
[/quote]
Listing != insulting
[QUOTE=yakahughes;16100364]
1. Equal to or higher than is there so people don't permaban owners and crap. It'll stay definitely.
[/quote]
You shouldn't need it because any ban should be able to be removed via a file or other form of external use; like I said before, if someone permabans the owner then they shouldn't be an admin, that is the point where you unban the owner by hand and then ban the admin.
[QUOTE=yakahughes;16100364]
2. This is a good idea. Could I do an if (SERVER) then playervars... end in the plugin file?
[/quote]
Like I said before, you probably want to not bother putting the variables on the player until a plugin is used on them. Let nil indicate the default value. Essentially, no, I would advise against setting them anywhere when the player first joins, set them only when the plugin is called on them.
[QUOTE=yakahughes;16100364]
3 - 4. Those functions are from an older version, the new one doesn't use that. I just didn't realize I don't use them any more and forgot to erase them. Also, Pl:SteamID() doesn't work clientside.
[/quote]
I know SteamID doesn't work client side, but you shouldn't need it there either.
[QUOTE=yakahughes;16100364]
5. I wasn't aware it was sorting after every plugin was added. Will change.
[/quote]
Cool :)
[QUOTE=yakahughes;16100364]
6. Yes.
[/quote]
You don't need pointless variables/hooks. Just call LocalPlayer() instead.
[QUOTE=yakahughes;16100364]
7. Maybe.
[/quote]
Definitely.
[QUOTE=yakahughes;16100364]
8. I can't really make sense of what you mean after "it's rather efficient".
[/quote]
a. Go look at MOOCOW's gui.lua
b. Use reusable code for GUI so you don't make a unique GUI or repeat code for every single function. All GUI, unless unavoidable should be reusable.
[QUOTE=yakahughes;16100364]
On the other note, yes.
Thanks for the time you took to write that reply, it has been most helpful.[/QUOTE]
No problem :)
Not bad! In future, sAdmin be good alternative ULX and ASSMod.
Nice job! Enjoy :D
why the fuck did you bump this.
he probably stopped developing it anyway
Hmm.. I'm optimistic about this. I believe all admin mod should be simple. That's just me though.
[QUOTE=yahan;17867682]Hmm.. I'm optimistic about this. I believe all admin mod should be simple. That's just me though.[/QUOTE]
:colbert:
This is three/four months old.
[QUOTE=_Mythic;17867713]:colbert:
This is three/four months old.[/QUOTE]
Lol. I'm probably going to rewrite the entire thing since I've learned a lot since I wrote it.
I realize this is old, but I'm looking for an admin mod..... unfortunately the file site is saying this has been reported. When you release a new version, please let us know.
EDIT:
Nevermind... according to a few threads, some minge is doing it.
I will download this and try it
[QUOTE=Pawnstick;15694664]Why do people keep on making admin mods? We don't need anymore of them[/QUOTE]
What we really need is a good, admin mod with a good look/well looking interface that makes it enjoyable to look at, A good name, And a way to load/unload plugins.
[QUOTE=schumacher;17878653]What we really need is a good, admin mod with a good look/well looking interface that makes it enjoyable to look at, A good name, And a way to load/unload plugins.[/QUOTE]
Yes.
I made this so long ago, it's pitiful. I look at some of the stuff I did and the only words that come to mind are "Wow". I am working on a music player at the moment, after that is done, I will make a new version of this and make it billions of times better.
thx 4 this admin tool.
good job!
Oh shit, I remember this!
Why can't I access admin weapons as the owner?
I really like menu driven admin tools, i'm making a new build server today and i'd like to try this out. One thing I would like to ask is, does this support sbox_ limits and swep restrictions? Also i have some generic plugins you might like.
Oops, seems this was a old thread, my bad.
This is extremely old and poorly coded *cough what r local varibls cough* because it was such a long time ago that I made it and I hardly knew anything. I'm making a new one that is at least 9000 times better. If you have some good ideas for plugins, PM me them and I'll see about adding them in.
[QUOTE=yakahughes;19034093]This is extremely old and poorly coded *cough what r local varibls cough* because it was such a long time ago that I made it and I hardly knew anything. I'm making a new one that is at least 9000 times better. If you have some good ideas for plugins, PM me them and I'll see about adding them in.[/QUOTE]
[URL=http://developer.valvesoftware.com/wiki/Valve_Time]Cool, sAdminV1, Evolve and FlapMin will all have similar release dates.[/URL]
i love this. but how can i ban a person that isnt on the server at the time?
[QUOTE=khortonworld;20333985]i love this. but how can i ban a person that isnt on the server at the time?[/QUOTE]
You can't.
And don't use this, it's fail incarnate.
[QUOTE=yakahughes;20335245]You can't.
And don't use this, it's fail incarnate.[/QUOTE]
What shall I use then?
(using darkRP)
Well I guess you can use it if you like it, it's just not a very good one. One day I will feel motivated enough to finish the next version which is quite different and will be released in a totally different thread because it's a total rewrite.
Could you make the weapons list stack to the side as well. instead of just upwards/downwards, will help alot.
good job with this :)
nice work on this
Looks very promising, Keep up the good work!
Sorry, you need to Log In to post a reply to this thread.