Jump to content

Home

I need some help...


Achilles87

Recommended Posts

Well I'm a noob too but I'll help, I know a little about Admin commands (becuase Lee Oates taught me :) )

 

You start with your basic command structure something like:

else if (Q_stricmp(cmd, "amyourcommand") == 0)
{
	if (trap_Argc() > 1)
	{
		char sArg[MAX_STRING_CHARS];
		int entNum = 0;

		trap_Argv( 1, sArg, sizeof( sArg ) );

		entNum = G_ClientNumFromNetname(sArg);

		if (entNum >= 0 && entNum < MAX_GENTITIES)
		{
			gentity_t *targetEnt = &g_entities[entNum];

			if (targetEnt ->inuse && targetEnt ->client)
			{
				//Here is where you put where ever command you want like:
                                          targetEnt ->health = -999;
			}
		}
	}
}

Link to comment
Share on other sites

I can help too. I am trying to do this myself with only a little bit of C experience. I'm TRYING to get some source code for an admin mod from two different people but they can't seem to help. :rolleyes:

 

Anyway, here's a good tut/resource(you're gunna have to take it slow, but it will get u there ;)):

 

very good cvar (e.g. admin password) and and admin cmds

 

 

And you're gunna need Visual C++ 7.0 (usually runs at $100 its called .NET)

 

That should do it. BTW, who is Lee Oates? Maybe she could help me too? :)

 

VSYoda1 do you know any way I could make an "/amlogin <password> cmd? Like some actual code? Just curious :)

Link to comment
Share on other sites

I'm sorry, but you're gunna need .NET for this. The Jedi Academy SDK (the source code you're gunna need to change) is in .sln which can only be run using .NET. I don't think you can change the .NET formatting (.sln) into the Visual C++ 5.0 format (I think that's .dsw).

 

BTW, anyway I could contact Lee Oates? :)

Link to comment
Share on other sites

That will work :)

 

BTW, I have now figured out how to do a lot of admin cmds like:

1. amlogin <password>

2. How to set a cvar that will set the password

3. How to make cmds work for yourself and separately how to make cmds work for you alone. So please PM me if you need some source code or anything :)

 

Keep in mind though that I'm learning this myself just now, but I have some source code already ;).

Link to comment
Share on other sites

Yah, Lee Oates is like the god of server side coding. I learned a lot from him. He's (or she, I haven't talked to him about anything more than coding) actually a very nice person and very helpful. He's working on JA Duelers Mod right now. I've got a some admin source code for using guns for specifying a target if you want that too?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...