Raised This Month: $ Target: $400
 0% 

entity finder and name of bot entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-25-2016 , 16:44   entity finder and name of bot entity
Reply With Quote #1

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.
eyal282 is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 08-25-2016 , 17:48   Re: entity finder and name of bot entity
Reply With Quote #2

is_user_bot?
SpeeDeeR is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-25-2016 , 18:29   Re: entity finder and name of bot entity
Reply With Quote #3

RegisterHam(Ham_Spawn, "is_user_bot()", "HamSpawn")

I don't think so XD.

need entity.
eyal282 is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 08-25-2016 , 20:39   Re: entity finder and name of bot entity
Reply With Quote #4

Use RegisterHamPlayer.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode