AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to replace default "motd.txt" to my motd plugin? (https://forums.alliedmods.net/showthread.php?t=174356)

kiki33hun 12-19-2011 09:09

How to replace default "motd.txt" to my motd plugin?
 
How to replace default "motd.txt" to my motd plugin?

PHP Code:

public client_connect(id)
{
    
ShowMotd(id)
    
    return;
}

public 
ShowMotd(id)
{
    new 
ip[64];
    
get_user_ip(0ipcharsmax(ip))
    
     static 
name[33];
     
get_user_name(idname32);
    
    static 
motd[1501], len;

....
etc 


drekes 12-19-2011 10:09

Re: How to replace default "motd.txt" to my motd plugin?
 
Why not make the default MOTD the way you want it ?

fysiks 12-19-2011 13:57

Re: How to replace default "motd.txt" to my motd plugin?
 
Like drekes said, all you need to to is edit motd.txt to what you want or have it refresh to your website.

kiki33hun 12-19-2011 14:31

Re: How to replace default "motd.txt" to my motd plugin?
 
I "motd" print welcome %s(name) message, how to use?

Sry bad eng

fysiks 12-19-2011 14:35

Re: How to replace default "motd.txt" to my motd plugin?
 
Quote:

Originally Posted by kiki33hun (Post 1616038)
I "motd" print welcome %s(name) message, how to use?

Sry bad eng

Well, in that case you need to delete motd.txt and show your own just like any other motd. However, I'm not entirely sure you can show the MOTD over the team selection menu (maybe).

kiki33hun 12-19-2011 14:49

Re: How to replace default "motd.txt" to my motd plugin?
 
I deleted motd.txt my putinserver and go straight to the selector comes in. NOT WORKING

hleV 12-19-2011 14:51

Re: How to replace default "motd.txt" to my motd plugin?
 
Don't delete it. Open it and change the text.

kiki33hun 12-19-2011 14:53

Re: How to replace default "motd.txt" to my motd plugin?
 
PHP Code:

public client_putinserver(id) {
    
set_task1.0"ShowMotd"id)
    
    return;


I taskin public ShowMotd to cllient, and not working

fysiks 12-19-2011 14:56

Re: How to replace default "motd.txt" to my motd plugin?
 
Quote:

Originally Posted by hleV (Post 1616054)
Don't delete it. Open it and change the text.

That's not a valid solution as you likely can't guarantee that it gets changed before it gets sent to the client. Also, this is a potential race condition.

I guess he can try it and hope to get lucky :).

Devil259 12-19-2011 14:57

Re: How to replace default "motd.txt" to my motd plugin?
 
Quote:

Originally Posted by hleV (Post 1616054)
Don't delete it. Open it and change the text.

Did you read what hleV said ?


All times are GMT -4. The time now is 12:06.

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