Raised This Month: $ Target: $400
 0% 

HELP with HEP!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-10-2010 , 16:15   HELP with HEP!
Reply With Quote #1

I want to create a help to my plugin.

I see some plugins have the option to say /help and opens the MOTD

Hos is this possible?
totalcsscripting is offline
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-10-2010 , 16:23   Re: HELP with HEP!
Reply With Quote #2

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

#define PLUGIN "Regulamin"
#define VERSION "1.0"
#define AUTHOR "naven"


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /regulamin""regulamin")
}
public 
regulamin(id)
{
    
show_motd(id"regulamin.txt""Regulamin serwera."

__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-10-2010 , 16:59   Re: HELP with HEP!
Reply With Quote #3

Quote:
Originally Posted by N A V E N View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Regulamin"
#define VERSION "1.0"
#define AUTHOR "naven"


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /regulamin""regulamin")
}
public 
regulamin(id)
{
    
show_motd(id"regulamin.txt""Regulamin serwera."

What is the third parameter "Regulamin serwera." ?
totalcsscripting is offline
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-10-2010 , 17:03   Re: HELP with HEP!
Reply With Quote #4

Header that will be shown at the bottom of motd
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-10-2010 , 18:08   Re: HELP with HEP!
Reply With Quote #5

Quote:
Originally Posted by N A V E N View Post
Header that will be shown at the bottom of motd
In another plugin the txt file was in configs folder. But in my casi only works if i have it in cstrike
totalcsscripting is offline
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-10-2010 , 18:13   Re: HELP with HEP!
Reply With Quote #6

PHP Code:
 show_motd(id"addons/amxmodx/configs/name.txt""Regulamin serwera."
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-10-2010 , 18:24   Re: HELP with HEP!
Reply With Quote #7

Quote:
Originally Posted by N A V E N View Post
PHP Code:
 show_motd(id"addons/amxmodx/configs/name.txt""Regulamin serwera."
oh great!

One last thing. its there a way of compiling the txt inside the plugin?, without using an external file
totalcsscripting is offline
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-10-2010 , 19:00   Re: HELP with HEP!
Reply With Quote #8

I don't really understand what you mean
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-10-2010 , 19:01   Re: HELP with HEP!
Reply With Quote #9

He means is there anyway to write the motd inside of the plugin instead of making a motd in a separate file.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-10-2010 , 19:02   Re: HELP with HEP!
Reply With Quote #10

Yes, there is, example:
PHP Code:
public pokehelp(id)
 {
    new 
poke_help_message[2555], iLen

    
new bool:its_a_motd true
    
#if MOD==NS
        
its_a_motd false
    
#endif

    
iLen += formatex(poke_help_message[iLen], (2555-iLen),    "%sPokeMod%s",its_a_motd?"<center><b><font color=red size=+2>":EMPTY,its_a_motd?"</font></b></center>":EMPTY)
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<br>")
    
iLen += formatex(poke_help_message[iLen], (2555-iLen),    "%sThe World of Pokemon with a Twist!%s",its_a_motd?"<center>":EMPTY,its_a_motd?"</center>":EMPTY)
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<br>")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>To see a list of commands, say /pokecommands")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<br>")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>Touch Prof. Oak for the poke menu(main menu)")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>There are 2 ways to \"catch\" pokemon.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>- 1. Buy a pokeball from Prof. Oak and kill someone.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>- 2. Go to the opposing teams base and pick up a pokeball.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>-- To see a list of pokemon, say \"/pokedex #\" or \"/pokedex name\"")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>To change pokemon, say /go <pokemon name>, or to see a menu say /go")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>To use pokemon skills and items, bind keys to +pokeskill and +pokeitem")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>- To bind a key, follow these steps:")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>- 1. Press the ` or ~ key to bring up the console")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>- 2. Type bind (key) (what to bind)")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>-- For this example you will want to bind +pokeskill or +pokeitem")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>- 3. Press enter and voila, now just press (key) and it will do what you binded")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>- Examples: bind v +pokeskill, bind f +pokeitem")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<br>")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>When you kill someone, you get experience based on their level.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>As your pokemon levels up, its skill becomes more invoking.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>When you get enough experience, your pokemon may evolve into a new pokemon.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>Your evolved pokemon will have its predecessor's skill and a new one.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>* Note that not all pokemon evolve with just experience.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<br>")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>Your max hp is based on the average level of your pokemon.")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<li>So go train them all!")
    
iLen += copy(poke_help_message[iLen], (2555-iLen),        "<br>")
    
iLen += formatex(poke_help_message[iLen], (2555-iLen),    "<br>Check the %sPokeMod Site%s for updates, suggestions, and other things.",its_a_motd?"<a href=\"http://www.deadrocks.com/forums/\">":EMPTY,its_a_motd?"</a>":EMPTY)

    if(!
its_a_motd){
        
replace_all(poke_help_message2555"<li>""\n-")
        
replace_all(poke_help_message2555"<br>""\n")
        
set_hudmessage(230,100,10,0.80,0.2801.020.00.90.9, -1)
        
show_hudmessage(id,poke_help_message)
    }
    else
        
show_motdidpoke_help_message"PokeHelp" )
    return 
PLUGIN_HANDLED
 

(variables in pokemod)
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven 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 22:00.


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