lfnetwork.com mark read register faq members calendar

Thread: The basics? (admin junk)
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 01-28-2004, 04:15 PM   #1
MasterSidious
Junior Member
 
MasterSidious's Avatar
 
Join Date: Oct 2003
Location: in game getting flamed and banned
Posts: 412
The basics? (admin junk)

Ok, so I want to make an admin mod just like everyone else. I have already made the cmds (am...) but how do I password it?
My questions:
1. How do I create a variable that can be changed through a server.cfg? (this is what the password will be in the game)
2. How do I make only the people that enter the password be able to use the cmds?-
Do I add an if statement in the g_cmds.c that is just like the !CheatsOk for every command only it would be for the checking if there was the right password input by the client? If so, how specifically can I do this?
3. How would I add cmds? What kind of syntax should I use?

Thanks!

P.S. Please reply, I know the questions are hard but I'm begging you here


FP>Sephious
67.15.20.187:29070 - FFA SO
67.15.21.115:29070 - CTF SO
67.15.18.232:29070 - Siege/FFA
Laming is tolerated
MasterSidious is offline   you may: quote & reply,
Old 09-03-2008, 03:09 PM   #2
phasmatis6
Rookie
 
Join Date: May 2007
Posts: 14
I'm bumping this old thread, because I'm a bit unsure myself of how this would work.

I did a Google Code Search for "server.cfg", and I found a lot of Half Life code. So I tried "default.cfg" and still didn't get much (changelogs and whatnot).

But consider this: JAMP is compiled as a DLL and so..... you can basically do anything. You can use standard Win32 code to open/write/read/close any file you want.

As for logging in, you'd just add new commands in the ClientCommand in g_cmds.c (for example, "amlogin", "amkick", etc.)

http://www.mt-wudan.com/jkamp/g__cmd...ce.html#l03074

(It's really awesome that someone is hosting the entire JKA source online, isn't it? o_O)

Now, to keep track of admins I think every player has a unique ID somewhere in their gentity. Or maybe you could track them by entity number. I really haven't messed much with player entities, so you're on your own there.

You also want to check to make sure that non-admins can't use /god and /noclip.

If I ever get around to making an admin system (sorta iffy), I'll post my findings here. =/
phasmatis6 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > The basics? (admin junk)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:48 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.