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

AMXX Health/Armor Control


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:         
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 11-10-2005 , 11:08   AMXX Health/Armor Control
Reply With Quote #1

Code:
/* AMX Mod X Plugin
*	Charr  - [email protected]
*	Thread -
*
*  AMXX Health (and Armor)
*	This plugins allows for manipulating a user's current HP/AP
*	It can Add, Subtract, Multiply, Divide, and Set Health/Armor for a user
*
*  Commands
*	amx_health
*	amx_armor
*
*  Version History
*	1.0.BETA - Initial Build
*	1.0	 - Initial Release
*	1.1	 - Combound Health and Armor by VEN's suggestion
*
*  Future Updates: 
*	Create a More Effecient Script
*	Add All and Team targeting
*	Add Regneration and Poisoning
*/
Code:
Requires: Fun

Known Errors: None

Cvars: amx_health_show - Shows activity (1-4)
   Examples:
      4 - [AMXX] Charr Added 100 HP to Charr
      3 - [AMXX] Added 100 HP to Charr
      2 - [AMXX] Charr Added HP to Charr
      1 - [AMXX] Added HP to Charr
Code:
Defines:
 /* PRINT is the destination for client messages (for this plugin only)
*  (Recommended)
*   print_notify   - Displays messages in the Top-Left corner of the Screen
*   print_char     - Displays messages as normal chat
*
*  (Not-Recommended)
*   print_center   - Displays messages as a centered HUD Message (Doesn't Last too Long)
*   print_console  - Displays messages in the Console
*/ 

#define PRINT print_chat
Attached Files
File Type: sma Get Plugin or Get Source (amx_health.sma - 1389 views - 9.6 KB)
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 11-10-2005 , 11:15  
Reply With Quote #2

thats cool with the deviding thing and all...cant test right now...will test later...

at first i was like "this is like part of amx_heal" but then i saw the armor and the division stuff...thats kool...+karma if it works!
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
VEN
Veteran Member
Join Date: Jan 2005
Old 11-11-2005 , 08:49  
Reply With Quote #3

Charr:

GJ.

I haven't found PRINT define and amx_health_show CVAR in the source code but there are amx_show_activiy.

"maxi" is never used.

Also i recommend you use one unified function insted of two very similar.
VEN is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 11-11-2005 , 09:18  
Reply With Quote #4

Whoops, uploaded an older version.
Going to update a new version.

Edit:
Uploaded
[1.1]
- Combound Health and Armor by VEN's suggestion
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
MickeyMouse00
Guest
Old 11-15-2005 , 21:14   Installation Help
Reply With Quote #5

Hello

Could you please tell me how to get this plugin to work. I run a part time dedicated server in which I have Admin_mod, AMX-Mod, Hook_mod up and running. I've been looking for a plugin that would do something like this for me.

Any documentation would be great. Also could you please help me set up the AMX Fun commands or what ever they are called.

Michael
Mik3h
Senior Member
Join Date: Sep 2005
Location: Amst3rdam
Old 11-16-2005 , 06:21  
Reply With Quote #6

Very Very Very simple, maybe its just me but there are more plugins with this function.
But its nice though.
__________________
Talk sense to a fool and he will cal you foolish
Mik3h is offline
Send a message via MSN to Mik3h
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-16-2005 , 06:26  
Reply With Quote #7

So can I do this?
amx_health v3x "40 * 60 / 2 + 5 - 8.05"



Edit: zomg I was just kidding ctfo
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-16-2005 , 08:11  
Reply With Quote #8

Charr:
Code contain very similar parts again.
Why just you don't use some loops with constants?

Code:
#define LOVERCASE_NUM 2 new const LOVERCASE[LOVERCASE_NUM][] = {"health", "armor"} #define UPPERCASE_NUM 2 new const UPPERCASE[UPPERCASE_NUM][] = {"Health", "Armor"} #define ARG_NUM 7 new const ARGS[ARG_NUM][] = {"help", "?", "+", "-", "*", "/", "="}

v3x: No.
VEN is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 11-17-2005 , 20:47  
Reply With Quote #9

I going to re-write this from scratch tommorow.
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 12-14-2005 , 18:13  
Reply With Quote #10

Duplicate.
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull 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 17:58.


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