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


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

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

#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

#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 ?



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Team DAMAGE offhand E-losev 0 3,399 09-17-2013, 12:03
Last Post: E-losev
  Help choose 2 random players?(1 each team) 26hz 6 6,347 09-12-2013, 17:32
Last Post: Yamato
  Name Team CheGuevara 1 4,365 06-01-2013, 14:15
Last Post: Yamato
  Team struct Deviler86 6 7,728 04-10-2013, 15:23
Last Post: x1412
  Sniper rifles bullet's spread & Preventing joining to a team lammv 11 10,411 03-15-2013, 12:53
Last Post: lammv
  Sending a plaeyr to axis or allies team lammv 0 2,893 01-26-2013, 18:59
Last Post: lammv
  [Request] Team change by admin command. Dumas 10 11,443 11-29-2012, 21:38
Last Post: 99IRock
Question Help MW3 infected team help koro35 12 12,458 11-23-2012, 07:45
Last Post: 99IRock
  [Request] change team name plugin james ford 7 8,807 11-13-2012, 22:05
Last Post: parsa89
  Promod - side swap at 12 rounds srskiller 1 3,252 11-07-2012, 15:54
Last Post: DidUknowiPwn

Forum Jump:


Users browsing this thread:
1 Guest(s)

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