[Help] New GetXYZInFrontOfPlayer
#5

Quote:

forward GetXYZInFrontOfPlayer(playerid, &Float, &Float:y, &Float:z, Float:distance);
public GetXYZInFrontOfPlayer(playerid, &Float, &Float:y, &Float:z, Float:distance) {
new Float:a; GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid, x, y, z);
if (GetPlayerVehicleID(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);

x += 0.9 // Example
y += 0.9 // Example

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

I have try to this, but nothing. There is a problem with FacingAngle...
Reply


Messages In This Thread
[Help] New GetXYZInFrontOfPlayer - by Bogdanovic - 24.10.2010, 17:22
Re: [Help] New GetXYZInFrontOfPlayer - by Grim_ - 24.10.2010, 17:25
Re: [Help] New GetXYZInFrontOfPlayer - by Bogdanovic - 24.10.2010, 17:37
Re: [Help] New GetXYZInFrontOfPlayer - by Mauzen - 24.10.2010, 18:48
Re: [Help] New GetXYZInFrontOfPlayer - by Bogdanovic - 24.10.2010, 19:00
Re: [Help] New GetXYZInFrontOfPlayer - by Bogdanovic - 24.10.2010, 19:55
Re: [Help] New GetXYZInFrontOfPlayer - by Hiddos - 24.10.2010, 20:01
Re: [Help] New GetXYZInFrontOfPlayer - by Bogdanovic - 24.10.2010, 20:37
Re: [Help] New GetXYZInFrontOfPlayer - by Bogdanovic - 24.10.2010, 20:54
Re: [Help] New GetXYZInFrontOfPlayer - by Mauzen - 24.10.2010, 22:33

Forum Jump:


Users browsing this thread: 1 Guest(s)