ArkAngel Posted December 15, 2002 Share Posted December 15, 2002 Ok here goes...... 1. How do you turn off all items in the map including weapons etc... like in duel, I cannot seem to find the code for it..... 2.Is there a way to give unlimated ammo toa weapon? I was think of maybe removing the ammo from a weapon instead, like the Stunner or Lightsaber.... 3. And lastly how to give the player weapons/items at the start of each respawn, like giving them a rockey launcher for example...........I saw something like that in g_client.c somewhere there............. well thats all for now..... thanks alot Link to comment Share on other sites More sharing options...
ArkAngel Posted December 17, 2002 Author Share Posted December 17, 2002 So does anyone know how to prevent the weapons and items for spawning? I tried this: qboolean HasSetSaberOnly(void) { . . . if (g_gametype.integer == GT_FFA) { wDisable = 1; } . . . } However now I have another problem! I cannot compile, I get this error: compiling... Error spawning cl.exe jk2mpgamex86.dll - 1 error(s), 0 warning(s) Can anyone tell me would the code work? And how to prevent items like health and shields from spawning, and also what is the cl.exe error?? I tried reinstalling already, and this only happened after I moved to my new comp.......... Link to comment Share on other sites More sharing options...
Commodus Posted December 17, 2002 Share Posted December 17, 2002 For unlimited ammo, there is a two dimensional array in one of the bg_ files (either misc or weapons) and one of the array elements is how much ammo the weapon uses when you fire it - simply change that number to 0 for unlimited ammo. Link to comment Share on other sites More sharing options...
ArkAngel Posted December 23, 2002 Author Share Posted December 23, 2002 Oh... thanks alot commodus, any one know how to prevent all items and weapons from spawning?? And how to outfit a player with certain items when they spawn. Link to comment Share on other sites More sharing options...
Commodus Posted December 23, 2002 Share Posted December 23, 2002 To give a player a certain weapon, you just say client->ps.stats[sTAT_WEAPONS] |= (1 << weapon); Where weapon is the flag of the weapon... You will have to add control structures (like a switch or a long if-then-else thingy) to determine what outfit the person has and then give them that outfit. Where to put it? G_ClientSpawn in g_client.c I would think... that's where I found it in the first place... As for stopping stuff spawn... just make a map without any items Seriously though, I have no idea. You might want to take a look at the G_SpawnItem function (in g_item.c) and the G_CallSpawn function (in g_spawn.c) and make some changes there. Let me know if it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.