Coords infront of a player
#2

Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
	// Created by ******

	new Float:a;

	GetPlayerPos(playerid, x, y, a);
	GetPlayerFacingAngle(playerid, a);

	if (GetPlayerVehicleID(playerid)) {
	    GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
	}

	x += (distance * floatsin(-a, degrees));
	y += (distance * floatcos(-a, degrees));
}
Reply


Messages In This Thread
Coords infront of a player - by Anthony © - 20.10.2012, 15:01
Re: Coords infront of a player - by newbienoob - 20.10.2012, 15:03
Re: Coords infront of a player - by Anthony © - 20.10.2012, 15:13
Re: Coords infront of a player - by Mauzen - 20.10.2012, 15:24
Re: Coords infront of a player - by Virus. - 20.10.2012, 15:27
Re: Coords infront of a player - by Anthony © - 20.10.2012, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)