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

[Any] "[SM]" Prefix changer! UPDATE: March 22, 2013


Post New Thread Reply   
 
Thread Tools Display Modes
ae2x
Member
Join Date: Mar 2017
Old 09-06-2017 , 13:36   Re: [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
Reply With Quote #91

Quote:
Originally Posted by Cruze View Post
You can do that in rockthevote.phrases.txt which is placed in translations folder

I dont get it .. how?

I mean if i do that in rockthevote.phrases.txt i also need to edit rockthevote.sp to adding morecolors.inc right? or?
ae2x is offline
Cruze
Veteran Member
Join Date: May 2017
Old 09-07-2017 , 12:32   Re: [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
Reply With Quote #92

Quote:
Originally Posted by ae2x View Post
I dont get it .. how?

I mean if i do that in rockthevote.phrases.txt i also need to edit rockthevote.sp to adding morecolors.inc right? or?
First of all, are you using default rtv plugin?
__________________
Taking paid private requests! Contact me
Cruze is offline
ae2x
Member
Join Date: Mar 2017
Old 09-07-2017 , 15:16   Re: [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
Reply With Quote #93

Quote:
Originally Posted by Cruze View Post
First of all, are you using default rtv plugin?
Yes im.
ae2x is offline
Cruze
Veteran Member
Join Date: May 2017
Old 09-12-2018 , 08:01   Re: [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
Reply With Quote #94

Colors weren't working for me so I edited it a little and made it work for me. Then I decided to share it to you guys if colors weren't working for you guys too!
Installation:-
* Change "[My Server Tag]" to whatever you want
* Compile it and put .smx in plugins folder
* Done (.cfg file not needed in this version)

Ingame pic: click

PHP Code:
/* Colors available=>
\x01 = default
\x02 = darkred
\x03 = purple/teamcolor (idk)
\x04 = green
\x05 = lightgreen
\x06 = lime
\x07 = red
\x08 = grey
\x09 = yellow
\x0A = bluegrey
\x0B = blue
\x0C = darkblue
\x0D = grey2
\x0E = orchid
\x0F = lightred
\x10 = gold
*/
#include <sourcemod>

#pragma semicolon 1

#define MAXTEXTCOLORS 100

#define SERVER_TAG "[\x0CMy Server Tag\x01]"

// Plugin definitions
#define PLUGIN_VERSION "1.0"

public Plugin:myinfo =
{
    
name "Default SM Text Replacer",
    
author "Mitch/Bacardi/Cruze",
    
description "Replaces the '[SM]' text with more color!",
    
version PLUGIN_VERSION,
    
url ""
};



public 
OnPluginStart()
{
    
HookUserMessage(GetUserMessageId("TextMsg"), TextMsgtrue);
}
public 
Action:TextMsg(UserMsg:msg_idHandle:bf, const players[], playersNumbool:reliablebool:init)
{
    if(
reliable)
    {
        new 
String:buffer[256];
        
PbReadString(bf"params"buffersizeof(buffer), 0);
        if(
StrContains(buffer"[SM]") == 0
        {
            new 
Handle:pack;
            
CreateDataTimer(0.0timer_strippack);

            
WritePackCell(packplayersNum);
            for(new 
0playersNumi++)    
            {
                
WritePackCell(packplayers[i]);
            }
            
WritePackString(packbuffer);
            
ResetPack(pack);
            return 
Plugin_Handled;
        }
    }
    return 
Plugin_Continue;
}

public 
Action:timer_strip(Handle:timerHandle:pack)
{
    new 
playersNum ReadPackCell(pack);
    new 
players[playersNum];
    new 
clientcount;

    for(new 
0playersNumi++)
    {
        
client ReadPackCell(pack);
        if(
IsClientInGame(client))
        {
            
players[count++] = client;
        }
    }

    if(
count 1) return;
    
    
playersNum count;
    
    new 
String:buffer[255];
    
ReadPackString(packbuffersizeof(buffer));
    new 
String:QuickFormat[255];
    
Format(QuickFormatsizeof(QuickFormat), "%s"SERVER_TAG);
    
ReplaceStringEx(buffersizeof(buffer), "[SM]"QuickFormat);
    
    new 
Handle:bf StartMessage("SayText2"playersplayersNumUSERMSG_RELIABLE|USERMSG_BLOCKHOOKS);
    
//BfWriteString(bf, buffer);
    
PbSetInt(bf"ent_idx", -1);
    
PbSetBool(bf"chat"true);
    
PbSetString(bf"msg_name"buffer);
    
PbAddString(bf"params""");
    
PbAddString(bf"params""");
    
PbAddString(bf"params""");
    
PbAddString(bf"params""");
    
EndMessage();

__________________
Taking paid private requests! Contact me

Last edited by Cruze; 09-12-2018 at 08:20. Reason: fix
Cruze is offline
hartii14
Member
Join Date: Aug 2017
Old 01-13-2021 , 13:17   Re: [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
Reply With Quote #95

cant compile the plugin
hartii14 is offline
kraierm
New Member
Join Date: Jun 2021
Old 06-01-2021 , 05:24   Re: [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
Reply With Quote #96

Is there any way to replace the text from the title's menu?
kraierm 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 05:05.


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