AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   automatically added to the team (https://forums.alliedmods.net/showthread.php?t=184450)

alvedro 05-05-2012 10:51

automatically added to the team
 
Hi,
How will the plugin, which the player enters the server automatically adds it to the team, because in a team with less players. So as to align the team. I saw that the plugin: 'Team Join Management' but it is too complicated, I need a simple example of such a plugin, glad I gave it later to edit.

claudiuhks 05-05-2012 11:00

Re: automatically added to the team
 
Quote:

Originally Posted by alvedro (Post 1702627)
player enters the server automatically adds it to the team, because in a team with less players

You don't need any plugin. Set mp_limitteams to 1 :)

Liverwiz 05-05-2012 11:01

Re: automatically added to the team
 
Code:

public client_connect(id)
{
    cs_set_user_team(id, getUserPlacement(id)
}

public getUserPlacement(id)
{
    // some code to determine where you want to put the player
    return CsTeams:team
}

unless you're looking for the actual plugin. in which case....post in the request forum.

claudiuhks 05-05-2012 11:03

Re: automatically added to the team
 
Quote:

Originally Posted by Liverwiz (Post 1702632)
Code:

public client_connect(id)
{
    cs_set_user_team(id, getUserPlacement(id)
}

public getUserPlacement(id)
{
    // some code to determine where you want to put the player
    return CsTeams:team
}

unless you're looking for the actual plugin. in which case....post in the request forum.

It's unable to change team in client_connect
The menu for team selecting is shown after client_putinserver and after player closes MOTD too :cry:

Edit: client_connect is executed when player is seeing message Establishing connection to server and only three lines from box are charged.

Liverwiz 05-05-2012 11:06

Re: automatically added to the team
 
Quote:

Originally Posted by claudiuhks (Post 1702633)
It's unable to change team in client_connect
The menu for team selecting is shown after client_putinserver and after player closes MOTD too :cry:

boo. It was a nice thought though. :P

alvedro 05-05-2012 11:47

Re: automatically added to the team
 
So how do automatically add to the team in which there are fewer players?

claudiuhks 05-05-2012 12:46

Re: automatically added to the team
 
Quote:

Originally Posted by alvedro (Post 1702666)
So how do automatically add to the team in which there are fewer players?

Change the console variable's value like I said.
Are you reading only the blank rows?

alvedro 05-05-2012 12:58

Re: automatically added to the team
 
This command does not allow you to automatically add players to teams, certainly not.
And you read my posts?

kramesa 05-05-2012 14:04

Re: automatically added to the team
 
http://forums.alliedmods.net/showthread.php?p=438587

fysiks 05-06-2012 03:52

Re: automatically added to the team
 
Quote:

Originally Posted by Liverwiz (Post 1702632)
Code:

public client_connect(id)
{
    cs_set_user_team(id, getUserPlacement(id)
}

public getUserPlacement(id)
{
    // some code to determine where you want to put the player
    return CsTeams:team
}

unless you're looking for the actual plugin. in which case....post in the request forum.

If you don't already know that this won't work then I suggest that you stop trying to help people unless you have tested the code.


All times are GMT -4. The time now is 00:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.