Raised This Month: $ Target: $400
 0% 

Add prefix say


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
radussteam
Junior Member
Join Date: Sep 2014
Old 12-30-2014 , 04:24   Add prefix say
Reply With Quote #1

Hello,

Please add prefix [VIP] on say / say_team

HTML Code:
#include <sourcemod>  
#include <sdktools> 
#include <cstrike> 

public Plugin:myinfo =   
{  
    name = "Simple VIP plugin",  
    author = "ESK0",  
    description = "Simple VIP plugin for radussteam",  
    version = "1.0",  
    url = "www.cs.overcore.eu"  
}  

public OnPluginStart()  
{  
    HookEvent("round_start", roundStart);  
}  
public Action:roundStart(Handle:event, const String:name[], bool:dontBroadcast)  
{  
    for ( new client = 1 ; client <= MaxClients+1 ; client++){  
        if (IsValidClient(client, true)){  
            if (GetAdminFlag(GetUserAdmin(client), Admin_Custom1)){  
                decl CurrentMoney;  
                CurrentMoney = GetEntProp(client, Prop_Send, "m_iAccount");  
                SetEntProp(client, Prop_Send, "m_iAccount", CurrentMoney + 250);  
                GivePlayerItem(client, "weapon_hegrenade");  
                GivePlayerItem(client, "weapon_smokegrenade");  
                GivePlayerItem(client, "weapon_decoy");  
                GivePlayerItem(client, "weapon_flashbang");  
                GivePlayerItem(client, "weapon_molotov");  
                 
                CS_SetClientClanTag(client, "[V.I.P]"); 
            }  
        }  
    }  
}  
stock bool:IsValidClient(client, bool:alive = false)  
{  
    return (client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (alive == false || IsPlayerAlive(client)));  
}
radussteam is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 12-30-2014 , 12:16   Re: Add prefix say
Reply With Quote #2

PHP Code:
#include <sourcemod>

public OnPluginStart()
{
    
AddCommandListener(HookPlayerChat_All"say");
    
AddCommandListener(HookPlayerChat_Team"say_team");
}

public 
Action:HookPlayerChat_All(client, const String:command[], args)
{
    new 
AdminId:aID GetUserAdmin(client);
    
    if (
GetAdminFlag(aIDAdmin_Custom1))
    {
        new 
String:text[256];
        
GetCmdArg(1textsizeof(text));
        
        if (
text[0] == '/' || text[0] == '@' || IsChatTrigger())
        {
            return 
Plugin_Handled;
        }
        
        
PrintToChatAll("[VIP] %N: %s"clienttext);
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;
}

public 
Action:HookPlayerChat_Team(client, const String:command[], args)
{
    new 
AdminId:aID GetUserAdmin(client);
    
    if (
GetAdminFlag(aIDAdmin_Custom1))
    {
        new 
String:text[256];
        
GetCmdArg(1textsizeof(text));
        
        if (
text[0] == '/' || text[0] == '@' || IsChatTrigger())
        {
            return 
Plugin_Handled;
        }
        for (new 
1<= MaxClientsi++)
        {
            if (
IsClientInGame(i) && IsClientConnected(i))
            {
                if (
GetClientTeam(client) == GetClientTeam(i))
                {
                    
PrintToChat(i"[VIP](Team) %N: %s"clienttext);
                    return 
Plugin_Handled;
                }
            }
        }
    }
    return 
Plugin_Continue;


Last edited by Darkness_; 12-30-2014 at 12:17.
Darkness_ is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-30-2014 , 16:58   Re: Add prefix say
Reply With Quote #3

https://forums.alliedmods.net/showth...chat+processor
https://forums.alliedmods.net/showth...ustom+chat+tag
__________________
Neuro Toxin is offline
radussteam
Junior Member
Join Date: Sep 2014
Old 12-31-2014 , 15:18   Re: Add prefix say
Reply With Quote #4

say_team is not working
radussteam 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 23:11.


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