Raised This Month: $ Target: $400
 0% 

Fix The Bug of Chat...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-25-2017 , 17:09   Fix The Bug of Chat...
Reply With Quote #1

Hi, at first i will explain my problem:
my problem is when i say "/" or "!" its show normal chat not with thag admins and i tired deleted like

PHP Code:
    if(message[0] == '@' || message[0] == '/' || message[0] == '!' || equal(message"")) // Ignores Admin Hud Messages, Admin Slash commands, 
it show when i say / or ! normal with the tag but if ther is menu like vip menu and me said /vipmenu it wont work because that chat.....
so could some one fix this bug?

PHP Code:
public hook_say(id)
{
    if(!(
get_user_flags(id) & ADMIN_BAN))
        return 
PLUGIN_CONTINUE;
    
read_args(message191)
    
remove_quotes(message)
    
    
// Gungame commands and empty messages
    
if(message[0] == '@' || message[0] == '/' || message[0] == '!' || equal(message"")) // Ignores Admin Hud Messages, Admin Slash commands,
        
return PLUGIN_CONTINUE
    
    
new name[32]
    
get_user_name(idname31)
    
    new 
isAlive
    
    
if(is_user_alive(id))
    {
        
isAlive 1
        alive 
"^x01"
    
}
    else
    {
        
isAlive 0
        alive 
"^x01*DEAD* "
    
}
    
    static 
color[10]
    
get_user_team(idcolor9)
    
format(strName191"^x04[ADMINAS] %s^x03%s "alivename)
    
format(strText191"^x03%s"message)
    
format(message191"%s^x01: %s"strNamestrText)
    
sendMessage(colorisAlive)
    
    return 
PLUGIN_HANDLED
}
 
 
public 
hook_teamsay(id)
{
    if(!(
get_user_flags(id) & ADMIN_BAN))
        return 
PLUGIN_CONTINUE;
    new 
playerTeam get_user_team(id)
    new 
playerTeamName[19]
    
    switch(
playerTeam// Team names which appear on team-only messages
    
{
        case 
1:
            
copy(playerTeamName11"Terrorists")
    
        case 
2:
            
copy(playerTeamName18"Counter-Terrorists")
    
        default:
            
copy(playerTeamName9"Spectator")
    }
    
    
read_args(message191)
    
remove_quotes(message)
    
    
// Gungame commands and empty messages
    
if(message[0] == '@' || message[0] == '/' || message[0] == '!' || equal(message"")) // Ignores Admin Hud Messages, Admin Slash commands,
        
return PLUGIN_CONTINUE
    
    
new name[32]
    
get_user_name(idname31)
    
    
    new 
isAlive
    
    
if(is_user_alive(id))
    {
        
isAlive 1
        alive 
"^x01"
    
}
    else
    {
        
isAlive 0
        alive 
"^x01*DEAD* "
    
}
    
    static 
color[10]
    
color "TERRORIST"
    
format(strName191"%s(%s)^x04[ADMINAS] ^x03%s"aliveplayerTeamNamename)
    
copy(color9"TERRORIST")
    
format(strText191"^x03%s"message)
    
format(message191"%s ^x01: %s"strNamestrText)
    
sendTeamMessage(colorisAliveplayerTeam)
    
    return 
PLUGIN_HANDLED

__________________

Last edited by D3XT3R; 03-25-2017 at 17:11.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
 


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 17:58.


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