Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request New to Modding and need help
#1
so i've started modding some pretty basic stuff and i'm a bit stuck. I want to limit the attacking team to 3 - 4 players. Also when a person joins a certin team they get a certin weapon. If you could post the code i would be so grateful

I've looked at some tutorials on here but there was nothing about these kind of stuff
Reply

#2
Not sure but i think it is
(Used in console)
Code:
maxclients 3

then restart the game
Code:
Map_restart
or just put it in the mod
Reply

#3
Code:
maxclients 3


doesnt that make max players in the game 3? What i ment was like one team max of 3 players the other 9 or 10
Reply

#4
Yer that would set the max players to only 3 xD
forgot about that
Reply

#5
im a believe of not just spoon feeding you but pointing you in the right direction.

Check when they join team, check how many are on that team, if over the limit, force to other team. Check when they spawn, check team, take all weapons and give certain weapons. Wala
Reply

#6
Quote:im a believe of not just spoon feeding you but pointing you in the right direction.

well thanks Killingdyl but im stuck and i do not know where to start so could u mabye give a little bit of code?


Edit: Is this correct?
Code:
if ( self.pers["team"] == game["axis_teamset"] ) {
               self takeAllWeapons();
               self giveWeapon( "M14_mp", 0, false );
Reply

#7
Should be put under onPlayerSpawned:
Code:
doPlayerCount()
{
    attack = 0;
    defend = 0;
    for(i = 0; i < level.players.size; i++) {
        if(level.players[i].pers["team"] == game["defenders"])
            defend++;
        if(level.players[i].pers["team"] == game["attackers"])
            attack++;
    }
}

That should guide you a little, figure out the rest.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] Request for Assistance with Modding COD: BO using Mod Tools one1lion 9 6,317 09-17-2013, 21:04
Last Post: one1lion
  Help Modding Zombie Mode DarthKiller 3 4,638 07-09-2013, 21:08
Last Post: Nekochan
  Why there are no modding for Frostbite Engine RaZ 2 3,180 03-30-2013, 17:14
Last Post: Pozzuh
  Modding online custom classes? jarniboi 0 2,496 03-12-2013, 00:21
Last Post: jarniboi
  [Tutorial] Modding Terraria Pozzuh 5 10,561 01-12-2013, 22:27
Last Post: Xeramon
  How or why did you start modding COD games? Bloodfocus 12 7,293 12-25-2012, 13:08
Last Post: alvarogt95
Thumbs Down Help help Modding new fingerweak 1 2,043 10-11-2012, 23:18
Last Post: Rendflex
  Bo modding help needed SamuelGrund 6 4,071 08-30-2012, 15:39
Last Post: SamuelGrund
  Modding tools for BF3 are a scary business Pozzuh 12 8,101 08-18-2012, 15:35
Last Post: Arteq
  Not sure if glitch or modding :S Arteq 5 3,637 08-11-2012, 13:08
Last Post: Metro-Police#45

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.