Raised This Month: $51 Target: $400
 12% 

[CS:GO] Custom team join message bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
r3v
Senior Member
Join Date: Feb 2016
Location: Lithuania, Vilnius
Old 03-24-2019 , 07:47   [CS:GO] Custom team join message bug
Reply With Quote #1

I have strange bug before CS:GO Panorama update. If someone joining ct, t or spec, whey need to click second time with a mouse. Plugin: https://forums.alliedmods.net/showpo...1&postcount=45

Same problem with tidychat plugin: https://forums.alliedmods.net/showpo...&postcount=119

I uploading another lite version, and i don't know there in code have a bug. Without these, people can join without second mouse click. Can anyone wants find out a solution?

PHP Code:
#include <csgo_colors>
static const String:msg[][] = 
{
    
"joined {PURPLE}spectators",
    
"joined {RED}terrorists",
    
"joined {BLUE}counter-terrorists"
};

public 
OnPluginStart()
{
    
HookEvent("player_team"Event_TeamEventHookMode_Pre);
}

public 
Action:Event_Team(Handle:eventString:name[], bool:dontBroadcast)
{
    static 
clientteam;
    if(
dontBroadcast || GetEventBool(event,"disconnect") || GetEventBool(event,"silent")
    || !(
client GetClientOfUserId(GetEventInt(event,"userid"))) || (team GetEventInt(event,"team") - 1) < 0)
        return 
Plugin_Continue;

    
CGOPrintToChatAll("Player {GREEN}%N %s"clientmsg[team]);
    
SetEventBroadcast(eventtrue);

    return 
Plugin_Changed;

Attached Files
File Type: sp Get Plugin or Get Source (team_change_notify.sp - 42 views - 704 Bytes)
File Type: inc colors_csgo.inc (15.5 KB, 41 views)

Last edited by r3v; 03-24-2019 at 07:48.
r3v is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 03-24-2019 , 14:39   Re: [CS:GO] Custom team join message bug
Reply With Quote #2

If you read the next page from tidy chat
So maybe you dont nead to create new threads
Indarello is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 03-24-2019 , 16:16   Re: [CS:GO] Custom team join message bug
Reply With Quote #3

PHP Code:
event.SetBool("silent"true); 
instead of:

PHP Code:
SetEventBroadcast(eventtrue); 
__________________
Ilusion9 is offline
Reply



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 04:25.


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