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

( delete me )


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
hoboman
Senior Member
Join Date: Jul 2007
Old 03-25-2008 , 19:42   ( delete me )
Reply With Quote #1

Introduction:
For my first plugin release on this forum I have decided to clamp three plugins that I have been writing to manage my server in the past month or so. The first plugin will manage the AFKs/unassigned/spectators, the second plugin will limit the amount of nades (HEs, flash bangs, smokes) bought by each team per round and prevent the players from throwing them before a certain time, and the third plugin will allow the admins to schedule commands to be executed on a given time ( precise to the minute ) and also auto comment/uncomment plugins in their plugins.ini file. Of course if you don't want to use any of the three included plugins they are easy to disable by commenting out the corresponding #defines at the top of the .sma file.

Hobo AFK Management


Description:
There are currently no working AFK management plugins out there for CS, except for Cheesy's, but it is very old now and I wasn't satisfied with its features. This started out as a modification of Cheesy's "Generic AFK Kicker", but I ended up completely rewriting it. In a nutshell the purpose of this plugin is to manage the AFKs on a server according to cvars.
Cvars:
hobo_afk_time x ( default 60 ) - the maximum allowed AFK time for an alive player
hobo_afk_immunity x ( 0/1 - default is 1 ) - if set to 1 then the admins with the immunity flag ( admin immunity, flag "a" is the default ) cannot be kicked by this plugin
hobo_afk_kick x ( 0/1 - default is 1 ) - if set to 0 then after a player is AFK for more than hobo_afk_time he will be put to spectator, otherwise he will be kicked
hobo_afk_spectator_kick x ( 1-32 - default is 16 ) - after this many or more players have joined the server a spectator will be kicked
hobo_afk_max_unassigned_time x ( default is 30 ) - after this many seconds have passed if the newly connected player is still unassigned he will be kicked
hobo_afk_warning_time x ( default is 10 ) - start warning a player this many seconds before he is kicked or put to spectator about his AFK status
Plugin Notes:
- the admin AFK immunity by default is set to flag "a", but can be changed in the .sma by the AFK_IMMUNITY define
- by default all the players are checked for AFK every 1 second, this can be modified in the .sma by the AFK_IMMUNITY define ( if this is set bellow 1, the player may be counted as not AFK on player spawn )
Hobo Nade Management

Description
:
This plugin was made with "nade drops" in mind and will prevent a player on a team from buying more than x nades per round and also prevent players from throwing a nade x seconds since the beginning of a new round.
Cvars:
hobo_t_maxhe x ( default is 2 ) - prevent a Terrorist player from buying more than x HE Grenades a round
hobo_ct_maxhe x ( default is 2 ) - prevent a Counter Terrorist player from buying more than x HE Grenades a round
hobo_t_maxflash x ( default is 3 ) - prevent a Terrorist player from buying more than x Flash Bangs a round
hobo_ct_maxflash x ( default is 3 ) - prevent a Counter Terrorist player from buying more than x Flash Bangs a round
hobo_t_maxsmoke x ( default is 1 ) - prevent a Terrorist from buying more than x Smoke Grenades a round
hobo_ct_maxsmoke x ( default is 1 ) - prevent a Counter Terrorist from buying more than x Smoke Grenades a round
hobo_slap_damage x ( default 10 ) - slap a player for x damage after he exceeded his maxnade limit
hobo_HE_time x ( default 6 ) - a player may only throw a HE Grenade after x seconds of a new round
hobo_flash_time x ( default 6 ) - a player may only throw a Flash Bang after x seconds of a new round
hobo_smoke_time x ( default 6 ) - a player may start smoking only throw a Smoke Grenade after x seconds of a new round
Plugin Notes:
- setting any of the hobo_(c)t_max(nade) cvars bellow zero will stop the plugin from limiting the nades of the team
- this plugin was made with nade drops in mind, but if you don't run that plugin on your server then you may comment out the HOBO_NADE_MANAGER_NADE_DROPS define for slightly better plugin efficiency
Hobo Crontab ( still beta )

Description:
Even though I have been testing the Hobo AFK and Nade Managers on my server for a while I have not fully tested the Hobo Crontab, therefore it is currently disabled ( the #define corresponding to its name is commented out at the top of the .sma ).
This plugin will schedule to run a list of commands or comment/uncomment a plugin from your plugins.ini file which it will read from hobo_crontab.ini file in your configs folder ( auto created if you don't create it ) on a given day of month, day of week, hour and minute.
Cron Entry Format:
Code:
day_of_month day_of_week hour minute | cmd..., $plugin_to_comment..., @plugin_to_uncomment...
- day of month has to be a number 1-32 or a * which means that for every day of month
- day of week has to be a number 0-6 where 0 is Sunday and 6 is Saturday or a * which means that for every day of week
- hour has to be a number 0-24 or a * which means that for every day of week
- minute has to be a number 0-60 or a * which means that for every day of week

- can uncomment any plugin from the plugins.ini file by putting a @ before of its name
- can comment any plugin from the plugins.ini file by putting a $ before of its name

Examples
:
Code:
03 01 02 59 | say mp_roundtime 5, say NOW
- on the third day of the month, Monday, the second hour on the fifty ninth minute change the round time to 5 minutes then the server will say "NOW"

Code:
* 2 * 2 | say hello, $repay.amxx, @ptb.amxx
- on every day of month, Tuesday, every hour and on the second minute make the server say "hello", comment the repay.amxx plugin and uncomment the ptb.amxx plugin
Commands:
hobo_crontab_reload - reloads all the entries from the hobo_crontab.ini file. This is useful because otherwise the entries only get updated on map change.
hobo_show_time - shows the current time on the game server. This is useful for planning what time to put each command for if your server is in a different timezone.
Plugin Notes:
- the maximum length of a single command in an entry is 31 characters
- the maximum number of commands per entry is 8 ( #define MAX_CMDS_PER_ENTRY )
- the maximum entries is 64 ( #define MAX_CRON_ENTRIES )
Credits:
VEN - for his "new round/spawn/round start/ round end tutorial" as I ended up hooking all four of those events, lol
CheesyPeteza - for writting the "Generic AFK Kicker" which I refered to while writting my AFK kicker
Justin
Attached Files
File Type: sma Get Plugin or Get Source (hobo_server_management.sma - 564 views - 25.7 KB)
__________________

Last edited by hoboman; 03-27-2008 at 20:18. Reason: a little update
hoboman is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 03-25-2008 , 23:49   Re: Hobo Server Management 0.1
Reply With Quote #2

Nice Job.

And you diddnt happen to see VEN's Idle Kicker by chance? I mean of course their are differences, but its pretty similar. And, you have your own spin on it. Either way, nice little compilation

Clean Code at least, maybe ML ?
And no cvar to track eh?
Possible cvar for what flag you want afk immunity? (to be kicked i mean, everybody sent to spec regardless)

Sorry for the first post to be suggestions, its good lol
__________________

Last edited by bmann_420; 03-25-2008 at 23:56.
bmann_420 is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 03-25-2008 , 23:58   Re: Hobo Server Management 0.1
Reply With Quote #3

yeah, I have seen that plugin, but I didn't like it because it needed reserved slots and it wasn't working too well for me.

in other news, I will finalize this plugin by this weekend
__________________
hoboman is offline
hasta
Senior Member
Join Date: Aug 2004
Location: Ukraine, Kyiv
Old 03-26-2008 , 06:09   Re: Hobo Server Management 0.1
Reply With Quote #4

Error
Quote:
/home/groups/alliedmodders/forums/files/2/9/0/8/3/24936.attach(281) : error 088: number of arguments does not match definition
/home/groups/alliedmodders/forums/files/2/9/0/8/3/24936.attach(284) : error 088: number of arguments does not match definition
/home/groups/alliedmodders/forums/files/2/9/0/8/3/24936.attach(301) : error 088: number of arguments does not match definition
/home/groups/alliedmodders/forums/files/2/9/0/8/3/24936.attach(481) : error 088: number of arguments does not match definition
hasta is offline
Send a message via ICQ to hasta
hoboman
Senior Member
Join Date: Jul 2007
Old 03-26-2008 , 11:27   Re: Hobo Server Management 0.1
Reply With Quote #5

Quote:
Originally Posted by hasta View Post
Error
that's the damn old compilers fault...i fixed it now though

Quote:
Clean Code at least, maybe ML ?
And no cvar to track eh?
Possible cvar for what flag you want afk immunity? (to be kicked i mean, everybody sent to spec regardless)
I really don't like ML, but maybe I will add it anyways...
not sure what you mean, by cvar to track..
The immunity flag can be changed by the AFK_IMMUNITY define as I already stated in the first post.
__________________
hoboman is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-26-2008 , 11:33   Re: Hobo Server Management 0.1
Reply With Quote #6

Why make an all-in-one plugin ??
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 03-26-2008 , 14:02   Re: Hobo Server Management 0.1
Reply With Quote #7

why not?
__________________
hoboman is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-26-2008 , 14:08   Re: Hobo Server Management 0.1
Reply With Quote #8

Because they are not related one to each others ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 03-26-2008 , 14:44   Re: Hobo Server Management 0.1
Reply With Quote #9

I mean FCVAR for tracking thru gamemonitor or amxmodx stats

and a cvar for a flag, since alot do not know how to recompile.

Dont need to, just thought about it
__________________
bmann_420 is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 03-26-2008 , 15:53   Re: Hobo Server Management 0.1
Reply With Quote #10

Quote:
Originally Posted by bmann_420 View Post
And you diddnt happen to see VEN's Idle Kicker by chance? I mean of course their are differences, but its pretty similar. And, you have your own spin on it.
Or my "Play or Be Kicked"?
__________________
Brad 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 16:52.


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