PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
public plugin_init() {
register_plugin("headshotRestore", "1.0", "made.tn")
RegisterHam(Ham_Killed, "player", "PlayerKilledPost", 1)
}
public PlayerKilledPost(victim, attacker, shouldgib) {
if(!is_user_connected(attacker))
return PLUGIN_CONTINUE
if(victim == attacker)
return PLUGIN_CONTINUE
if(get_pdata_int(victim, 75) != HIT_HEAD)
return PLUGIN_CONTINUE
if(get_user_health(attacker) == 100)
client_print(attacker, print_chat, "Your life already is 100")
else {
set_user_health(attacker, 100)
client_print(attacker, print_chat, "Your life changed to 100")
}
return PLUGIN_HANDLED
}
but there is an error
//// hprestore.sma
// C:\AMX Mod X\files\base\scripting\hprestore.sma(36) : warning 217: loose indentation
// Header size: 564 bytes
// Code size: 984 bytes
// Data size: 448 bytes
// Stack/heap size: 16384 bytes; estimated max. usage=781 cells (3124 bytes)
// Total requirements: 18380 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0,28 sec
Help
and thanks