Raised This Month: $ Target: $400
 0% 

Show motd when player join in team and select skin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
3emu
Junior Member
Join Date: Jan 2011
Location: BETTER THAN YOUR!
Old 02-21-2014 , 05:40   Show motd when player join in team and select skin
Reply With Quote #1

When new player join in server and select team, to show him motd file, but not motd.txt from cstrike..
Can someone make it?

Last edited by 3emu; 02-21-2014 at 05:41.
3emu is offline
5aloOod
Senior Member
Join Date: Jun 2013
Location: hell
Old 02-21-2014 , 06:28   Re: Show motd when player join in team and select skin
Reply With Quote #2

next time make a better topic tittle like this: [REQ] Show MOTD on connect

PHP Code:
#include < amxmodx >

public plugin_init ( )
{
     
register_plugin "Connect MOTD""1.0""You" )
}

public 
client_putinserver index )
{
     if ( 
is_user_bot index ) || is_user_hltv index ) )
     {
          return 
PLUGIN_HANDLED
     
}

     
// Remeber to put 'your_file.txt' in 'cstrike/' folder.
     // You can change the header of the MOTD, see the second param.
     
show_motd index"your_file.txt""MOTD header" )

     return 
PLUGIN_HANDLED

or this

PHP Code:
#include < amxmodx >
#include < cstrike >

#define MOTD_TASK 13579

public plugin_init ( )
{
     
register_plugin "Connect MOTD""1.0""You" )
}

public 
client_putinserver index )
{
     if ( 
is_user_bot index ) || is_user_hltv index ) )
     {
          return 
PLUGIN_HANDLED
     
}

     
// You can change here the time to recheck the player team.
     
set_task 2.5"show_motd_file"index MOTD_TASK__"b" )
}

public 
show_motd_file index )
{
     
index MOTD_TASK

     
// If the player has a team, show the MOTD and remove the task.
     
if ( cs_get_user_team index ) != CS_TEAM_UNASSIGNED )
     {
          
// Remeber to put 'your_file.txt' in 'cstrike/' folder.
          // And you also can change the MOTD header ( second param ) .
          
show_motd index"your_file.txt""MOTD header" 
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه

Last edited by 5aloOod; 02-21-2014 at 06:35.
5aloOod is offline
3emu
Junior Member
Join Date: Jan 2011
Location: BETTER THAN YOUR!
Old 02-21-2014 , 07:28   Re: Show motd when player join in team and select skin
Reply With Quote #3

can i put file in other directory not cstrike and with diffrent format not .txt?
3emu is offline
5aloOod
Senior Member
Join Date: Jun 2013
Location: hell
Old 02-21-2014 , 08:40   Re: Show motd when player join in team and select skin
Reply With Quote #4

for code what i have post no you cant and motd only accept .txt files
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
5aloOod is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-21-2014 , 20:07   Re: Show motd when player join in team and select skin
Reply With Quote #5

Quote:
Originally Posted by 3emu View Post
can i put file in other directory not cstrike and with diffrent format not .txt?
Such as?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-21-2014 , 20:37   Re: Show motd when player join in team and select skin
Reply With Quote #6

The MOTD window will interpret the .txt file as a HTML file so it need not have the .html extension.
__________________
fysiks is online now
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 23:03.


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