Raised This Month: $51 Target: $400
 12% 

[SOLVED] Change Team / Player Team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-07-2016 , 17:50   [SOLVED] Change Team / Player Team
Reply With Quote #1

Is there any way to do exactly what "jointeam" and "joinclass" does without using these commands?
__________________

Last edited by Depresie; 10-07-2016 at 17:56.
Depresie is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 10-07-2016 , 18:37   Re: [HELP] Change Team / Player Team
Reply With Quote #2

http://www.amxmodx.org/api/cstrike/cs_get_user_team
http://www.amxmodx.org/api/cstrike/cs_set_user_team
__________________
Artifact is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-07-2016 , 18:42   Re: [HELP] Change Team / Player Team
Reply With Quote #3

Nope, that won't work on unassigned players
__________________

Last edited by Depresie; 10-07-2016 at 18:42.
Depresie is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 10-07-2016 , 19:19   Re: [HELP] Change Team / Player Team
Reply With Quote #4

cs_set_user_team will work. You want to block jointeam menu or what? You got already by Exolent I think auto join player plugin
__________________
Artifact is offline
ESForces
Member
Join Date: Dec 2012
Location: Omniverse
Old 10-07-2016 , 23:27   Re: [HELP] Change Team / Player Team
Reply With Quote #5

You should search another ways to fix that "retry" problem in your server...
__________________
"The happy ends not exists, because the good stories never ends..."
ESForces is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-08-2016 , 08:41   Re: [HELP] Change Team / Player Team
Reply With Quote #6

@Artifact
Won't work for what i want to do believe me, the join team menu and stuff can be blocked easily, so the commands, but i need to be able to still use the commands via server call

@ESForces not the retry is my problem

I want to create a game manager, like a waiting lobby, which is kind of complicated
__________________

Last edited by Depresie; 10-08-2016 at 08:42.
Depresie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-08-2016 , 10:28   Re: [HELP] Change Team / Player Team
Reply With Quote #7

Quote:
Originally Posted by Depresie View Post
@Artifact
Won't work for what i want to do believe me, the join team menu and stuff can be blocked easily, so the commands, but i need to be able to still use the commands via server call
Is this your only issue? You can handle this by allowing the commands only when you have a bool set to true.

So 99% of the time, set it to false so players cannot use it. Then when your plugin needs to call it, set it to true, call as needed, set back to false.

If this doesn't sound like it'll work, give more details about what you're trying to accomplish, I'm sure it's doable somehow.

Something like this. You can make this also block only specific changes like spec to t/ct or whatever. To use this, go in game and select a team. Type 'toggle' in chat and then attempt a team change -- you should be blocked. Type 'toggle' again to re-enable the ability to change teams.
Spoiler
__________________

Last edited by Bugsy; 10-08-2016 at 11:30.
Bugsy is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-08-2016 , 12:23   Re: [HELP] Change Team / Player Team
Reply With Quote #8

I was thinking about that but i thought there may be an alternative
It is a little complicated to explain since there are more factors involved in the functionality of it

I guess i will just use the bool for now, since the project was stagnant for the last couple days
__________________
Depresie is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-08-2016 , 12:30   Re: [HELP] Change Team / Player Team
Reply With Quote #9

Forgot to mention

I was thinking to execute joinclass and jointeam on him on putinserver, but somehow to forbid the server to spawn him, then move him to unassigned.. this would simplify things alot..
__________________
Depresie is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 10-08-2016 , 12:37   Re: [HELP] Change Team / Player Team
Reply With Quote #10

Use engclient_cmd, it's not sent to plugins so it'll bypass any blocks.

Code:
engclient_cmd(id, "jointeam", "5"); engclient_cmd(id, "joinclass", "5");

Replace 5 "Auto-select", with the team/class you want them to join.
PartialCloning is offline
Reply



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 16:04.


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