Player angle and walls detection
#6

as for detecting walls etc
There is a mysql database plugin which has map heights, so you can find the z coordinate which includes building tops etc.
[REL,beta] MapAndreas plugin v1.0

So to detect a wall use this function with distance to detect a wall(think its ******'s code):
Code:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
	new Float:a;
	GetPlayerPos(playerid, x, y, a);
	GetPlayerFacingAngle(playerid, a);
	x += (distance * floatsin(-a, degrees));
	y += (distance * floatcos(-a, degrees));
}
Then use the mysql to determine the z coordinate, if its higher than you are, you have a wall.
Reply


Messages In This Thread
Player angle and walls detection - by arnutisz - 04.02.2010, 05:39
Re: Player angle and walls detection - by Joe Staff - 04.02.2010, 05:44
Re: Player angle and walls detection - by ettans - 04.02.2010, 07:41
Re: Player angle and walls detection - by arnutisz - 04.02.2010, 11:37
Re: Player angle and walls detection - by Correlli - 04.02.2010, 11:39
Re: Player angle and walls detection - by mansonh - 04.02.2010, 11:56

Forum Jump:


Users browsing this thread: 2 Guest(s)