Raised This Month: $32 Target: $400
 8% 

Practice - Makes Practicing Easy


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:          Approver:   Johnny got his gun (102)
Zor
Veteran Member
Join Date: Mar 2004
Location: Toronto, ON
Old 09-20-2004 , 12:21   Practice - Makes Practicing Easy
Reply With Quote #1

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!
Attached Files
File Type: zip clanpractice.zip (1.4 KB, 672 views)
File Type: sma Get Plugin or Get Source (amx_practice.sma - 1892 views - 6.5 KB)
__________________
Zor is offline
Send a message via AIM to Zor Send a message via MSN to Zor Send a message via Yahoo to Zor
Zor
Veteran Member
Join Date: Mar 2004
Location: Toronto, ON
Old 09-21-2004 , 13:15  
Reply With Quote #2

**BUMP**
New version.
__________________
Zor is offline
Send a message via AIM to Zor Send a message via MSN to Zor Send a message via Yahoo to Zor
Jedi
Member
Join Date: Mar 2004
Location: Houston, TX
Old 09-21-2004 , 20:58  
Reply With Quote #3

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.
__________________
Jedi is offline
Zor
Veteran Member
Join Date: Mar 2004
Location: Toronto, ON
Old 09-21-2004 , 22:19  
Reply With Quote #4

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!
__________________
Zor is offline
Send a message via AIM to Zor Send a message via MSN to Zor Send a message via Yahoo to Zor
Jedi
Member
Join Date: Mar 2004
Location: Houston, TX
Old 09-21-2004 , 22:27  
Reply With Quote #5

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.
__________________
Jedi is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 09-22-2004 , 05:12  
Reply With Quote #6

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

Also don't use hardcoded paths.
Johnny got his gun is offline
Zor
Veteran Member
Join Date: Mar 2004
Location: Toronto, ON
Old 09-22-2004 , 21:10  
Reply With Quote #7

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!
__________________
Zor is offline
Send a message via AIM to Zor Send a message via MSN to Zor Send a message via Yahoo to Zor
Haircut
Member
Join Date: Mar 2004
Location: UK
Old 09-28-2004 , 11:16  
Reply With Quote #8

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
__________________
MardyMouse.co.uk
MardyMouse.co.uk UK DoD Server IP: 83.142.52.21:27015
Haircut is offline
Zor
Veteran Member
Join Date: Mar 2004
Location: Toronto, ON
Old 09-28-2004 , 11:52  
Reply With Quote #9

Thanks...
Cheers!
__________________
Zor is offline
Send a message via AIM to Zor Send a message via MSN to Zor Send a message via Yahoo to Zor
MeTaL69
Senior Member
Join Date: Jun 2004
Location: England
Old 09-28-2004 , 13:50  
Reply With Quote #10

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
__________________
We own alll ya asses ;)
MeTaL69 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 12:25.


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