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

Admin At Hand


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2008 , 00:16   Admin At Hand
Reply With Quote #1

Admin At Hand
by Exolent


Description:
  • Have you ever needed to slap, slay, or even kick a person immediately,
    but didn't have the time to open up console or the amxmodmenu?
  • With this plugin, you can slap, slay, and even kick a person just by looking at them!
Note:
  • Please read this whole post before asking for help!
Admin Commands:
  • +slap - Slaps a player that you are looking at or that you are spectating for an amount defined by the cvar look_slapamt.
  • +slay - Slays a player that you are looking at or that you are spectating.
  • +kick - Kicks a player that you are looking at or that you are spectating.

    You must have the admin flag required for each command
    In other words, you cannot do +slay without amx_slay access.
How do I use these commands?
  • Bind a key to these commands in your userconfig.cfg, then hold the key down and aim at the player.
  • Example:
    Code:
    bind f +slay
    bind g +slap
    bind k +kick
  • If you want to toggle it on and off, use these in your userconfig.cfg
    Code:
    // toggle +slap
    bind yourkeyhere toggleslap
    alias toggleslap slapon
    alias slapon "+slap; alias toggleslap slapoff"
    alias slapoff "-slap; alias toggleslap slapon"
    
    // toggle +slay
    bind yourkeyhere toggleslay
    alias toggleslay slayon
    alias slayon "+slay; alias toggleslay slayoff"
    alias slayoff "-slay; alias toggleslay slayon"
    
    // toggle +kick
    bind yourkeyhere togglekick
    alias togglekick kickon
    alias kickon "+slay; alias togglekick kickoff"
    alias kickoff "-slay; alias togglekick kickon"
Cvar:
  • look_slapamt <#> - amount of damage to deal a player from slapping them. (Use -1 for random amount 0-100) (Default: 0)
Installation:
  1. Download the adminathand.amxx attached to the end of this post.
  2. Place adminathand.amxx in your server's addons/amxmodx/plugins folder.
  3. Open up your server's plugins.ini, located in your server's addons/amxmodx/configs folder.
  4. Inside the plugins.ini, write "adminathand.amxx" at the last line of the file.
  5. Save the file and restart the server. (amx_rcon restart)
Changelog:
  • Version 0.1
    - Initial release
  • Version 0.2
    - Fixed small bug
Credits:
  • Numb
    - for colorchat.inc
Current Version: 0.2
Attached Files
File Type: inc colorchat.inc (2.0 KB, 133 views)
File Type: sma Get Plugin or Get Source (adminathand.sma - 823 views - 3.2 KB)
File Type: amxx adminathand.amxx (7.2 KB, 133 views)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Zenith77; 02-10-2008 at 10:57. Reason: Reattached .amxx
Exolent[jNr] is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2008 , 00:16   Re: Admin At Hand
Reply With Quote #2

Suggestions are welcome!
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 02-09-2008 at 00:27.
Exolent[jNr] is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 02-09-2008 , 01:39   Re: Admin At Hand
Reply With Quote #3

This is unique, but I like it, ill take a look at the source.
Styles is offline
Send a message via AIM to Styles
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-09-2008 , 01:56   Re: Admin At Hand
Reply With Quote #4

I usully use amx_slapmenu and amx_kickmenu without opening console, but i like the aiming part
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 02-09-2008 , 02:11   Re: Admin At Hand
Reply With Quote #5

Lines 108 and 113 have useless calls to is_user_connected(). 113 could also be changed from an 'if' to an 'else' and accomplish the same thing.

Other than that, nicely done plugin.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2008 , 02:16   Re: Admin At Hand
Reply With Quote #6

Thanks Xanimos for catching that. It was supposed to check connection of "player" to see if "id" is spectating someone.
That way it would slay the person and not the person that you are spectating is looking at.

Fixed that, and a redundant cmd retrieval.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
freamer
Member
Join Date: Nov 2005
Old 02-09-2008 , 02:45   Re: Admin At Hand
Reply With Quote #7

this was already done...
and in more dynamic way, this plugin looks like solid. We cant add any new commands.
freamer is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-09-2008 , 02:54   Re: Admin At Hand
Reply With Quote #8

You (nobody) are not allowed to attach .amxx files since UAIO story
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2008 , 02:59   Re: Admin At Hand
Reply With Quote #9

I thought i was supposed to because i used a non-default include?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-09-2008 , 05:29   Re: Admin At Hand
Reply With Quote #10

- no -
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 14:19.


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