Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Please help with my first coding mod

Page: 1 of 1
 MeusH
09-22-2004, 1:02 AM
#1
Hello. I've tried to make a server side mod that gives player only enchanced Flechette. So I've boosted a few things, and now I need help with:

1. How to disable weapons and ammo in the maps
2. Make the 'hello' text when player joins the game. So I've tried putting

print \" Hello \"

at the end of code block

/*
================
G_InitSessionData

Called on a first-time connect
================
*/
void G_InitSessionData( gclient_t *client, char *userinfo, qboolean isBot ) {

.....
.....
.....

}

in file game\g_session.c

I don't know if it will work, so plz tell me

3. And the last thing. How to compile that? Since Visual C++ costs 100 bucks I can't download it, but Microsoft offers free Visual C++ toolkit. Can I use it to compile files to .dll file?

Thanks for replies!
 MeusH
09-22-2004, 1:29 AM
#2
I think I've made only Flechette avaible by editing the start weapon (if force saberattack>0 give wp_lightsaber changed to give wp_flechette) But I still don't get a few things. I think that won't work.. and the wapons and ammo will be on the map.
So I think there should be settings like saberonly (to disable ammo and weapons) but player will have flechette, and server will show on the list like server with guns. Any ideas?

And how can I make console command that shows some text in console, and how can I make console command that specifies some thing, like damage size. In g_weapons.c it looks like
#define FLECHETTE_DAMAGE 12

And I would like it to use the cvar
#define FLECHETTE_DAMAGE mymod_damage or g_flechettedamage
???
 Barada
09-23-2004, 12:16 AM
#3
To your first post -

I think if you want to disable item pickups, you'd probably want to poke around in g_items, probably in the G_SpawnItem and touch_item functions.

For a printed message when you spawn, check g.cmds or g.client. Most of the MP strings are called from there.
 MeusH
09-23-2004, 2:48 AM
#4
Thanks! I've found stuff about respawning ammo and weapons. There is a line
return adjustRespawnTime(g_weaponRespawn.integer, ent->item->giType, ent->item->giTag);
So... may I just change stuff in () to 99999, so it won't respawn?
 razorace
09-23-2004, 11:30 PM
#5
Well, if you do that, the items will still spawn initally. The best way is to just completely disable them. I've set the code up to do this with the weapon disable cvar in OJP but I don't remember the code at the moment. I suggest you just reference to the OJP source code.
Page: 1 of 1