AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   force team join (https://forums.alliedmods.net/showthread.php?t=51024)

Major__ 02-09-2007 15:07

force team join
 
Ok, ive posted here before about autojoining, i got to know that i had to use cs_set_user_team inside public client_putinserver(){}

However, I do not want to display the screens after motd, (The select team, and select model). I want them to join either T och CT directly. Is it posible to accomplish this?

I have experimented with cs_set_uset_team. it seems that if a player is SPEC, and i force him to T or CT, his model is still SPEC. So, when force:ing his model to a T or CT-one, he doesnt have any weapons, health, money, etc...? Iv'e tried with spawn() and cs_user_spawn(). It seems that the only way to get them from spec to CT or T is to use: client_cmd(id, "jointeam 1") for example. I want to use cs_set_user_team(), but how can i give them a good model and knife, gun, health and $800 when i force the switch?

VEN 02-09-2007 15:23

Re: force team join
 
What's wrong with jointeam client command method?

Major__ 02-09-2007 16:22

Re: force team join
 
Well. i think its a bit "ugly" to use...

Besides, i want to block all usage of jointeam and chooseteam-menus...

VEN 02-10-2007 03:57

Re: force team join
 
If you would compare the both ways, jointeam method should be better. I do not see why it can be "ugly", well let's say so. But the first way is much more ugly/hacky, so anyway... I'd prefer just to emulate join* commands to let the game do all other stuff itself, like proper spawn etc, instead of recoding the whole join functionality. Anyway if you feel like not going efficient way, it's your choice.

Major__ 02-11-2007 08:04

Re: force team join
 
yeah. i get your ponit.

So, how do i block the meny "Select team" from appering at all? (The menu after motd)

[ --<-@ ] Black Rose 02-11-2007 08:49

Re: force team join
 
Code:
public plugin_init()     register_event("ShowMenu", "block_ChooseTeam", "b", "3=#Team_Select_Spect") public block_ChooseTeam(id)     show_menu(id, 0, " ", 1, "#Team_Select_Spect")

VEN 02-11-2007 11:22

Re: force team join
 
EDIT: here is the better example: Auto Join on Connect


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

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