AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fix The Bug of Chat... (https://forums.alliedmods.net/showthread.php?t=295436)

D3XT3R 03-25-2017 17:09

Fix The Bug of Chat...
 
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



OciXCrom 03-25-2017 17:23

Re: Fix The Bug of Chat...
 
Make the plugin "lastest" in plugins.ini :3

D3XT3R 03-25-2017 17:26

Re: Fix The Bug of Chat...
 
Quote:

Originally Posted by OciXCrom (Post 2506733)
Make the plugin "lastest" in plugins.ini :3

:3 thanx for this help but i dont need yours great gold comment :3 i need solution :3 not a comment and i know you will do yours best to help me :3 so help me :D :v :3

fysiks 03-25-2017 17:42

Re: Fix The Bug of Chat...
 
Quote:

Originally Posted by D3XT3R (Post 2506734)
:3 thanx for this help but i dont need yours great gold comment :3 i need solution :3 not a comment and i know you will do yours best to help me :3 so help me :D :v :3

His "comment" is the solution. Unfortunately, for someone who doesn't speak english, it might be hard to understand.

It means that you need to put this plugin which you posted about at the bottom of plugins.ini.

D3XT3R 03-25-2017 17:54

Re: Fix The Bug of Chat...
 
Quote:

Originally Posted by fysiks (Post 2506738)
His "comment" is the solution. Unfortunately, for someone who doesn't speak english, it might be hard to understand.

It means that you need to put this plugin which you posted about at the bottom of plugins.ini.

i think he jocking -.-, my fault i dont understand good english and by word "buttom" you mean at first of plugins or what?

fysiks 03-25-2017 17:59

Re: Fix The Bug of Chat...
 
Quote:

Originally Posted by D3XT3R (Post 2506740)
i think he jocking -.-, my fault i dont understand good english and by word "buttom" you mean at first of plugins or what?

bottom

D3XT3R 03-25-2017 18:00

Re: Fix The Bug of Chat...
 
Quote:

Originally Posted by fysiks (Post 2506743)
Well, you could easily search for what it means. Make sure that you actually spell it correctly.

Well, i need plugin help hier not english help lesson....................

D3XT3R 03-25-2017 18:01

Re: Fix The Bug of Chat...
 
....
Quote:

Bottom est une série télévisée britannique, en 18 épisodes de 30 minutes, créée par Adrian Edmondson et Rik Mayall et diffusée entre le 17 septembre 1991 et le 10 février 1995 sur BBC Two. En France, la série a été diffusée sur Jimmy.

D3XT3R 03-25-2017 18:02

Re: Fix The Bug of Chat...
 
so i need watch that film to plugin get fixet? or i need add the film in the server to chat work perfectly :3

fysiks 03-25-2017 18:02

Re: Fix The Bug of Chat...
 
Quote:

Originally Posted by D3XT3R (Post 2506744)
Well, i need plugin help hier not english help lesson....................

Well, you are on an english forum. Use a translator.


All times are GMT -4. The time now is 17:58.

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