Jump to content

Home

A few questions


ArkAngel

Recommended Posts

Posted

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

Posted

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..........

Posted

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.

Posted

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.

Posted

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 :D 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.

Archived

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

×
×
  • Create New...