Raised This Month: $ Target: $400
 0% 

Hit to map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPossible
Junior Member
Join Date: Jul 2014
Old 07-14-2014 , 10:01   Hit to map
Reply With Quote #1

How check when player do hit to part of map with damage or without damage?

My code, but it doesnt work.... Help, somebody...

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN	"Hit to map"
#define VERSION	"0.1"
#define AUTHOR	"xPossible"

public plugin_init() 
{ 
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_forward(FM_TraceLine, "traceline_forward");
}

public traceline_forward(Float:start[3], Float:end[3], conditions, id, trace)
{
	if (!is_user_alive(id))
		return FMRES_IGNORED;

	if (!(pev(id, pev_button) & (IN_ATTACK | IN_ATTACK2)))
		return FMRES_IGNORED;
	
	new hit = get_tr2(trace, TR_pHit);
	
	if (hit == 0)
		client_print(id, print_chat, "Your victim is MAP! You hit a map!");

	return FMRES_IGNORED;
}
xPossible is offline
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 21:05.


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