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

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


Post New Thread Reply   
 
Thread Tools Display Modes
NikolaTesla
Junior Member
Join Date: May 2018
Location: Brazil
Old 09-07-2018 , 23:44   Re: [CS:GO] Final and fancy solution for putting a player in a team on connect
Reply With Quote #51

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

Last edited by NikolaTesla; 09-07-2018 at 23:45.
NikolaTesla is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 09-08-2018 , 07:22   Re: [CS:GO] Final and fancy solution for putting a player in a team on connect
Reply With Quote #52

Quote:
Originally Posted by NikolaTesla View Post
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.
Ilusion9 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 06:32.


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