Get dead players in radius
Help m! How to get dead players in radius?! (NOT SPECTATORS!)
I tried use get_user_origin,get_players_distance, entity_get_vector( id, EV_VEC_origin But instead origin of dead players(position of dead player body) , i got origin of spectator players(position at what dead player look at this moment)... |
Re: Get dead players in radius
You can try hooking when the player dies and save the origin to variable. Once you have this, you can do whatever you want with it.
|
Re: Get dead players in radius
Quote:
Impossible to get player dead body position ? :) :) :) :) |
Re: Get dead players in radius
And how do you find strange to get the dead player's dead body origin when he is dying? That is the regular thing to be done like this..
Code:
|
Re: Get dead players in radius
Quote:
|
Re: Get dead players in radius
Quote:
I didn't play cs in ages so I do not remember, but if a player is killed while airborne then his body will fail straight down, right? Then you just get the kill position and do a traceline downwards(from current position to a new position which has the same x, y as the kill pos and z is -9999.9). Get the TR_vecEndPos from the traceline and you got the position where the body "landed"(assuming it goes straight down). You may want to add a small offset to the z component depending on what you will use this position for. |
Re: Get dead players in radius
You will have to get it grounded. Consider using this https://forums.alliedmods.net/showpo...&postcount=103
Or you can try to pev_origin X and Y, then pev_absmin on Z |
Re: Get dead players in radius
Need just wait two second after dead message, and then get real origin of dead body!
|
All times are GMT -4. The time now is 18:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.