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

silver/golden login notifier.


Post New Thread Reply   
 
Thread Tools Display Modes
Ibrahim
BANNED
Join Date: May 2012
Location: sharjah
Old 08-01-2012 , 12:47   Re: silver/golden login notifier.
Reply With Quote #11

Quote:
Originally Posted by ConnorMcLeod View Post
@Ibrahim
Multiple accounts are forbidden : http://forums.alliedmods.net/member.php?u=167948


@virtual
Don't use Ibrahim's code.
Try this :
PHP 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
    
<< ( 'l' 0x61 ), "Administrator"},
    { 
<< ( 's' 0x61 ) , "Golden Player"},
    { 
<< ( 't' 0x61 ) , "Silver Player"},
    { 
<< ( 'z' 0x61 ) , "Normal Player"}
}

public 
plugin_init() 

    
register_plugin("LOGIN Join notifer","0.1","yamin"


public 
client_authorized(id)
{
    new 
iFlags get_user_flags(id)
    for(new 
ii<sizeof(g_mAdminsDatas); i++)
    {
        if( 
iFlags g_mAdminsDatas[i][m_iFlag] )
        {
            new 
szName[32
            
get_user_name(idszNamecharsmax(szName))
#if defined __COLORCHAT
            
new iColor
            
switch( )
            {
                case 
0:iColor Red
                
case sizeof(g_mAdminsDatas)-1:iColor Grey
                
default:iColor Blue
            
}
            
client_print_color(0iColor"^1*** ^4%s^1 has logged in as ^3%s"szNameg_mAdminsDatas[i][m_szTag])
#else
            
client_print(0print_chat"*** %s has logged in as %s"szNameg_mAdminsDatas[i][m_szTag])
#endif
            
break
        }
    }

why not to use my code?
Ibrahim is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 08-01-2012 , 12:50   Re: silver/golden login notifier.
Reply With Quote #12

Oh , now understand , he use that number to later , do 108 ( 'l' value ) - 97 ( 'a' value ) , that return 11, no ? or i'm wrong ?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.

Last edited by lucas_7_94; 08-01-2012 at 12:50.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-01-2012 , 13:01   Re: silver/golden login notifier.
Reply With Quote #13

Quote:
Originally Posted by lucas_7_94 View Post
Oh , now understand , he use that number to later , do 108 ( 'l' value ) - 97 ( 'a' value ) , that return 11, no ? or i'm wrong ?
It's so you can edit flags easily just reporting letters you see in users.ini

'l' : 11 -> 1<<11 :

#define ADMIN_RCON (1<<11) /* flag "l" */


Didn't wanted to put 'l' - 'a' because it could be confusing, it is already enough


Quote:
Originally Posted by Ibrahim View Post
why not to use my code?
Because it is poorly coded, you check 3 times the same value.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-01-2012 at 13:02.
ConnorMcLeod is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 08-01-2012 , 13:05   Re: silver/golden login notifier.
Reply With Quote #14

Interesting Connor and Exolent , thanks you for explanation.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
dineshrohra
Junior Member
Join Date: Aug 2012
Location: Dubai, United Arab Emira
Old 08-30-2012 , 10:33   Re: silver/golden login notifier.
Reply With Quote #15

Quote:
Originally Posted by ConnorMcLeod View Post
@Ibrahim
Multiple accounts are forbidden : http://forums.alliedmods.net/member.php?u=167948


@virtual
Don't use Ibrahim's code.
Try this :
PHP 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
    
<< ( 'l' 0x61 ), "Administrator"},
    { 
<< ( 's' 0x61 ) , "Golden Player"},
    { 
<< ( 't' 0x61 ) , "Silver Player"},
    { 
<< ( 'z' 0x61 ) , "Normal Player"}
}

public 
plugin_init() 

    
register_plugin("LOGIN Join notifer","0.1","yamin"


public 
client_authorized(id)
{
    new 
iFlags get_user_flags(id)
    for(new 
ii<sizeof(g_mAdminsDatas); i++)
    {
        if( 
iFlags g_mAdminsDatas[i][m_iFlag] )
        {
            new 
szName[32
            
get_user_name(idszNamecharsmax(szName))
#if defined __COLORCHAT
            
new iColor
            
switch( )
            {
                case 
0:iColor Red
                
case sizeof(g_mAdminsDatas)-1:iColor Grey
                
default:iColor Blue
            
}
            
client_print_color(0iColor"^1*** ^4%s^1 has logged in as ^3%s"szNameg_mAdminsDatas[i][m_szTag])
#else
            
client_print(0print_chat"*** %s has logged in as %s"szNameg_mAdminsDatas[i][m_szTag])
#endif
            
break
        }
    }

ConnorMcLeod,
Where To Use This Script ?
dineshrohra is offline
itshamoodi
Junior Member
Join Date: Feb 2015
Location: Dubai, United Arab Emira
Old 02-12-2015 , 10:39   Re: silver/golden login notifier.
Reply With Quote #16

@ConnorMcLeod

I've tried compiling the script. it give's me an error which is.
Attached Thumbnails
Click image for larger version

Name:	Error.png
Views:	102
Size:	8.8 KB
ID:	142345  
__________________

You Are Freaking Out Man.
Thanks and Regards,
itshamoodi
itshamoodi is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 02-12-2015 , 15:07   Re: silver/golden login notifier.
Reply With Quote #17

you need to compile it locally, there is a related tutorial in my signature.
__________________
ANTICHRISTUS is offline
itshamoodi
Junior Member
Join Date: Feb 2015
Location: Dubai, United Arab Emira
Old 02-12-2015 , 16:37   Re: silver/golden login notifier.
Reply With Quote #18

@ANTICHRISTUS

So nice of you man. You're asking me to go through your whole tutorial just to get down to the solution of an error. Thank's a lot bro, Actually i'll go through it when i get some time so. But right now i'm in making of a server. I hope someone can directly help me with this error, rather than suggesting me to read long tutorials. and yeah @ANTICHRISTUS if you give me a specific tutorial for this "Error" only i would highly appreciate that and will go through it for sure.
__________________

You Are Freaking Out Man.
Thanks and Regards,
itshamoodi
itshamoodi is offline
itshamoodi
Junior Member
Join Date: Feb 2015
Location: Dubai, United Arab Emira
Old 02-12-2015 , 16:48   Re: silver/golden login notifier.
Reply With Quote #19

Here is what i actually do.
@ConnorMcLeod
It give's an error though, don't really know how to get rid of it. Please help me soon.
Attached Thumbnails
Click image for larger version

Name:	Compiling Process.png
Views:	82
Size:	26.8 KB
ID:	142353   Click image for larger version

Name:	Compile Error.png
Views:	104
Size:	7.7 KB
ID:	142354  
__________________

You Are Freaking Out Man.
Thanks and Regards,
itshamoodi
itshamoodi is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 02-12-2015 , 16:48   Re: silver/golden login notifier.
Reply With Quote #20

https://forums.alliedmods.net/showthread.php?t=130511
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
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 07:36.


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