AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Practice - Makes Practicing Easy (https://forums.alliedmods.net/showthread.php?t=6055)

Zor 09-20-2004 12:21

Practice - Makes Practicing Easy
 
2 Attachment(s)
Hey again all. I did a search and noticed that there were no plugins for practicing. And as all good clans need to practice as a group, I thought I'd develope one. Well I had the idea already but wanted to fix it up. So here it is!

Quote:

Version Control:
v0.1
- Be!
v0.1b
- Fixed error with config files not reading correct
- Moved the Clan Match Variables into the plugin to ensure they are reset
Instructions:
To start the plugin you must have ADMIN_LEVEL_E. Then you call amx_practice. At this time it will tell all the players on the server that there is a practice going to be going on. This will happen 3 times, once 5 seconds after the call, then at 30 secs, and finally at 50 secs. Now at 60 secs after the call the plugin will kick in and either send all the non-admin types to another server or just disconnect them. Now in regards to this, lets say you have a person whom is not part of the clan, or doesn't have the correct level to be on the server you call amx_practice_add nick/steamid. Then that person is added a list that will not be punted. Now once the practice is over some admin has to call amx_practice_done, and the server will reset all the codes set to normal and open it up again.

The following files are part of this plugin and must be put into amxmodx/config/ directory. They come with there own custom folder.
Quote:

File List:
addons/amxmodx/configs/custom/practice.cfg
addons/amxmodx/configs/custom/practice_start.cfg
addons/amxmodx/configs/custom/practice_end.cfg
amx_practice.sma
Well all hope you like and its usuable to you. If you have any problems please post here and let me know!

Cheers!

Zor 09-21-2004 13:15

**BUMP**
New version.

Jedi 09-21-2004 20:58

Zor -

Quick question. Could you just add your clan members to the practice_start.cfg file like this:

Code:

amx_practice_add member1name
amx_practice_add member2name

And that way - you wouldn't have to add each of your clan members via console commands for every practice.

If this isn't possible, is there a way to add a config file where you could list your members and they would auto load when you execute amx_practice?

Thanks for the plugin.

Zor 09-21-2004 22:19

It should work...but dont your members have admin of some sort. What I have done is make all of the commands console commands. So you should be able to call it via hlsw or other proggy like that. And if you add your members the way you ask it should work.

Cheers!

Jedi 09-21-2004 22:27

Oh - ok - I didn't notice that in the plugin. What is the admin level required to not get kicked when you start practice? Admin_level_E? Or Admin_level_H? I notice you have them both defined.

Johnny got his gun 09-22-2004 05:12

Don't include <amxmod>! This is the first rule...

Also don't use hardcoded paths.

Zor 09-22-2004 21:10

Jedi -
Code:
new ACCESS = ADMIN_LEVEL_E new PACCESS = ADMIN_LEVEL_H

In the above ACCESS is for the person calling the plugin and PACCESS is the level for the members to be at in order not be kicked.

Cheers to You!

Johnny got his gun -
Oops on one. Not true on two. Ok must grabbed the header from old code and missed that amxmodx. Happens and will be changed in 0.2 which is coming out in a week at the outset. Which I might add includes godmode group teleport and group locking position as well as entity spawning for weapons. As for part 2 hard codeing the files...they aint:

Code:
new FILES = 3 new fileName[3][64] = {     "custom/practice.cfg",     "custom/practice_start.cfg",     "custom/practice_end.cfg" } enum {     config = 0,     pstart,     pstop }

At first looks to be hard coded. But not:

Code:
/////////////////////////////////////////////////////////////////////////////////////////// // //  plugin_cfg: Configs the plugin // public plugin_cfg() {     new folderName[64], temp[64]     get_configsdir(folderName, 63)             for(new i = 0; i < FILES; i++)     {         format(temp, 64, "%s/%s", folderName, fileName[i])         fileName[i] = temp     }         server_cmd("exec %s", fileName[config]) }

As you can see I like to use a sub folder called custom within the configs directory. This alows for a seperation of files from the ones distributed with amxmodx. Thus when and upgrade comes along I can easily delete all the old cfgs and inis within configs and not hit any of my stuff. If this is hard coding it in then I will remove it for production. This is up to you.

Cheers!

Haircut 09-28-2004 11:16

Out of interest, this plugin uses DoD cvars.

Therefore this is a DoD plugin.

Strange thing is I'm working on a very similar plugin myself, one to automate the Clan Match process.

Nice to see you had a similar idea as to who stays on server or who gets kicked before the Match Starts. Great to see you also had the same idea of using simple config files to execute, nice one.

Simple plugins are always the best :)

Zor 09-28-2004 11:52

Thanks...
Cheers!

MeTaL69 09-28-2004 13:50

Hey Zor

Could u make the time the Announcement that comes up on the hud longer, as its on & off quite quickly.
Or just let me know how & I can change it.

So what is the total time it takes to cut in & kick all the non-added people :?:

Thxs


All times are GMT -4. The time now is 13:09.

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