why not this ?
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
new g_iHealthStartCvar;
public plugin_init( )
{
register_plugin( "Health Start", "0.1", "swapped" );
RegisterHam( Ham_Spawn, "player", "FwdPlayerRespawn", 1 );
g_iHealthStartCvar = register_cvar( "mp_starthealth", "150" );
}
public FwdPlayerRespawn( PlayerID )
{
if ( is_user_alive( PlayerID ) )
{
set_user_health( PlayerID, get_pcvar_num( g_iHealthStartCvar ) );
}
}