AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help: say /funmaps, say /warmaps, say /goodmaps (https://forums.alliedmods.net/showthread.php?t=74306)

Dwight Eisenhower 07-16-2008 01:44

Help: say /funmaps, say /warmaps, say /goodmaps
 
Hello, my name is Dwight, and I am having massive problems creating a baseline with making a plugin. What I would like it to do is as so

When people type in chat: /funmaps, they will get a MotD list of all the funmaps. When they say /warpmaps, they will get a list of all the fighting/war maps, and when they say /goodmaps, they get a list of all the good maps on the server. I could create a motd file for that, but I don't know about how to make the plugin where it registers all that chat. I looked around as best I could, and read tutorials, but I didn't get anything on it. If anybody could help me make it, I'd be happy. Thank you everybody down at Allied Modders and Amxx. Excellent work with your plugins and thanks to everybody that is good at making plugins.

ot_207 07-16-2008 04:52

Re: Help: say /funmaps, say /warmaps, say /goodmaps
 
These are the commands you should need:

PHP Code:

public plugin_init()
{
    
register_clcmd("say /goodmaps","cmd_good_maps",-1)
}

public 
cmd_good_maps(id)
{
    
// when the player says /goodmaps he will see the text motd.txt with title Motd Title
    
show_motd(id,"motd.txt","Motd Title")
    return 
PLUGIN_HANDLED;


If you make the motd with the name goodmaps.txt for example
then you should use show_motd like this
PHP Code:

 show_motd(id,"goodmaps.txt","Good Maps on my server :P"


Dwight Eisenhower 07-16-2008 13:19

Re: Help: say /funmaps, say /warmaps, say /goodmaps
 
Thank you so much! You have helped my server out. Didn't know it was such a little plugin.

+ Karma!!


All times are GMT -4. The time now is 05:39.

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