AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   check if new user connects (https://forums.alliedmods.net/showthread.php?t=194329)

SPT1 08-27-2012 08:52

check if new user connects
 
how can i check if any user with flag ADMIN_LEVEL_H
has connect?
i want to show them a motd when they connect

Napoleon_be 08-27-2012 09:07

Re: check if new user connects
 
check if the user has the flag "ADMIN_LEVEL_H" on client_putinserver(id), if he has is then simply show a motd.

SPT1 08-27-2012 09:18

Re: check if new user connects
 
PHP Code:

public client_putinserver(id)

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



guipatinador 08-27-2012 09:36

Re: check if new user connects
 
You can't show a motd when a player connect...

OvidiuS 08-27-2012 10:10

Re: check if new user connects
 
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

SPT1 08-27-2012 10:46

Re: check if new user connects
 
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")



guipatinador 08-27-2012 10:54

Re: check if new user connects
 
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")
    } 



SPT1 08-27-2012 10:59

Re: check if new user connects
 
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")



guipatinador 08-27-2012 11:03

Re: check if new user connects
 
Please don't code if you don't know. ShowMotd is never called.

gogicaa 08-27-2012 11:58

Re: check if new user connects
 
Quote:

Originally Posted by OvidiuS (Post 1784176)
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.


All times are GMT -4. The time now is 05:49.

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