Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta_util>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /entits", "WotEntIsButt")
}
public WotEntIsButt(id)
{
new ent, bodypart;
get_user_aiming (id,ent,bodypart)
new szTarget[7], szClass[10];
entity_get_string(ent, EV_SZ_targetname, szTarget, 6);
entity_get_string(ent, EV_SZ_classname, szClass, 9);
ColorChat(id, "Entity you aim at is: %s", find_ent_by_class(ent, szClass))
return 1
}
stock ColorChat(const index, const string[], {Float, Sql, Resul,_}:...)
{
new msg[191], players[32], count = 1, Prefix[32];
get_cvar_string("amx_prefix_cvar", Prefix, 31);
static len;
len = formatex(msg, charsmax(msg), "^4[ %s ]^1 ", Prefix);
vformat(msg[len], charsmax(msg) - len, string, 3);
if(index) players[0] = index;
else get_players(players,count,"ch");
for (new i = 0; i < count; i++)
{
if(is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"),_, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
This one doesn't seem to work ( copied from Base Builder )
I needed it to know what entity are bots, in order to register ham spawn for bots.
Any answer of these will help.