Raised This Month: $ Target: $400
 0% 

Can't teamswap dead players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GoldNux
Senior Member
Join Date: Mar 2018
Old 11-05-2022 , 11:03   Re: Can't teamswap dead players
Reply With Quote #1

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 is offline
Reply



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 10:32.


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