<PlayerEntity>.set_team(<value>)
<PlayerEntity>.team = <value>
<PlayerInfo>.change_team(<value>)
<PlayerEntity>.SetTeam(<value>)
<PlayerEntity>.InputSetTeam(<value>)
<PlayerEntity>.switch_team(<value>)
are there any differences???
reason i'm asking if because:
on deathrun maps i want 1 T and rest CT
and on round end i switch the T to CT and randomly pick a CT to be switched to T
i tried <PlayerEntity>.switch_team(<value>)
but if the original T was alive at round end he stays on T's side of the map next round but if T is dead he will stay dead forever..... unless he quit and connect again.....
vice versa for CT
really annoying....
CSGO
changing teams
- L'In20Cible
- Project Leader
- Posts: 1533
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
They are all the same except for PlayerEntity.switch_team. If you look at the code, you will see that, PlayerEntity.get_team is wrapping PlayerInfo.get_team_index, PlayerEntity.set_team is wrapping PlayerInfo.change_team and that PlayerEntity.team is just a shortcut property that wraps both wrappers. Then, if you look at the SDK, you will see that PlayerEntity.SetTeam and PlayerEntity.InputSetTeam are both wrapping the same input function. Now, if you check the data, you will see that PlayerEntity.switch_team is dynamically calling CBasePlayer::ChangeTeam. This is the one you want to use if you want to keep the player alive while changing his team.
satoon101 wrote:This has been asked a few times before:
http://www.sourcepython.com/showthread.php?506
yea i know bout that thread just wondering if any of them actually switches player's team
this changes the player's pending team but no the actual team
<PlayerEntity>.set_team(<value>)
<PlayerEntity>.team = <value>
<PlayerInfo>.change_team(<value>)
<PlayerEntity>.SetTeam(<value>)
<PlayerEntity>.InputSetTeam(<value>)
this changes the player's team but when new round starts weird stuff happens (ex: player stays dead... )
<PlayerEntity>.switch_team(<value>)
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 162 guests