Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SnD rounds and team stwitching
#1
hey guys haven some issues with a mod, it starts with all on defend team then it pick's one person to be on the other team, kinda like a zombie mod , the first person he kill's get's swaped to the attacking team while the rest stay , what im trying to do at the end of the round is have the peron that was in first move over to defence while the person he killed first last round stays on that team

i asked a good friend and he gave me this idea so i've thought about something like this im not sure if any of it would work

Code:
MoveOldMike()
{
mikesid = self getxuid(); // set's xuid as mikesid

self waittill("end_killcam");  // not sure about that i just need it to run before the start of each round


if(mikesid != self getxuid()) // not sure
{
self notify("menuresponse", game["menu_team"], "allies"); // if any

}

} // of this willl work

Reply

#2
Edit : it woulnt have to be xuid it could be self.name or anything i just need a way to tell players apart
Reply

#3
Alright, first you need an good algoritm in your head to make this before you make a code. It seems you didn't do this step which is very important for complicated mods. Every good programmer does this.

Step 1: everyone on defence team.
Step 2: randomly chosen person goes in attacking team.
Step 3: save the xuid or name of this person somewhere (in this example we call it: player1db)
Step 4: wait till there are 2 players in attacking team.
Step 5: search for the player's name in attacking team if(player name != player1db) { continue}
So it will search for an player in the team but this cannot be the 1st player in step 3.
Step 6: When this player is found in step 5 we save it in player2db.
Step 7: Wait till round is over. Than move everyone to defence team at next round.
Step 8: Save player2db in player1db (because now he is 1st zombie).
Step 9: everything starts again from begin.
Reply

#4
Thanks heaps man that is what im trying to do im just haveing trubble getting the code right , is there a mod i could look at that might help me for the most part i think i can make that work i'd get stuck on step 6 though , must sleep now then work tomorro so will get back into it in the evening
Reply

#5
ok im going to have ago at this tonight but i might need a little assistance , could someone give us a hand on steam ?
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Call of Duty loser calls in SWAT team hoax on kid who beat him RaZ 3 4,073 04-24-2014, 19:31
Last Post: Casper
Question Help Team DAMAGE offhand E-losev 0 2,424 09-17-2013, 12:03
Last Post: E-losev
  Help choose 2 random players?(1 each team) 26hz 6 4,642 09-12-2013, 17:32
Last Post: Yamato
  Name Team CheGuevara 1 3,073 06-01-2013, 14:15
Last Post: Yamato
  [Release] Team Customizer iPaddie 35 27,685 04-14-2013, 12:34
Last Post: Nero Z zero
  Team struct Deviler86 6 5,503 04-10-2013, 15:23
Last Post: x1412
  Sniper rifles bullet's spread & Preventing joining to a team lammv 11 7,100 03-15-2013, 12:53
Last Post: lammv
  Sending a plaeyr to axis or allies team lammv 0 2,018 01-26-2013, 18:59
Last Post: lammv
  [Request] Team change by admin command. Dumas 10 8,875 11-29-2012, 21:38
Last Post: 99IRock
Question Help MW3 infected team help koro35 12 9,382 11-23-2012, 07:45
Last Post: 99IRock

Forum Jump:


Users browsing this thread:
1 Guest(s)

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