View Single Post
Author Message
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 12-23-2016 , 14:01   [REQ] Small Help
Reply With Quote #1

Hi all

Any one Add 1 more message for admin connect?? Admin Flag Kick and Admin message like this

[PREFIX] Admin %s connected!


PHP Code:
#include <amxmodx>

#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Test"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
   }
public 
client_putinserver(id

    
set_task(10.0"TestWelcome"id

public 
TestWelcome(id)
{
    if( !
is_user_bot(id) ) { 
        new 
szName[32]
        
get_user_name(idszName31); 
         
        if( 
get_user_flags(id) & ADMIN_RCON 
            
client_print(0print_chat"[PREFIX] OWNER %s connected!"szName); 
        else
            
client_print(0print_chat"[PREFIX] Player %s connected!"szName); 
         
    } 
}
public 
client_disconnectid )
{
    if( !
is_user_bot(id) )

        new 
szName[32]
        
get_user_name(idszName31);  
         
        if( 
get_user_flags(id) & ADMIN_RCON 
            
client_print(0print_chat"[PREFIX] OWNER %s disconnected!"szName); 
        else 
            
client_print(0print_chat"[PREFIX] Player %s disconnected!"szName); 
 
    } 

Example :-

[PREFIX] OWNER %s connected!
[PREFIX] Player %s connected!
[PREFIX] Admin %s connected!
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234