Raised This Month: $32 Target: $400
 8% 

automatically added to the team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alvedro
Member
Join Date: Feb 2012
Old 05-05-2012 , 10:51   automatically added to the team
Reply With Quote #1

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.
alvedro is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-05-2012 , 11:00   Re: automatically added to the team
Reply With Quote #2

Quote:
Originally Posted by alvedro View Post
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
__________________

Last edited by claudiuhks; 05-05-2012 at 11:01.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-05-2012 , 11:01   Re: automatically added to the team
Reply With Quote #3

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.
Liverwiz is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-05-2012 , 11:03   Re: automatically added to the team
Reply With Quote #4

Quote:
Originally Posted by Liverwiz View Post
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

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

Last edited by claudiuhks; 05-05-2012 at 11:14.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-05-2012 , 11:06   Re: automatically added to the team
Reply With Quote #5

Quote:
Originally Posted by claudiuhks View Post
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
boo. It was a nice thought though.
Liverwiz is offline
alvedro
Member
Join Date: Feb 2012
Old 05-05-2012 , 11:47   Re: automatically added to the team
Reply With Quote #6

So how do automatically add to the team in which there are fewer players?
alvedro is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-05-2012 , 12:46   Re: automatically added to the team
Reply With Quote #7

Quote:
Originally Posted by alvedro View Post
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?
__________________

Last edited by claudiuhks; 05-05-2012 at 12:46.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
alvedro
Member
Join Date: Feb 2012
Old 05-05-2012 , 12:58   Re: automatically added to the team
Reply With Quote #8

This command does not allow you to automatically add players to teams, certainly not.
And you read my posts?
alvedro is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 05-05-2012 , 14:04   Re: automatically added to the team
Reply With Quote #9

http://forums.alliedmods.net/showthread.php?p=438587
__________________
kramesa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-06-2012 , 03:52   Re: automatically added to the team
Reply With Quote #10

Quote:
Originally Posted by Liverwiz View Post
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.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:45.


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