Jump to content

Home

A few questions


ArkAngel

Recommended Posts

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

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

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...