AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   acronym (https://forums.alliedmods.net/showthread.php?t=335565)

SHIFT0 12-14-2021 13:35

acronym
 
Hi guys
i want a acronym
GREEN COLOR
Like
slm = Slam Alikom = Green Color
gg = Good Game !
gj = Good Job !
gl = Good Luck !
cya = See you later !
bb = Bye Bye !
w3s = We Alikom Al Salam
ws = Walikom Salam
hf = Have Fun !
wd = Well Done !
wl = Well Played !

All this will be GREEN CHAT

ANy one ?

Yusochan 12-14-2021 22:55

Re: acronym
 
https://forums.alliedmods.net/showth...36886?p=236886

Example :
Write on advertisements.ini :
Code:

!gSalam Alikom
@slm~!gSalam Alikom


SHIFT0 12-15-2021 04:33

Re: acronym
 
Quote:

Originally Posted by Yusochan (Post 2766056)
https://forums.alliedmods.net/showth...36886?p=236886

Example :
Write on advertisements.ini :
Code:

!gSalam Alikom
@slm~!gSalam Alikom


Nah bro
not this
is look like this
null. : Slm
Slam Alikom
i no want this
I want when say ex:
null. : slm
all will see the message not slm
Slam Alikom the msg will show to u and to him

is just acronym

Yusochan 12-15-2021 07:44

Re: acronym
 
Quote:

Originally Posted by SHIFT0 (Post 2766078)
Nah bro
not this
is look like this
null. : Slm
Slam Alikom
i no want this
I want when say ex:
null. : slm
all will see the message not slm
Slam Alikom the msg will show to u and to him

is just acronym

Try it !
i gave you an example

SHIFT0 12-15-2021 07:53

Re: acronym
 
Quote:

Originally Posted by Yusochan (Post 2766104)
Try it !
i gave you an example

Bro i know this before u said it !
and it look like this
null.: slm
!gSlam Alikom

wtf ?

fysiks 12-16-2021 00:13

Re: acronym
 
It is difficult to understand your posts. Are you simply saying that you just don't want the original chat message to show up when one of these is triggered?

iclassdon 12-16-2021 02:49

Re: acronym
 
Give this a try, will need some editing. If not search for word replacement.

https://forums.alliedmods.net/showpo...79&postcount=7

SHIFT0 12-16-2021 03:43

Re: acronym
 
Quote:

Originally Posted by fysiks (Post 2766171)
It is difficult to understand your posts. Are you simply saying that you just don't want the original chat message to show up when one of these is triggered?

Yes bro
Ex :
say: gg
=
%name : Good Game ! = GREEN CHAT

Celena Luna 12-16-2021 04:09

Re: acronym
 
Quote:

Originally Posted by iclassdon (Post 2766182)
Give this a try, will need some editing. If not search for word replacement.

https://forums.alliedmods.net/showpo...79&postcount=7

Copying from this

PHP Code:

#include <amxmodx>

#define MAX_SAY_TEXT_LEN 128
#define MAX_KEYWORD_LEN 32
#define MAX_HIGHLIGHT_LEN 32

enum Match
{
    
Keyword[MAX_KEYWORD_LEN],
    
Highlight[MAX_HIGHLIGHT_LEN]
};

new 
g_ChatKeywords[][Match] =
{
    {
"gg""!x04Good Game !"}, //!x01 is yellow color | !x03 is team color | !x04 is green color
    
{"slm""!x04Slam Alikom"}
};

new 
g_msgSayText;

public 
plugin_init()
{
    
register_clcmd("say""@OnCmd_Say");
    
g_msgSayText get_user_msgid("SayText")
}

@
OnCmd_Say(id)
{
    new 
szText[MAX_SAY_TEXT_LEN];
    
read_args(szTextcharsmax(szText));

    
remove_quotes(szText);
    
trim(szText);

    if (!
szText[0])
        return 
PLUGIN_CONTINUE;

    for (new 
iPattern 0szHighlight[MAX_HIGHLIGHT_LEN], iPatterns sizeof(g_ChatKeywords); iPattern iPatternsiPattern++)
    {
        if (
containi(szTextg_ChatKeywords[iPattern][Keyword]) == -1)
            continue;

        
format(szHighlightcharsmax(szHighlight), "%s^1"g_ChatKeywords[iPattern][Highlight]);
        
replace_all(szTextcharsmax(szText), g_ChatKeywords[iPattern][Keyword], szHighlight);
    }

    
// %n was added on 1.9, but it directly parses a certain client's name.
    
ColorChat(0"!x04%n%s!x01: %s"idis_user_alive(id) ? "" " !x01*(DEAD)*!x01"szText);
    return 
PLUGIN_HANDLED;


stock ColorChat(const id, const input[], any:...) {
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!x04""^4");
    
replace_all(msg190"!x03""^3");
    
    if(
idplayers[0] = id;
    else 
get_players(playerscount"ch"); {
        for(new 
0counti++) {
            if(
is_user_connected(players[i])) {
                
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }


You should be able to add the rest

SHIFT0 12-16-2021 04:12

Re: acronym
 
Quote:

Originally Posted by Celena Luna (Post 2766193)
Copying from this

PHP Code:

#include <amxmodx>

#define MAX_SAY_TEXT_LEN 128
#define MAX_KEYWORD_LEN 32
#define MAX_HIGHLIGHT_LEN 32

enum Match
{
    
Keyword[MAX_KEYWORD_LEN],
    
Highlight[MAX_HIGHLIGHT_LEN]
};

new 
g_ChatKeywords[][Match] =
{
    {
"gg""^4Good Game !"}, //^1 is yellow color | ^3 is team color | ^4 is green color
    
{"slm""^4Slam Alikom"}
};

public 
plugin_init()
{
    
register_clcmd("say""@OnCmd_Say");
}

@
OnCmd_Say(id)
{
    new 
szText[MAX_SAY_TEXT_LEN];
    
read_args(szTextcharsmax(szText));

    
remove_quotes(szText);
    
trim(szText);

    if (!
szText[0])
        return 
PLUGIN_CONTINUE;

    for (new 
iPattern 0szHighlight[MAX_HIGHLIGHT_LEN], iPatterns sizeof(g_ChatKeywords); iPattern iPatternsiPattern++)
    {
        if (
containi(szTextg_ChatKeywords[iPattern][Keyword]) == -1)
            continue;

        
format(szHighlightcharsmax(szHighlight), "%s^1"g_ChatKeywords[iPattern][Highlight]);
        
replace_all(szTextcharsmax(szText), g_ChatKeywords[iPattern][Keyword], szHighlight);
    }

    
// %n was added on 1.9, but it directly parses a certain client's name.
    
client_print_color(0id"^3%n%s^1: %s"idis_user_alive(id) ? "" " ^1*(DEAD)*^1"szText);
    return 
PLUGIN_HANDLED;


You should be able to add the rest

TY
just one
error

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "client_print_color" on line 45

1 Error.
Could not locate output file C:\Games\Counter-Strike\cstrike\addons\amxmodx\scripting\C4.am x (compile failed).


All times are GMT -4. The time now is 00:16.

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