Raised This Month: $ Target: $400
 0% 

check if new user connects


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SPT1
Senior Member
Join Date: Aug 2012
Old 08-27-2012 , 08:52   check if new user connects
Reply With Quote #1

how can i check if any user with flag ADMIN_LEVEL_H
has connect?
i want to show them a motd when they connect
__________________
AMXMODX
SPT1 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-27-2012 , 09:07   Re: check if new user connects
Reply With Quote #2

check if the user has the flag "ADMIN_LEVEL_H" on client_putinserver(id), if he has is then simply show a motd.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
SPT1
Senior Member
Join Date: Aug 2012
Old 08-27-2012 , 09:18   Re: check if new user connects
Reply With Quote #3

PHP Code:
public client_putinserver(id)

    
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
 {
    
show_motd(id"a.txt")

__________________
AMXMODX

Last edited by SPT1; 08-27-2012 at 09:18.
SPT1 is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-27-2012 , 09:36   Re: check if new user connects
Reply With Quote #4

You can't show a motd when a player connect...

Last edited by guipatinador; 08-27-2012 at 09:38.
guipatinador is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 08-27-2012 , 10:10   Re: check if new user connects
Reply With Quote #5

You can block default motd (motd.txt) and show custom motd.
Check this thread for blocking welcome motd: https://forums.alliedmods.net/showthread.php?t=68673

Last edited by OvidiuS; 08-27-2012 at 10:10.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
SPT1
Senior Member
Join Date: Aug 2012
Old 08-27-2012 , 10:46   Re: check if new user connects
Reply With Quote #6

will it work this way?
PHP Code:
public client_authorized(id)
{
 
set_task(10.0"client_putinserver" ,id)
}
public 
client_putinserver(id)

    
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
 {
    
show_motd(id"a.txt")

__________________
AMXMODX

Last edited by SPT1; 08-27-2012 at 10:46.
SPT1 is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-27-2012 , 10:54   Re: check if new user connects
Reply With Quote #7

PHP Code:
public client_authorized(id)
{
    
set_task(10.0"ShowMotd" ,id)
}
public 
ShowMotd(id)

    if(
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
show_motd(id"a.txt")
    } 


Last edited by guipatinador; 08-27-2012 at 10:54.
guipatinador is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 08-27-2012 , 10:59   Re: check if new user connects
Reply With Quote #8

will this also work?
PHP Code:
public client_authorized(id)
{
    
set_task(10.0"ShowMotd" ,id)
}
public 
client_connect(id)

    
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
 {
    
show_motd(id"a.txt")

__________________
AMXMODX
SPT1 is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-27-2012 , 11:03   Re: check if new user connects
Reply With Quote #9

Please don't code if you don't know. ShowMotd is never called.
guipatinador is offline
gogicaa
Veteran Member
Join Date: Aug 2011
Location: //
Old 08-27-2012 , 11:58   Re: check if new user connects
Reply With Quote #10

Quote:
Originally Posted by OvidiuS View Post
You can block default motd (motd.txt) and show custom motd.
Check this thread for blocking welcome motd: https://forums.alliedmods.net/showthread.php?t=68673
You can simply remove MOTD by deleting motd.txt from cstrike directory.
gogicaa 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 05:49.


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