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

Connect message only for the founder


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-25-2019 , 14:35   Re: Connect message only for the founder
Reply With Quote #11

There's no such thing as "what colorchat he's using". You can choose whichever you want and use it in the plugin. It's not a server-side thing unless we're talking about the 1.9 built-in functions.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-26-2019 , 05:36   Re: Connect message only for the founder
Reply With Quote #12

Quote:
Originally Posted by NTXZ View Post
The server is not mine, but I am part of building it ... I do not have FTP access, I do not know which colorchat it uses
PHP Code:
#include < amxmodx >


new const g_szPrivilegedSteamIds[ ] =
{
    
"STEAM_0:0:171705149"
}

new const 
g_szMessage[ ] = "^3[^4CS^3] ^4The founder of this server has connected";

public 
plugin_init( )
{
    
register_plugin"Connect Messages""1.0""DoNii" );
}

public 
client_authorizedid )
{
    new 
szSteamId32 ];
    
get_user_authididszSteamIdcharsmaxszSteamId ) );

    for( new 
isizeof g_szPrivilegedSteamIdsi++ )
    {
        if( 
equalszSteamIdg_szPrivilegedSteamIds] ) )
        {
            
color_message(id,g_szMessage )  ;
            break;
        }
        continue;
    }
}
 

stock color_message(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)

    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!team""^3"// Team Color
    
replace_all(msg190"!team2""^0"// Team2 Color

    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

THIS WILL WORK

IF SOME MISTAKE PLEASE CORRECT ME (I tried cromchat but the "CC_SENDMESSAGE" was not becoming red and giving invalid function call )

for color use this code before word to add color

^3 = TEAM COLOR
^4 = GREEN COLOR
^1 = YELLOW OR DEFAULT

ONLY FOR CROMCHAT OR COLORCHAT

^7 = RED COLOR
^6 = BLUE COLOR
__________________
SED LYF !!!

Last edited by SHIELD755; 03-26-2019 at 22:00.
SHIELD755 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-26-2019 , 08:37   Re: Connect message only for the founder
Reply With Quote #13

Quote:
Originally Posted by OciXCrom View Post
There's no such thing as "what colorchat he's using". You can choose whichever you want and use it in the plugin. It's not a server-side thing unless we're talking about the 1.9 built-in functions.
There are different named stocks for colorchat, client_print_color(), ColorChat(), and I thought he wanted to stick to his include file, obviously if he had one.
__________________
edon1337 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 03-26-2019 , 08:43   Re: Connect message only for the founder
Reply With Quote #14

^7 = red color
^6 = blue color

what?
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-26-2019 , 10:21   Re: Connect message only for the founder
Reply With Quote #15

Quote:
Originally Posted by iceeedr View Post
^7 = red color
^6 = blue color

what?




the ^7 and 6^ have color as you can see them in pic and also i know that the code which i paste don't have this color (MAYBE) but for information only i paste (if he use cromchat ,or colorchat)
__________________
SED LYF !!!
SHIELD755 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 03-26-2019 , 10:23   Re: Connect message only for the founder
Reply With Quote #16

Code:
replace_all(msg, 190, "!g", "^4") // Green Color
    replace_all(msg, 190, "!y", "^1") // Default Color
    replace_all(msg, 190, "!team", "^3") // Team Color
    replace_all(msg, 190, "!team2", "^0") // Team2 Color
MAYBE? ok kkkkkk
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-26-2019 , 14:17   Re: Connect message only for the founder
Reply With Quote #17

@SHIELD775 - why did you include my <cromchat> library and used a totally different stock in the code?...
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-26-2019 , 21:59   Re: Connect message only for the founder
Reply With Quote #18

Quote:
Originally Posted by OciXCrom View Post
@SHIELD775 - why did you include my <cromchat> library and used a totally different stock in the code?...
ohh , actually first i try your cromchat but it was not working(maybe any mistake by me ) so i use stock
__________________
SED LYF !!!
SHIELD755 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 17:41.


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