AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [CS:GO] Final and fancy solution for putting a player in a team on connect (https://forums.alliedmods.net/showthread.php?t=300549)

NikolaTesla 09-07-2018 23:44

Re: [CS:GO] Final and fancy solution for putting a player in a team on connect
 
Quote:

Originally Posted by Ilusion9 (Post 2613095)
PHP Code:


AddCommandListener
(Command_JoinGame"joingame");

public 
Action Command_JoinGame(int client, const char[] commandint args)
{
    
SetEntPropFloat(clientProp_Send"m_fForceTeam"0.0);
    
SetEntProp(clientProp_Send"m_iPendingTeamNum"CS_TEAM_CT);


Another way to assign a team on connect. Tested only on local server.

Somehow this method causes a very strange bug. When people switch back to spectator and go watch a player they will become ghosts players. In my case I run a zombie server. Let's say someone go spectate a zombie. From that point and beyond the zombie won't be able to infect humans because spectator will magically exist in front/between of that zombie no matter where they go blocking the damage and we can also hear the stabbing sounds. So weird.

Ilusion9 09-08-2018 07:22

Re: [CS:GO] Final and fancy solution for putting a player in a team on connect
 
Quote:

Originally Posted by NikolaTesla (Post 2614223)
Somehow this method causes a very strange bug. When people switch back to spectator and go watch a player they will become ghosts players. In my case I run a zombie server. Let's say someone go spectate a zombie. From that point and beyond the zombie won't be able to infect humans because spectator will magically exist in front/between of that zombie no matter where they go blocking the damage and we can also hear the stabbing sounds. So weird.

then use player_connect_full method.


All times are GMT -4. The time now is 23:34.

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