This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[HELP] Please help me to Build say motd plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-02-2015 , 02:07   [HELP] Please help me to Build say motd plugin
Reply With Quote #1

Hello to all for giving their valuable time to Read this post..

I got a "say /motd" plugin but I want to Build my own "motd" plugin.
Whenever a player types motd in Chat or in TeamChat I want to display the default Counter-Strike 1.6 motd.
Don't make this plugin or don't give me the link for this plugin.. I want to Learn this..
So, if anyone can help me to Build this plugin.. It will be Great!!

Thank You.

Last edited by VarmaRitik; 02-02-2015 at 02:08.
VarmaRitik is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 02-02-2015 , 02:18   Re: [HELP] Please help me to Build say motd plugin
Reply With Quote #2

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("MOTD""1.0""Gullu Bhai");
    
register_clcmd("say /motd""cmdMOTD");
    
register_clcmd("say_team /motd""cmdMOTD");
}

public 
cmdMOTD(id)
{
    
show_motd(id"site url / file location ""title");


Last edited by tousif; 02-02-2015 at 02:28.
tousif is offline
Old 02-02-2015, 04:21
VarmaRitik
This message has been deleted by VarmaRitik.
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-02-2015 , 05:06   Re: [HELP] Please help me to Build say motd plugin
Reply With Quote #4

@tousif,
Thank You, but I got a problem.. it's not displaying me the motd..See the Screenshot below.

I have created "admins.txt" to be display as my motd..

Admins.txt
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Admins motd</title>
<style type="text/css">
pre     {
        font-family:Trebuchet MS;
        color:#FFB000;
        }
body    {
        background:#000000;
        margin-left:8px;
        margin-top:0px;
        }
a    {
        text-decoration:    none;
    }
a:link  {
    color:  #FFFFFF;
    }
a:visited   {
    color:  #FFFFFF;
    }
a:active    {
    color:  #FFFFFF;
    }
a:hover {
    color:  #FFFFFF;
    text-decoration:    underline;
    }
</style>
</head>
<body scroll="no">
<pre>
Our server admins are :
1. Striker [Owner]

for adminship contact us at <a href="http://www.facebook.com/VarmaRitik">Facebook</a>
</pre>
</body>
</html>
plugin source code
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Say MOTD"
#define VERSION "1.0"
#define AUTHOR "Striker"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /motd", "cmdMOTD");
    register_clcmd("say_team /motd", "cmdMOTD");
}

public cmdMOTD(id) {
    show_motd(id, "D:\Counter-Strike 1.6\cstrike\admins.txt", "Our Server Admins");
}
What did I messed up with?
please help me to solve this problem..

Thank You.
Attached Thumbnails
Click image for larger version

Name:	motd problem.png
Views:	468
Size:	33.8 KB
ID:	142095  

Last edited by VarmaRitik; 02-02-2015 at 05:07.
VarmaRitik is offline
ALonsoVIP4141
BANNED
Join Date: May 2021
Location: https://t.me/pump_upp
Old 06-02-2021 , 13:57   Re: [HELP] Please help me to Build say motd plugin
Reply With Quote #5

Quote:
Originally Posted by tousif View Post
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("MOTD""1.0""Gullu Bhai");
    
register_clcmd("say /motd""cmdMOTD");
    
register_clcmd("say_team /motd""cmdMOTD");
}

public 
cmdMOTD(id)
{
    
show_motd(id"site url / file location ""title");











how iadd file location.
ALonsoVIP4141 is offline
Send a message via ICQ to ALonsoVIP4141 Send a message via AIM to ALonsoVIP4141 Send a message via Yahoo to ALonsoVIP4141 Send a message via Skype™ to ALonsoVIP4141
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 06-02-2021 , 17:32   Re: [HELP] Please help me to Build say motd plugin
Reply With Quote #6

Quote:
Originally Posted by ALonsoVIP4141 View Post
how iadd file location.
The answer is on the quote that you mentioned
__________________
nG_getwreck is offline
Old 06-03-2021, 06:26
ALonsoVIP4141
This message has been deleted by ALonsoVIP4141.
choloo
Senior Member
Join Date: Nov 2014
Location: Groznyj, Chechnya
Old 02-02-2015 , 05:55   Re: [HELP] Please help me to Build say motd plugin
Reply With Quote #8

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
register_plugin(PLUGINVERSIONAUTHOR)

// Add your code here...
register_clcmd("say /motd""cmdMOTD");
}

public 
cmdVIP(id) {
show_motd(id"admins.txt");

And here a good .txt, just edit it how you want and put in cstrike folder!

EDIT: your problem when you see white motd is:
1. You need to change Cs 1.6 client and use IE
2. If you have path in the code you need to put it in: "Resource/UI/MOTD.res"
Attached Files
File Type: txt vip.txt (1.5 KB, 313 views)

Last edited by choloo; 02-02-2015 at 05:58.
choloo is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 02-02-2015 , 06:14   Re: [HELP] Please help me to Build say motd plugin
Reply With Quote #9

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("MOTD""1.0""Author");
    
register_clcmd("say /motd""cmdMOTD");
    
register_clcmd("say_team /motd""cmdMOTD");
}

public 
cmdMOTD(id)
{
    
show_motd(id"admins.txt""Our Server Admins");

try it
and why did u aded this include <amxmisc>



Its working Compile the one i gave

Last edited by tousif; 02-02-2015 at 06:32.
tousif is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-02-2015 , 06:16   Re: [HELP] Please help me to Build say motd plugin
Reply With Quote #10

Code:
#include <amxmodx>

public plugin_init() 
{
    register_clcmd("say /motd", "cmdMOTD");
    register_clcmd("say_team /motd", "cmdMOTD");
}

public cmdMOTD(id) 
{
    show_motd(id, "admins.txt", "Our Server Admins");
}
zmd94 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 03:24.


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