Raised This Month: $ Target: $400
 0% 

Check Target Infront of you


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 02-26-2007 , 20:40   Re: Check Target Infront of you
Reply With Quote #2

To check if a player is in front of you. You can try using is_in_viewcone.

PHP Code:
/* SDK function - checks if an origin is in an entity's view cone
 * Set use3d to 1 to do the calculation in 3D. Otherwise it will be in 2D.
 */
native is_in_viewcone(entityFloat:origin[3], use3d 0); 
For damage, you have to do it in the Damage event. As for a custom deathmsg use the stock make_deathmsg from message_stock.inc.

PHP Code:
message_begin(MSG_ALLget_user_msgid("DeathMsg"), {0,0,0}, 0);
write_byte(killer);
write_byte(victim);
write_byte(headshot);
write_string(weapon);
message_end(); 
Since their is no sprite for a weapon "kick" it will show a skull instead.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
 



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 00:41.


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