AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HELP with HEP! (https://forums.alliedmods.net/showthread.php?t=134962)

totalcsscripting 08-10-2010 16:15

HELP with HEP!
 
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?

naven 08-10-2010 16:23

Re: HELP with HEP!
 
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."



totalcsscripting 08-10-2010 16:59

Re: HELP with HEP!
 
Quote:

Originally Posted by N A V E N (Post 1267525)
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." ?

naven 08-10-2010 17:03

Re: HELP with HEP!
 
Header that will be shown at the bottom of motd

totalcsscripting 08-10-2010 18:08

Re: HELP with HEP!
 
Quote:

Originally Posted by N A V E N (Post 1267568)
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

naven 08-10-2010 18:13

Re: HELP with HEP!
 
PHP Code:

 show_motd(id"addons/amxmodx/configs/name.txt""Regulamin serwera."


totalcsscripting 08-10-2010 18:24

Re: HELP with HEP!
 
Quote:

Originally Posted by N A V E N (Post 1267618)
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

naven 08-10-2010 19:00

Re: HELP with HEP!
 
I don't really understand what you mean

nikhilgupta345 08-10-2010 19:01

Re: HELP with HEP!
 
He means is there anyway to write the motd inside of the plugin instead of making a motd in a separate file.

naven 08-10-2010 19:02

Re: HELP with HEP!
 
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)


All times are GMT -4. The time now is 22:00.

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