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?.
__________________