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

Bleeding Death


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
The Gaming Guy
Junior Member
Join Date: Dec 2015
Old 05-02-2016 , 12:51   Bleeding Death
Reply With Quote #1

THIS PLUGIN IS CURRENTLY IN TESTING/BETA MODE.
Introduction

So , this is a plugin which makes a player bleed after he has reached x (default : 20)number of health. His health decrease by x (default : 1)health point every x (default : 10) second.
Cvars
1. amx_bleed_hp - Defines how much health points should be decreased every x seconds.
2. amx_bleed_time - Defines the x seconds in the above cvar.
3. amx_bleed_start_hp - Defines after what health should a player start bleeding.
To Do :
1. Add a DHUD message warning a player that he has started bleeding.
2. Add a cvar to turn this plugin on/off.
3. Fix the 2 warnings in compilation.
Attached Files
File Type: sma Get Plugin or Get Source (BleedingDeath.sma - 202 views - 1.1 KB)
__________________
Working on a CD - Hack Detector Plugin For Amxx. (80%)

Last edited by The Gaming Guy; 05-06-2016 at 12:56. Reason: Edited.
The Gaming Guy is offline
blanko
Senior Member
Join Date: Aug 2008
Old 05-04-2016 , 17:47   Re: Bleeding Death
Reply With Quote #2

Failed to compile!
__________________
blanko is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-05-2016 , 05:17   Re: Bleeding Death
Reply With Quote #3

Please read the rules. Redundant, doesn't even compile. Unapproved. Don't release again a plugin until you know what you're doing, thanks.
__________________
Arkshine is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 05-05-2016 , 11:37   Re: Bleeding Death
Reply With Quote #4

Fixed:
Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

//Variables 

new PLUGIN[]="Bleeding Death";
new AUTHOR[]="The Gaming Guy";
new VERSION[]="1.00";

new g_current_hp , g_next_hp , cvar_hp_dec , cvar_hp_time , cvar_hp_dec_start, g_hp_dec , g_hp_dec_start;
new Float:g_hp_time;

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    cvar_hp_dec = register_cvar("amx_bleed_hp","1");
    cvar_hp_time = register_cvar("amx_bleed_time","10");
    cvar_hp_dec_start = register_cvar("amx_bleed_start_hp","20");
    
}

public client_putinserver(id) {
    g_hp_dec_start = get_pcvar_num(cvar_hp_dec_start);
    g_hp_time = get_pcvar_float(cvar_hp_time);
    g_current_hp = get_user_health(id);
    
    set_task(1.0, "loop",id);
}

public loop(id) {
    if (g_current_hp <= g_hp_dec_start)
        set_task(g_hp_time,"health_dec");
}

public health_dec(id){
    g_hp_dec = get_pcvar_num(cvar_hp_dec);
    
    g_next_hp = (g_current_hp - g_hp_dec);
    
    set_user_health(id,g_next_hp);
    set_task(0.1,"loop",id);
}
Still bad as f**k
__________________

Last edited by simanovich; 05-05-2016 at 11:37.
simanovich is offline
The Gaming Guy
Junior Member
Join Date: Dec 2015
Old 05-06-2016 , 12:54   Re: Bleeding Death
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
Please read the rules. Redundant, doesn't even compile. Unapproved. Don't release again a plugin until you know what you're doing, thanks.
No ! But it did compile when I compiled it using online complier.
__________________
Working on a CD - Hack Detector Plugin For Amxx. (80%)
The Gaming Guy is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 05-13-2016 , 16:33   Re: Bleeding Death
Reply With Quote #6

Wtf? O.o
PHP Code:
&#271;żĽ

&#271;żĽÂ*

&#271;żĽ

simanovich

SourceMod Donor

&#271;żĽ

Join DateJun 2012

Location
Israel

&#271;żĽ

&#271;żĽÂ*Yesterday , 09:07 PM Â* Re: Bleeding Death

&#271;żĽÂ*Â*Â*#4

Fixed:

Code:

#include <amxmodx> #include <cstrike> #include <fun> //Variables new PLUGIN[]="Bleeding Death"; new AUTHOR[]="The Gaming Guy"; new VERSION[]="1.00"; new g_current_hp , g_next_hp , cvar_hp_dec , cvar_hp_time , cvar_hp_dec_start, g_hp_dec , g_hp_dec_start; new Float:g_hp_time; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); cvar_hp_dec = register_cvar("amx_bleed_hp","1"); cvar_hp_time = register_cvar("amx_bleed_time","10"); cvar_hp_dec_start = register_cvar("amx_bleed_start_hp","20"); } public client_putinserver(id) { g_hp_dec_start = get_pcvar_num(cvar_hp_dec_start); g_hp_time = get_pcvar_float(cvar_hp_time); g_current_hp = get_user_health(id); set_task(1.0, "loop",id); } public loop(id) { if (g_current_hp <= g_hp_dec_start) set_task(g_hp_time,"health_dec"); } public health_dec(id){ g_hp_dec = get_pcvar_num(cvar_hp_dec); g_next_hp = (g_current_hp - g_hp_dec); set_user_health(id,g_next_hp); set_task(0.1,"loop",id); } 
__________________
Artifact 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 09:23.


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