CSGO: disable "Game_Commencing"

Please post any questions about developing your plugin here. Please use the search function before posting!
nullable
Senior Member
Posts: 137
Joined: Sat Nov 08, 2014 7:22 pm

CSGO: disable "Game_Commencing"

Postby nullable » Sat Aug 08, 2015 7:34 am

Hello,

Please help me to disable Game_Commencing.

Code: Select all

L 08/08/2015 - 07:23:11: World triggered "Game_Commencing"


Is it possible?
nullable
Senior Member
Posts: 137
Joined: Sat Nov 08, 2014 7:22 pm

Postby nullable » Sat Aug 08, 2015 10:02 am

After change from player.switch_team(team_id) to player.set_team(team_id) in player_activate event the problem has been resolved. Is it new feature in new sourcepython or it's bug?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Mon Aug 10, 2015 5:28 am

Is 'what' a new feature or bug in Source.Python? I don't really understand what you are asking here.


set_team is calling the internal IPlayerInfo::ChangeTeam member function. This function is exposed to us directly in the SDK.
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/players/entity.py#L126
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/players/players_wrap.cpp#L86


switch_team is calling the internal CCSPlayer::SwitchTeam member function. This function is not exposed to us directly, so we have to find the function dynamically with its symbol (Linux) or signature (Windows):
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/data/source-python/entities/orangebox/cstrike/CCSPlayer.ini#L20


There are differences between the two functions, which is why the second was added. For instance, switch_team does not kill the player when switching teams, and you can only use it to switch to an actual team, not spectate.
Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 151 guests