Page 1 of 1
Noob modding question
Posted: Fri Apr 15, 2005 4:27 am
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.
Posted: Fri Apr 15, 2005 12:44 pm
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.
Posted: Sat Apr 16, 2005 6:56 pm
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?
Posted: Sun May 08, 2005 12:57 am
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.
Posted: Sun May 08, 2005 2:00 am
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).
Posted: Sun May 08, 2005 2:24 am
by reyalp
Posted: Sun May 08, 2005 3:10 am
by Lenard
Or alot. He isn't familiar with the modding community and basically got the SDK and went at it without knowing anything.
Posted: Tue May 10, 2005 2:44 am
by KMG
=D
Posted: Tue May 10, 2005 9:29 am
by corncobman