Raised This Month: $ Target: $400
 0% 

[REQ] Map-based command executer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KooKas-Kreationz
New Member
Join Date: Apr 2008
Old 04-09-2008 , 14:13   [REQ] Map-based command executer
Reply With Quote #1

I'm requesting that a "map-based command executer" compatible with Half-Life 2 based games such as Counter-Strike: Source be created. Basically, you would just write a txt file, for example "surf_10x_final.autocmds.txt" (of course surf_10x_final is just an example) and inside it might look like this:

Code:
// enter the code to execute on the map below
sm_csay Welcome to Surf_10x_Final!
sm_restrict weapon_m249
Maybe it would work something like this:
  1. Install plugin - create txt file with commands inside, and place it in the correct directory (whatever that may be). For example: de_dust.autocmds.txt
  2. Restart the server. When the server finishes its restart, the plugin will check the map it's on. It will get all the files with autocmds in the name in the previously said folder and find our de_dust text file. It will look for the first period "." and get all the characters before that - it will assume this is the map to execute this file's commands on. Like this: -get where "autocmds" is in string "filename" from folder "directory" -found "de_dust.autocmds.txt" -search string "filename" for character "." -found "." -get characters before "." -found "de_dust" -store to array "maps"
  3. The plugin will compare all values in the array (this is all of the maps with a text file) to the current map. If it finds a match, it will execute the map's text file's commands.
That's just my basic example of how it would work, don't know how it looks in code but that's why I'm requesting it here!
KooKas-Kreationz is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 04-09-2008 , 14:17   Re: [REQ] Map-based command executer
Reply With Quote #2

How to make map specific config files
__________________
Extreme_One is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 04-09-2008 , 17:55   Re: [REQ] Map-based command executer
Reply With Quote #3

I recommend you to use my map configs plugin with prefix support,
it makes it easier to write config files for the same type of maps.

http://forums.alliedmods.net/showthread.php?t=69506
berni 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 04:22.


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