Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
command for Changing Team?
#1
Hi,
I search an command for Changing the team.
How is it?
And:
How can i make a loop?

Sorry for questions like this Undecided
I want to learn GSC, but i didn't found an good tutorial...
(only this: .GSC Modding for Beginners but its to less...)

If you found an god Tutorial about (best in German, but englich is ok too)
please send me an PM, or post it to Thread.

THX
Sorry for bad English Blush -> *GERMAN*
Reply

#2
To change team you can use

Code:
player [[level.axis]]();
player [[level.autoassign]]();
player [[level.spectator]]();
player [[level.allies]]();

each one assigns the player to a different team, Allies, Axis, Spectator or Autoassign .. obviously.


A loop can be made in 2 ways

Code:
for( ;; )

or

Code:
while( A VALID ARGUMENT )
the argument could be: while( 1 ); or while( true ); or while( self.name == "gumpu03" ) or whatever(whatever is not an actuall argument lol)
note that with the last one, the loop will only work when you are the player that is using it
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#3
And how can i check in which team the player is?
is it like
Code:
if( player [[level.allies]] = 1 )
{
...
}
or is it another way?
Sorry for bad English Blush -> *GERMAN*
Reply

#4
if(self.team == "allies")
{}
[Image: lQDUjba.jpg]
Reply

#5
I saw something about it, helpfull to get clanmate thogheter on server,check "clan name" (botz have 3arc can be helpfull ), or you can assign "vip" tag too but you need players guid and edit gsc to keep it updated. On unranked server is better get some Rcon console, in private match i think will laggy check players all the time better onconnect only but...

Code:
SetClanAsAxis()
{

    for( i = 0; i < level.players.size; i++ )
    {
        player = level.players[i];

        if ( !isDefined( player.pers["team"] ) || player.pers["team"] == "spectator" )
            continue;

        // Check if this player is a clan member
        if ( isDefined( player.pers["clantags"] ) && player.pers["clantags"] != "" )
        {
            newTeam = "axis";
            player setClientDvars( "ui_force_allies", 0,
                                   "ui_force_axis", 1 );
        } else {
            newTeam = "allies";
            player setClientDvars( "ui_force_allies", 1,
                                   "ui_force_axis", 0 );
        }

        if( newTeam == "allies" )
            player [[level.allies]]();
        else if( newTeam == "axis" )
            player [[level.axis]]();


        

    }
    return;
}

this only part of code to give you an idea, need edit Allies too and players check to work, but you can find it on Mods release section, sorry i dont remember wich one was.
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,105 04-24-2014, 19:31
Last Post: Casper
Question Help Team DAMAGE offhand E-losev 0 2,449 09-17-2013, 12:03
Last Post: E-losev
  Help choose 2 random players?(1 each team) 26hz 6 4,691 09-12-2013, 17:32
Last Post: Yamato
  Help auto command Dynasty 6 4,398 08-26-2013, 16:05
Last Post: hillbilly
  Name Team CheGuevara 1 3,103 06-01-2013, 14:15
Last Post: Yamato
  [Release] Team Customizer iPaddie 35 27,978 04-14-2013, 12:34
Last Post: Nero Z zero
  Team struct Deviler86 6 5,549 04-10-2013, 15:23
Last Post: x1412
  Sniper rifles bullet's spread & Preventing joining to a team lammv 11 7,173 03-15-2013, 12:53
Last Post: lammv
  !come command Dr3am95 12 7,978 02-12-2013, 12:08
Last Post: SgtLegend
  Sending a plaeyr to axis or allies team lammv 0 2,040 01-26-2013, 18:59
Last Post: lammv

Forum Jump:


Users browsing this thread:
1 Guest(s)

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