Well, this can easilly be done with something like that, I guess.[PYTHON]from events import Event
from players.entity import PlayerEntity
silent_players = set()
def switch_team(player, team_index, silent=False):
if silent:
silent_players.add(player.userid)
player.switch_team(team_index)
silent_players.discard(player.userid)
@Event
def player_team(game_event):
if game_event.get_int('userid') not in silent_players:
return
game_event.set_bool('silent', True)[/PYTHON]This will only work on CS:GO, tho since OrangeBox games are not supporting the "silent" variable. Also, the symbol for CBasePlayer::ChangeTeam in the cstrike.ini file is wrong. The right one is "_ZN11CBasePlayer10ChangeTeamEi" since it only accepts the teamid as parameter.
need working script that acutally switches player for csgo
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
hello its me again what number do I use to switch player to spectator?? i tried 0,1,4,5 already but doesn't work
Code: Select all
CCSPlayer::SwitchTeam( 4 ) - invalid team index.
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 145 guests