Raised This Month: $ Target: $400
 0% 

code to block round hp.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SkumTomteN
Veteran Member
Join Date: Oct 2013
Location: Asgard
Old 12-19-2013 , 10:42   code to block round hp.
Reply With Quote #1

This is the code to do it. the zp 4.3 got bugs. that will make so human "by accident", have 4000 hp, or 350. 650. random. and last human hp will save in the next round. (BAD!)

This is the way i want it.

humans always start round with 250 hp. and last human have 1000 hp. the hp will be 250 in the next round and so on.

and if used an anit-dote. it will be 250 hp. This is the only code i got. thats not working well.

Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>

#define PLUGIN "No Round Start Heal"
#define VERSION "1.0"
#define AUTHOR "Sho0ter"

new health[33]

public plugin_init()
{
    	register_plugin(PLUGIN, VERSION, AUTHOR)
    	RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
    	register_logevent("round_end", 2, "1=Round_End")
    	register_event("TextMsg", "round_restart", "a", "2&#Game_C", "2&#Game_w")
    	return PLUGIN_CONTINUE
}

public client_putinserver(id)
{
    	health[id] = 250
    	return PLUGIN_CONTINUE
}

public fw_PlayerSpawn_Post(id)
{
    	if(!is_user_connected(id) || !is_user_alive(id) || health[id] <= 250)
    	{
        	return PLUGIN_CONTINUE
    	}
    	set_user_health(id, health[id])
    	health[id] = 250
    	return PLUGIN_CONTINUE
}

public round_end()
{
	for(new id; id <= get_maxplayers(); id++)
    	{
        	if(!is_user_connected(id) || !is_user_alive(id) || get_user_team(id) != 2)
        	{
            		continue
        	}
        	health[id] = get_user_health(id)
    	}
    	return PLUGIN_CONTINUE
}

public round_restart()
{
    	for(new id; id <= get_maxplayers(); id++)
    	{
        	health[id] = 250
    	}
    	return PLUGIN_CONTINUE
}
is it something wrong with it?.
__________________
Contact: Steam
Videos: Youtube
SkumTomteN is offline
 



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 20:39.


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