Witam! Potrzebuje prostego pluginu, który będzie pokazywał w lewym dolnym rogu ekranu obecną ilość HP i AP.
Plugin od HP który napisał R3X pokazuje info nawet jak wartość przekracza 255HP
#include <amxmodx>#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Real HP"
#define VERSION "1.0"
#define AUTHOR "R3X"
#define CHANNEL 1
#define FRAMES 10
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_message(get_user_msgid("Health"),"message_health");
register_forward(FM_PlayerPreThink, "fwPreThink", 1);
}
public message_health(msg_id,msg_dest,msg_entity)
{
if(pev(msg_entity, pev_health) >= 255){
set_msg_arg_int(1, ARG_BYTE, 255);
}
return PLUGIN_CONTINUE;
}
public fwPreThink(id)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
static iCounter[33]={0,...};
if(++iCounter[id] >= FRAMES)
{
set_hudmessage(0, 200, 200, 0.02, 0.70,0,0.0, 0.5,0.0,0.0,CHANNEL );
show_hudmessage(id, "HP: %d", pev(id, pev_health));
iCounter[id]=0;
}
return FMRES_IGNORED;
}
Do AP niestety nie mam.
ale to chyba powinno działać(nie znam się na funkcji get_user_msgid, nie znalazłem w niej opcji Armor tylko ArmorType co bardziej chyba wskakuje czy mamy kamizelek czy kamizelkę + hełm ale pewien nie jestem
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Real AP"
#define VERSION "1.0"
#define AUTHOR "R3X"
#define CHANNEL 1
#define FRAMES 10
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_message(get_user_msgid("ArmorType"),"message_armor");
register_forward(FM_PlayerPreThink, "fwPreThink", 1);
}
public message_armor(msg_id,msg_dest,msg_entity)
{
if(pev(msg_entity, pev_armorvalue) >= 255){
set_msg_arg_int(1, ARG_BYTE, 255);
}
return PLUGIN_CONTINUE;
}
public fwPreThink(id)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
static iCounter[33]={0,...};
if(++iCounter[id] >= FRAMES)
{
set_hudmessage(0, 255, 170, 0.01, 0.18,0,0.0, 0.5,0.0,0.0,CHANNEL );
show_hudmessage(id, "HP: %d", pev(id, pev_armorvalue));
iCounter[id]=0;
}
return FMRES_IGNORED;
}