Raised This Month: $ Target: $400
 0% 

Detect players origins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 09-05-2019 , 18:15   Re: Detect players origins
Reply With Quote #1

already not working

Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
 
public plugin_init() 
{     
	register_forward(FM_TraceHull,"fm_tracehull",1);
}


public fm_tracehull(Float:start[3],Float:end[3],noMonsters,hull,id,trace)
{
	if(!is_user_connected(id) || !is_user_alive(id))
		return FMRES_IGNORED;
	
	new hit = get_tr2(trace,TR_pHit);

	if(!is_user_alive(hit))
		return FMRES_IGNORED;

	new CsTeams:team = cs_get_user_team(id)

	new Origin[3]
	get_user_origin(id, Origin);
	
	new enemycount=0
	
	new ent = -1
	while((ent = engfunc(EngFunc_FindEntityInSphere, ent, Origin, 150.0)) != 0)
	{
		if(!pev_valid(ent) || !is_user_alive(ent))
			continue
		
		if (team==cs_get_user_team(ent))
			continue
		
		enemycount++
		
		if (enemycount>1)
		{
			set_tr2(trace,TR_flFraction,1.0);
			client_print(0, print_chat, "[TEST]");
		}
	}

	return FMRES_IGNORED;
}

Last edited by raizo11; 09-05-2019 at 18:15.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
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 17:19.


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