Thread
:
Can't teamswap dead players
View Single Post
GoldNux
Senior Member
Join Date: Mar 2018
11-05-2022 , 11:03 Re: Can't teamswap dead players
#
4
Adding user_silentkill(id) solved this problem for me!
edit: nvm it did not.. wtf
There seems to be something wrong with cs_get_user_team when player is dead.
This works:
cs_set_user_team(id, CS_TEAM_CT)
This does not:
cs_set_user_team(id, (cs_get_user_team(id) == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T)
I printed the value of cs_get_user_team and got:
thrun_crash_future
Then I ran it again and it printed:
ngelevel_mapname
get_players(players, playercount, "he", "T") Does also not seem to be working properly.
Damn, I'm lost.
For some reason I could use this:
cs_set_user_team(id, (cs_get_user_team(id) == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T)
in a function triggered by the Ham_Killed...
Last edited by GoldNux; 11-05-2022 at
13:36
.
GoldNux
View Public Profile
Send a private message to GoldNux
Find More Posts by GoldNux