Hi there,
I'm planning to make a plugin to get like 40+ hp and armor (in counter-strike 1.6) - after get one kill - and for example - if you kill some1 and you have 70hp - +40, then you'll have 110hp (it can be over 100) - but i want it with a maximun of 220hp and 150armor..i tried to code this using the code posted on this thread, but didn't get luck:
https://forums.alliedmods.net/showthread.php?t=67284
This is my current code:
Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
// Health limit
#define LIMIT 99999999
public plugin_init()
{
register_plugin("HP + AP After Kill -", "0.1", "Mxx");
register_event("DeathMsg", "event_DeathMsg", "a");
}
public event_DeathMsg()
{
static killer, victim;
killer = read_data(1);
victim = read_data(2);
if(!is_user_connected(killer) || !is_user_connected(victim) || !is_user_alive(killer))
return;
cs_set_user_armor(killer, min(LIMIT, get_user_armor(killer) +20), CS_ARMOR_VESTHELM);
set_user_health(killer, min(LIMIT, get_user_health(killer) + 40));
}
All i need now is set the maximun HP to 220 and armor to 100 - any ideas?
I'll be really thankful if i get this working - thanks beforehand!