Is vehicle flying - 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: Is vehicle flying (
/showthread.php?tid=566664)
Is vehicle flying -
cnoopers - 07.03.2015
Anyway to check is player's vehicle flying? I mean - ex. from ramp.
Re: Is vehicle flying -
ATGOggy - 07.03.2015
Yeah, by using mapandreas.
Re: Is vehicle flying -
Abagail - 07.03.2015
You can try checking the vehicle's velocity, however there is no native / surefire(to my knowledge) way to detect it.
Re: Is vehicle flying -
Golf - 07.03.2015
by
mapandreas
PHP код:
#include <a_samp>
#include <mapandreas>
OnFilterScriptInit()
{
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:Pos[4];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
MapAndreas_FindZ_For2DCoord(Pos[0], Pos[1], Pos[3]);
if(Pos[2] > Pos[3] && Pos[2] < Pos[3])
{
// FLAYY
}
return 1;
}
Golf,