Check Target Infront of you
How would you check if a player is infront of you?
Also the other thing is how do you show somebody is taking damage and possibly died from something else like a Kick in cs? Saw this code in a ClusterGernade..Don't get it.. Can't remeber how this stuff works. To much ( GAY ) Java. //http://www.amxmodx.org/funcwiki.php?go=func&id=262 How do you know all the different types? Code:
//Displays who killed whoCode:
new origin[3], target[3]; |
Re: Check Target Infront of you
To check if a player is in front of you. You can try using is_in_viewcone.
PHP Code:
PHP Code:
|
Re: Check Target Infront of you
Well what If i needed something that would do 20 damage a time. No headshots or anything. Just like that. ?
How do you deal the damage? and The target is the gun infront of you with Victim. Killer is your players name right? |
Re: Check Target Infront of you
- Try fakedamage from engine.
PHP Code:
PHP Code:
PHP Code:
Reference:http://wiki.amxmodx.org/index.php/Ha...vents#DeathMsg eg. PHP Code:
|
Re: Check Target Infront of you
k Thanks that lloks like it will work! The thing I still don't get is the, if the person is RIGHT infront of you, I looked at the thing you said, it looks like a radius around you.
|
Re: Check Target Infront of you
Code:
/* SDK function - checks if an origin is in an entity's view coneCode:
Float: get_user_aiming ( index, &id, &body, [ distance = 9999 ] )To check the distance of the player you can run a trace_line. |
Re: Check Target Infront of you
get_user_aiming THATS IT lol I couldn't remeber k, so its get_user_aiming( index, VICTIM, Body?!, 2);
|
Re: Check Target Infront of you
Quote:
Yeah, index would be id Write it like this if you want to make an IF statement: Code:
|
| All times are GMT -4. The time now is 00:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.