Raised This Month: $32 Target: $400
 8% 

[REQ] Small Help


Post New Thread Reply   
 
Thread Tools Display Modes
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
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-23-2016 , 14:23   Re: [REQ] Small Help
Reply With Quote #2

Its easy task


PHP Code:
#include <amxmodx> 

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

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  if( 
get_user_flags(id) & ADMIN_KICK )
            
client_print(0print_chat"[PREFIX] Admin %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  if( 
get_user_flags(id) & ADMIN_KICK )
            
client_print(0print_chat"[PREFIX] Admin %s disconnected!"szName);  
         else
         
client_print(0print_chat"[PREFIX] Player %s disconnected!"szName);  
    }  

__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
eyal282
Veteran Member
Join Date: Aug 2011
Old 12-23-2016 , 14:23   Re: [REQ] Small Help
Reply With Quote #3

I don't quite understand but test that:

Code:
#include <amxmodx> #define PLUGIN "Test" #define VERSION "1.0" #define AUTHOR "Test" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR) } public client_putinserver(id)  {      set_task(10.0, "TestWelcome", id)  }  public TestWelcome(id) {     if( is_user_bot(id) ) return;         new szName[32]     get_user_name(id, szName, 31);          new Prefix[15];         Prefix = "Player";     if( get_user_flags(id) & ADMIN_RCON )         Prefix = "OWNER";     else if( get_user_flags(id) & ADMIN_KICK )         Prefix = "Admin";         client_print(0, print_chat, "[PREFIX] %s %s connected!", Prefix, szName);                }     } public client_disconnect( id ) {     if( is_user_bot(id) ) return;      new szName[32]     get_user_name(id, szName, 31);                  new Prefix[15];         Prefix = "Player";     if( get_user_flags(id) & ADMIN_RCON )         Prefix = "OWNER";     else if( get_user_flags(id) & ADMIN_KICK )         Prefix = "Admin";         client_print(0, print_chat, "[PREFIX] %s %s disconnected!", Prefix, szName);      }  }
eyal282 is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-23-2016 , 14:30   Re: [REQ] Small Help
Reply With Quote #4

U r noon in coding better check what I have edited -_- u edited same but in another way. Learn it
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-23-2016 , 14:56   Re: [REQ] Small Help
Reply With Quote #5

untested
PHP Code:
#include <amxmodx>

public plugin_init()
{
   
register_plugin("Join","1.0","Relaxing")
}

public 
client_putinserver(id)
{
    new 
name[32]
    
get_user_name(idnamecharsmax(name))
    if( 
get_user_flags(id) & ADMIN_RESERVATION ) {    
        
client_print_color(id"!t[PREFIX] OWNER !g%s !tjoined",  name)
    }
    else 
    {
        
client_print_color(id"!t[PREFIX] PLAYER !g%s !tjoined",  name)
    }
   
   return 
PLUGIN_HANDLED
}

public 
client_disconnect(id)
{
    new 
name[32]
    
get_user_name(idnamecharsmax(name))
    if( 
get_user_flags(id) & ADMIN_RESERVATION ) {    
        
client_print_color(id"!t[PREFIX] OWNER !g%s !tjoined",  name)
    }
    else 
    {
        
client_print_color(id"!t[PREFIX] PLAYER !g%s !tjoined",  name)
    }
    return 
PLUGIN_HANDLED   
}
stock client_print_color(const id, const input[], any:...) 

    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg190input3); 
    
    
replace_all(msg190"!n""^x01");
    
replace_all(msg190"!g""^x04");     
    
replace_all(msg190"!t""^x03");
    
    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(); 
            } 
        } 
    } 

__________________

Last edited by Relaxing; 12-23-2016 at 14:57. Reason: no reason for other includes
Relaxing is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-23-2016 , 17:23   Re: [REQ] Small Help
Reply With Quote #6

Quote:
Originally Posted by Sanjay Singh View Post
U r noon in coding better check what I have edited -_- u edited same but in another way. Learn it
Says the absolute professional. Just shut up, please.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-24-2016 , 01:24   Re: [REQ] Small Help
Reply With Quote #7

Wtf do u mean? Just don't come over on every post and shut ur , I don't need.
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-24-2016 , 01:25   Re: [REQ] Small Help
Reply With Quote #8

Better mind ur language..before speaking.
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 12-24-2016 , 02:10   Re: [REQ] Small Help
Reply With Quote #9

OciXCrom, Leave him

he is one kind of bot
__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 12-24-2016 at 02:10.
indraraj striker is offline
Old 12-24-2016, 02:58
shehzad1234
This message has been deleted by asherkin.
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 12-24-2016 , 03:21   Re: [REQ] Small Help
Reply With Quote #10

Quote:
Originally Posted by Sanjay Singh View Post
Its easy task


PHP Code:
#include <amxmodx> 

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

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  if( 
get_user_flags(id) & ADMIN_KICK )
            
client_print(0print_chat"[PREFIX] Admin %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  if( 
get_user_flags(id) & ADMIN_KICK )
            
client_print(0print_chat"[PREFIX] Admin %s disconnected!"szName);  
         else
         
client_print(0print_chat"[PREFIX] Player %s disconnected!"szName);  
    }  

Thnx Sanjay
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
Old 12-24-2016, 09:31
OciXCrom
This message has been deleted by asherkin.
Old 02-10-2018, 02:17
Anurag Kumar
This message has been deleted by asherkin.
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 20:17.


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