Need Some Help With Detecting The Andromada Back - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need Some Help With Detecting The Andromada Back (
/showthread.php?tid=283521)
Need Some Help With Detecting The Andromada Back -
titanak - 15.09.2011
RESOLVED
Re: Need Some Help With Detecting The Andromada Back -
iPLEOMAX - 15.09.2011
pawn Код:
stock IsPlayerAtAndromadaBack(playerid, andromada_vehicle_id) //iPLEOMAX
{
if(GetVehicleModel(andromada_vehicle_id) != 592) return false;
new
Float:X,
Float:Y,
Float:Z,
Float:FA
;
GetVehiclePos(andromada_vehicle_id, X, Y, Z);
GetVehicleZAngle(andromada_vehicle_id, FA);
X += floatsin(-FA, degrees) * -15;
Y += floatcos(-FA, degrees) * -15;
if(IsPlayerInRangeOfPoint(playerid, 4, X,Y,Z-0.7)) return true;
return false;
}
//Also thanks to ****** for his GetXYInFrontOfPlayer stock which gave me ideas.
[ame]http://www.youtube.com/watch?v=gi1CiaKrflc[/ame]
Re: Need Some Help With Detecting The Andromada Back -
titanak - 15.09.2011
Wow thanks very much repp