Raised This Month: $119 Target: $400
 29% 

[CS:GO] surpressing event "player_team" will lead to not closing the teamselect page


Post New Thread Reply   
 
Thread Tools Display Modes
beastedout
Member
Join Date: Aug 2018
Old 08-29-2018 , 04:11   Re: [CS:GO] surpressing event "player_team" will lead to not closing the teamselect p
Reply With Quote #11

Quote:
Originally Posted by Ilusion9 View Post
PHP Code:

HookEvent
("player_team"Event_PlayerTeamEventHookMode_Pre);

public 
Action Event_PlayerTeam(Event event, const char[] namebool dontBroadcast
{
    if(!
event.GetBool("disconnect"))
        
event.SetBool("silent"true);

Working!
beastedout is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 08-31-2018 , 15:40   Re: [CS:GO] surpressing event "player_team" will lead to not closing the teamselect p
Reply With Quote #12

Quote:
Originally Posted by Ilusion9 View Post
PHP Code:

HookEvent
("player_team"Event_PlayerTeamEventHookMode_Pre);

public 
Action Event_PlayerTeam(Event event, const char[] namebool dontBroadcast
{
    if(!
event.GetBool("disconnect"))
        
event.SetBool("silent"true);

Perfectly working! Thanks man! (and sorry for the late response. didn't find the time to test it untill now)

One Question: Is there any special reason to exclude disconnect? If I would like to surpress the disconnect message as well, I just delete this line, correct?
fragnichtnach is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 09-01-2018 , 06:55   Re: [CS:GO] surpressing event "player_team" will lead to not closing the teamselect p
Reply With Quote #13

Quote:
Originally Posted by fragnichtnach View Post
One Question: Is there any special reason to exclude disconnect? If I would like to surpress the disconnect message as well, I just delete this line, correct?
yes
Ilusion9 is offline
xtance
Junior Member
Join Date: Feb 2018
Old 10-31-2020 , 08:19   Re: [CS:GO] surpressing event "player_team" will lead to not closing the teamselect p
Reply With Quote #14

Quote:
Originally Posted by Ilusion9 View Post
PHP Code:

HookEvent
("player_team"Event_PlayerTeamEventHookMode_Pre);

public 
Action Event_PlayerTeam(Event event, const char[] namebool dontBroadcast
{
    if(!
event.GetBool("disconnect"))
        
event.SetBool("silent"true);

Weird, teamselect menu is still bugged after this and team needs to be selected twice
xtance is offline
FAQU
Junior Member
Join Date: Sep 2020
Location: Romania
Old 11-07-2020 , 03:22   Re: [CS:GO] surpressing event "player_team" will lead to not closing the teamselect p
Reply With Quote #15

Quote:
Originally Posted by xtance View Post
Weird, teamselect menu is still bugged after this and team needs to be selected twice
Make sure you DON'T return Plugin_Handled.
FAQU is offline
xtance
Junior Member
Join Date: Feb 2018
Old 11-21-2020 , 19:53   Re: [CS:GO] surpressing event "player_team" will lead to not closing the teamselect p
Reply With Quote #16

Quote:
Originally Posted by FAQU View Post
Make sure you DON'T return Plugin_Handled.
Yes, it finally worked, just forgot to edit post
PHP Code:
public Action Event_PlayerTeam(Event event, const char[] namebool dontBroadcast) {
    if (
dontBroadcast || event.GetBool("disconnect")) return Plugin_Continue;
    
event.SetBool("silent"true);
    return 
Plugin_Changed;

xtance is offline
Reply


Thread Tools
Display Modes

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:54.


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