Raised This Month: $12 Target: $400
 3% 

Motd Changer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xavier666
Junior Member
Join Date: Aug 2009
Location: India, West Bengal, Kolk
Old 07-07-2010 , 06:49   Motd Changer
Reply With Quote #1

Can someone write a plugin which changes the motd according to the current mod? Something like

if(mod == basebuilder)
overwrite motd with basebuilder.txt
else if(mod == zombie)
overwrite motd with zombie.txt
else if(mod == surf)
overwrite motd with surf.txt
else if(mod == NULL)
overwrite motd with default.txt


Thanks in advance!!
__________________
I have very little knowledge about the workings of AMX Mod. I may not understand your technical babble so please be patient with me
But I am a quick learner
xavier666 is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-07-2010 , 13:28   Re: Motd Changer
Reply With Quote #2

Quote:
Originally Posted by xavier666 View Post
Can someone write a plugin which changes the motd according to the current mod? Something like

if(mod == basebuilder)
overwrite motd with basebuilder.txt
else if(mod == zombie)
overwrite motd with zombie.txt
else if(mod == surf)
overwrite motd with surf.txt
else if(mod == NULL)
overwrite motd with default.txt


Thanks in advance!!

This is simple

1º In Amxmodx/configs create a new folder called maps
2º In maps folder, create a two files (Per map) Example:

prefix_surf.cfg and Prefix-surf.ini

In the prefix_surf.cfg putty the command:

motdfile "surf.txt"

NOME: THE SURF.TXT MUST BE IN THE CSTRKE FOLDER!!!

In the prefix-surf.ini put the plugins of surf-mod and VOHALAA!!

You have a multi-mod's!!

Ps. The most of prefix only work in the specif. maps example:

prefix_surf.cfg < Surf configs
prefix-surf.ini < Surf Plugins

in the prefix_XXX.cfg put comandos to change the motd file

__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 07-07-2010 at 13:33.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-07-2010 , 13:41   Re: Motd Changer
Reply With Quote #3

It depends on how you have your mods set up to run. If it's purely by map prefix then the above is the way to go but if you have Polymorph it's even easier. If you have MultiMod Manager then I would have to look again at how he has it coded.
__________________
fysiks is offline
Old 07-07-2010, 13:53
RedRobster
This message has been deleted by RedRobster. Reason: ^Nvm haha
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-07-2010 , 13:59   Re: Motd Changer
Reply With Quote #4

Yep, this method work's for me and it's very very easy..

MM manager is working, but this solution is more efective for this situation

Please see:

http://wiki.amxmodx.org/Configuring_AMX_Mod_X

Quote:
As of AMX Mod X 1.8.0, you are now able to create config files for map prefixes. To do this, create a file called prefix_<prefix>.cfg, where <prefix> would mean de, cs, awp, surf, ect. All prefix config files go in the same location as per map, the amxmodx/configs/map/ directory.
configs/maps/prefix_de.cfg - Would run on any de_* map.
configs/maps/prefix_cs.cfg - Would run on any cs_* map.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-07-2010 , 14:03   Re: Motd Changer
Reply With Quote #5

Quote:
Originally Posted by ^SmileY View Post
MM manager is working, but this solution is more efective for this situation
Actually no. It is not the best solution. What if you have a non-prefixed map or use a map in more than one mod? The MOTD is mod specific so it should be changed when the mod changes and not when the map changes.
__________________
fysiks is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-07-2010 , 14:09   Re: Motd Changer
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
Actually no. It is not the best solution. What if you have a non-prefixed map or use a map in more than one mod? The MOTD is mod specific so it should be changed when the mod changes and not when the map changes.

also, but this method work in map prefixes, non in a mod, but [COLOR=#000000]you're right.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
xavier666
Junior Member
Join Date: Aug 2009
Location: India, West Bengal, Kolk
Old 07-08-2010 , 14:24   Re: Motd Changer
Reply With Quote #7

Quote:
Originally Posted by ^SmileY View Post
In the prefix-surf.ini put the plugins of surf-mod and VOHALAA!!
I'm using usurf.amxx
So i'll just write - [usurf.amxx], is that it?

Quote:
Originally Posted by ^SmileY View Post
in the prefix_XXX.cfg put comandos to change the motd file
This part I didn't understand. What commands should I write?
__________________
I have very little knowledge about the workings of AMX Mod. I may not understand your technical babble so please be patient with me
But I am a quick learner
xavier666 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 05:13.


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