Noob modding question

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
KMG
Posts: 83
Joined: Fri Apr 15, 2005 4:21 am

Noob modding question

Post by KMG »

Yeah, I'm a modding noob. I basically wanted to do a generic admin type of thing.. I was thinking I'd model it after rcon but I can't find anything at all about rcon in the code except some mentions of the "sv_rconpassword" cmd. Anybody wanna tell me where too look for that? In addition, is this remotely how an admin mod is created? Or do most modders create a completely independant module for the admin thingy? Like I was going to just put all my admin commands right next to all the rcon cmds, but I can't find any. Where are kick and ban defined?

Basically I was looking for some reference within the source for my admin thingy and I couldn't find it at all. Helpz plz.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

The rcon stuff is dealt with from within the engine, the part you as a mod coder don't have access too. Same goes for kicks and bans[1]. For an admin mod, you would just add your commands to g_svcmds.c.

[1] Some parts of a ban are processed in g_svcmds.c too.
KMG
Posts: 83
Joined: Fri Apr 15, 2005 4:21 am

Post by KMG »

K, thx.

1 more nub Q. I think I've defined a game cvar... Hah. I just can't figure out how the strings and stuff work, and how I can compare it to client cvars. Any one wanna help?
KMG
Posts: 83
Joined: Fri Apr 15, 2005 4:21 am

Post by KMG »

Hey how do I create a command? Like how can I define a command so that it is not "unknown?" I've been screwing around with g_cmds.c and stuff, but I can't figure it out.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

You add it to ConsoleCommand (g_svcmds.c):

Code: Select all

if (Q_stricmp (cmd, "xyzzy") == 0) {
    G_Printf("Nothing happens.\n");
    return qtrue;
}
Regarding client cvars: you can't if the mod's server-side only. Clients propagate only a handful of cvars to the server and you can't just poll the others (the client would have to assist in that but it doesn't out-of-the-box).
reyalp
Posts: 11
Joined: Sat Apr 30, 2005 7:23 pm

Post by reyalp »

Lenard
Posts: 737
Joined: Mon Aug 04, 2003 7:00 am

Post by Lenard »

Or alot. He isn't familiar with the modding community and basically got the SDK and went at it without knowing anything.
Last edited by Lenard on Tue May 10, 2005 5:10 am, edited 1 time in total.
KMG
Posts: 83
Joined: Fri Apr 15, 2005 4:21 am

Post by KMG »

=D
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Post by corncobman »

-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
Post Reply