Raised This Month: $ Target: $400
 0% 

[HELP] Color script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zoobb
Member
Join Date: Mar 2012
Old 08-02-2013 , 14:56   [HELP] Color script
Reply With Quote #1

Hey, I tried to change the script color but it's not working, for example

Code:
// #define __COLORCHAT

#include <amxmodx>

#if defined __COLORCHAT
#include <colorchat>
#endif

enum mDatas
{
    m_iFlag,
    m_szTag[32]
}

new const g_mAdminsDatas[][mDatas] = 
{
    // let from highest power to lowest
    { 1 << ( 'b' - 0x61 ), "Administrator"},
    { 1 << ( 't' - 0x61 ) , "Golden Player"},
    { 1 << ( 's' - 0x61 ) , "Silver Player"}
}

public plugin_init() 
{ 
    register_plugin("LOGIN Join notifer","0.1","yamin") 
} 

public client_authorized(id)
{
    new iFlags = get_user_flags(id)
    for(new i; i<sizeof(g_mAdminsDatas); i++)
    {
        if( iFlags & g_mAdminsDatas[i][m_iFlag] )
        {
            new szName[32] 
            get_user_name(id, szName, charsmax(szName))
#if defined __COLORCHAT
            new iColor
            switch( i )
            {
                case 0:iColor = Red
                case sizeof(g_mAdminsDatas)-1:iColor = Grey
                default:iColor = Blue
            }
            client_print_color(0, iColor, "*** %s has logged in as %s", szName, g_mAdminsDatas[i][m_szTag])
#else
            client_print(0, print_chat, "*** ^3%s ^4has ^4logged ^4in ^4as ^3%s***", szName, g_mAdminsDatas[i][m_szTag])
#endif
            break
        }
    }
}
Zoobb is offline
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 08-02-2013 , 17:44   Re: [HELP] Color script
Reply With Quote #2

what did you do?>
what do u want to changE?
You want it with colors?

// #define __COLORCHAT

enable it

Last edited by sami_spt; 08-02-2013 at 17:45.
sami_spt is offline
Zoobb
Member
Join Date: Mar 2012
Old 08-03-2013 , 05:14   Re: [HELP] Color script
Reply With Quote #3

Ok, after I enabled it, I got an error


Zoobb is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 08-03-2013 , 05:25   Re: [HELP] Color script
Reply With Quote #4

Quote:
Originally Posted by Zoobb View Post
Ok, after I enabled it, I got an error


question... do you have the colorchat include file in your scripting/includes folder?

ive compiled it with no errors

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

Header size:            544 bytes
Code size:             4100 bytes
Data size:              888 bytes
Stack/heap size:      16384 bytes; estimated max. usage=1105 cells (4420 bytes)
Total requirements:   21916 bytes
Done.
__________________

Last edited by Blizzard_87; 08-03-2013 at 05:26.
Blizzard_87 is offline
Zoobb
Member
Join Date: Mar 2012
Old 08-03-2013 , 05:33   Re: [HELP] Color script
Reply With Quote #5

Ok, so now I got another problem, I try to add colors but it's not working...
I did like what this guy said https://forums.alliedmods.net/showthread.php?t=149555

Last edited by Zoobb; 08-03-2013 at 05:51.
Zoobb is offline
Zoobb
Member
Join Date: Mar 2012
Old 08-03-2013 , 05:42   Re: [HELP] Color script
Reply With Quote #6

.....

Last edited by Zoobb; 08-03-2013 at 05:51.
Zoobb is offline
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 08-03-2013 , 05:52   Re: [HELP] Color script
Reply With Quote #7

Dont double post.
sami_spt is offline
Zoobb
Member
Join Date: Mar 2012
Old 08-03-2013 , 09:44   Re: [HELP] Color script
Reply With Quote #8

I double posted by mistake .
Zoobb is offline
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 08-03-2013 , 22:23   Re: [HELP] Color script
Reply With Quote #9

Quote:
Originally Posted by Zoobb View Post
Ok, so now I got another problem, I try to add colors but it's not working...
I did like what this guy said https://forums.alliedmods.net/showthread.php?t=149555


Post your code that you made (The 1 u edited it)
sami_spt is offline
Old 08-04-2013, 03:15
LordOfNothing
This message has been deleted by ConnorMcLeod. Reason: troll, or posting random confusing code, or posting for posts count
Zoobb
Member
Join Date: Mar 2012
Old 08-04-2013 , 05:22   Re: [HELP] Color script
Reply With Quote #10

nvm, I fixed it.
Zoobb 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 16:07.


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