Raised This Month: $ Target: $400
 0% 

VIP green chat no log messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 05-02-2017 , 06:50   VIP green chat no log messages
Reply With Quote #1

if(IsPlayerVip(client))
{
char sTextToAll[192];
GetCmdArgString(sTextToAll, sizeof(sTextToAll));
StripQuotes(sTextToAll);
int team = GetClientTeam(client);

if(IsPlayerAlive(client) && team == CS_TEAM_T || team == CS_TEAM_CT) {
for(int i = 1; i <= MaxClients; i++) {
if(IsClientInGame(i) && sTextToAll[0] != '@' && sTextToAll[0] != '/' && sTextToAll[0] != '!') {
int PlayersTeam = GetClientTeam(i);
if(PlayersTeam & team && sTextToAll[0] > 0) {
if(team == CS_TEAM_T){
CPrintToChat(i, "{red}[VIP] %N : {green}%s", client, sTextToAll);
} else {
CPrintToChat(i, "{blue}[VIP] %N : {green}%s", client, sTextToAll);
}
}
}
}
}
}

Working chat green but not log in hlx db - no messages from vips
BassPower is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 05-02-2017 , 06:57   Re: VIP green chat no log messages
Reply With Quote #2

Code belongs in code or php blocks.
__________________
Neuro Toxin is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 05-02-2017 , 07:14   Re: VIP green chat no log messages
Reply With Quote #3

Quote:
Originally Posted by Neuro Toxin View Post
Code belongs in code or php blocks.
sourcemod here for csgo - not all code here if you see why "for(int i = 1; i <= MaxClients; i++)" ... i check players spec, alive or dead to print

Last edited by BassPower; 05-02-2017 at 07:17.
BassPower is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 05-03-2017 , 00:31   Re: VIP green chat no log messages
Reply With Quote #4

Just hook the msg by using CCC and than edit it like this:

PHP Code:
public Action CCC_OnChatMessage(authorString:message[], maxlen);
{
    if(
IsplayerVIP[author])
    {
        
int team GetClientTeam(author);
        if(
team == CS_TEAM_T)
        {
            
Format(message"T Team - message - Edit this")
        }
        if(
team == CS_TEAM_CT)
        {
            
Format(message"CT Team - message - Edit this")
        }
    }

__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 05-06-2017 , 18:17   Re: VIP green chat no log messages
Reply With Quote #5

You'd have to log the chat message manually yourself.
https://wiki.alliedmods.net/Generic_...ts#player_chat
https://forums.alliedmods.net/showthread.php?t=100084
__________________
Peace-Maker 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 18:07.


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