gms_team_player_count doesn't count himself player?

Posted by ProFes
Use code on button:

On Click:
gms_team_join ( 2 );

On Draw:
var team0 = gms_team_player_count(1);
var team1 = gms_team_player_count(2);

draw_text(10, 400, team0)
draw_text(10, 430, team1)

Other players are shown, the player on your screen not. Bug or feature and how I can fix this?

Replies (1)

Last message on 24 Jan 2021

Size43 (Administrator) on 24 Jan 2021, 14:36:14
Apologies for the delay. If I understand correctly, this is intended behavior. The player 'on the screen' is not counted, just like with gms_other_count. If you want to also count the player, you should check the value returned by gms_team_get_current and add +1 to the team it indicates.