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

silver/golden login notifier.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
virtual
BANNED
Join Date: Jul 2012
Old 08-01-2012 , 09:05   silver/golden login notifier.
Reply With Quote #1

Hey can som1 edit this script it shows all admin/golden/silver login notifier,
_____________________________________________ _____________________________________
PHP Code:
#include <amxmodx> 

public plugin_init() 

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


public 
client_putinserver(id)

    new 
name[32
    
get_user_name(id,name,31
     
    
    if(
get_user_flags(id) & ADMIN_BAN)
    { 
        
client_print(0,print_chat,"*** Administrator Login: %s is an Administrator",name
    } 

Silver player flag - S
Golden player flag - T
Pls Help
Thnx
virtual is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 08-01-2012 , 09:24   Re: silver/golden login notifier.
Reply With Quote #2

When a player joins , depending their flags send a message?
__________________
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
Ibrahim
BANNED
Join Date: May 2012
Location: sharjah
Old 08-01-2012 , 10:15   Re: silver/golden login notifier.
Reply With Quote #3

try this
PHP Code:
#include <amxmodx>

public plugin_init() 

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


public 
client_putinserver(id)

    new 
name[32
    
get_user_name(id,name,31
    
    if(
get_user_flags(id) & ADMIN_LEVEL_G)
    { 
        
client_print(0,print_chat,"*** Silver Player Login: %s is a Silver Player.",name
    } 
    
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
    { 
        
client_print(0,print_chat,"*** Golden Player Login: %s is a Golder Player.",name
    } 
    
    if(
get_user_flags(id) & ADMIN_BAN)
    { 
        
client_print(0,print_chat,"*** Administrator Login: %s is an Administrator.",name
    } 

Ibrahim is offline
talha
Senior Member
Join Date: Jul 2011
Location: On Earth
Old 08-01-2012 , 10:19   Re: silver/golden login notifier.
Reply With Quote #4

if ur name is very long this wont work
__________________
PLz do visit my sites
www.igcse.tk
www.alevel.tk
mY Steam
talha is offline
Send a message via Yahoo to talha
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-01-2012 , 10:24   Re: silver/golden login notifier.
Reply With Quote #5

Quote:
Originally Posted by talha View Post
if ur name is very long this wont work
Length of the player's name has nothing to do with this not working.
The plugin is fine as is. Care to elaborate more on what you meant?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-01-2012 , 10:33   Re: silver/golden login notifier.
Reply With Quote #6

@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
        }
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-01-2012 at 10:39.
ConnorMcLeod is offline
virtual
BANNED
Join Date: Jul 2012
Old 08-01-2012 , 10:42   Re: silver/golden login notifier.
Reply With Quote #7

ok thnx ConnorMcLeod
virtual is offline
virtual
BANNED
Join Date: Jul 2012
Old 08-01-2012 , 10:47   Re: silver/golden login notifier.
Reply With Quote #8

Thnx Ibrahim.
virtual is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 08-01-2012 , 12:25   Re: silver/golden login notifier.
Reply With Quote #9

Connor , what is 0x61 ?
__________________
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
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-01-2012 , 12:27   Re: silver/golden login notifier.
Reply With Quote #10

Quote:
Originally Posted by lucas_7_94 View Post
Connor , what is 0x61 ?
0x61 = 97 = 0b01100001 = 'a'
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 14:08.


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