AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Change users team without restrictions? (https://forums.alliedmods.net/showthread.php?t=2502)

ThantiK 06-06-2004 23:40

Change users team without restrictions?
 
Is there possibly a way to change a users team without restriction?...

I dont want to do the "choosteam" function serverside and do it that way, but I want to change their team without intervention from the server to make sure I dont get any "you can only change teams once every round" problems.

This is for a plugin I'm making so 5v5...CT kills a T, he comes to your side and spawns as a CT...but if he gets killed by a T after the switch, he switches back to terrorist...

Also, would it be possible to make 4x teams on CS?...like a TFC deal...red, blue, green, yellow, etc?

Johnny got his gun 06-07-2004 05:43

For CS you can look through the CS include file to find:

Code:
/* Get team directly from player's entity.  * 1 = terrorist  * 2 = counter-terrorist  * 3 = spectator  */ enum CsTeams {     CS_TEAM_T = 1,     CS_TEAM_CT = 2,     CS_TEAM_SPECTATOR = 3 }; native cs_get_user_team(index); /* Set user team without killing player.  * If model is anything other than CS_DONTCHANGE, that will be set as player's model.  */ enum CsInternalModel {     CS_DONTCHANGE = 0,     CS_CT_URBAN = 1,     CS_T_TERROR = 2,     CS_T_LEET = 3,     CS_T_ARCTIC = 4,     CS_CT_GSG9 = 5,     CS_CT_GIGN = 6,     CS_CT_SAS = 7,     CS_T_GUERILLA = 8,     CS_CT_VIP = 9 }; native cs_set_user_team(index, team, model = CS_DONTCHANGE);

You could play around with setting team to other things than 1, 2 and 3(t, ct, spectator). It should be possible to make more teams, however you would have to do a number of other things to keep the game sane: Invent a system to make players in other teams spawn at other places around the map, you wouldn't want them to spawn among T or CT etc...
Also you would want to set some new set of models on new teams, to make it easy to tell friend from foe.
Might be other problems with this, but could be worth a try...

ThantiK 06-07-2004 09:08

Nice, thanks jghg -- I'm working on my conversion plugin and it's actually become a heck of a lot easier than I originally expected.

CT kills T, find player model of the CT, change T's team and change his playermodel...once everyone is converted to CT or T or whatever, have their original team stored and put them back on it.

It gets really hectic...lol Especially paired with my mirrordmg plugin that makes sure they cannot do something like:
Get killed by CT, convert to CT, shoot CT enabling T's to win.

I should be releasing this pretty simple plugin as soon as amx 0.20 is released.

Johnny got his gun 06-07-2004 09:49

Looks like a cool plugin. So it's like the team that frags the most gets more team members - and only way to change that is for the other team to frag back and thus get team members back?

ThantiK 06-07-2004 13:56

Yea, thats the idea.


All times are GMT -4. The time now is 14:51.

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