18.04.2018, 22:08
can someone tell me , or give me a script for do this: https://www.youtube.com/watch?v=cpTLRnuhA6w
min 1:50
script for the airplane
please.
min 1:50
script for the airplane
please.
#if defined SPAWNAIRCRAFT
#endinput
#endif
#define SPAWNAIRCRAFT
#if !defined S_AIR__DISTANCE
#define S_AIR__DISTANCE (4000.0)
#endif
#if !defined S_AIR__FLIGHT
#define S_AIR__FLIGHT (450.0)
#endif
#if !defined floatrandom
#define floatrandom(%0) (float(random(%0))+float(random(1000))/1000)
#endif
stock GetDirectionOfAircraft(&Float:angle, &Float:x, &Float:y, &Float:z, &Float:fpoint_x, &Float:fpoint_y, Float:fault = 0.0)
{
static
Float:distance = S_AIR__DISTANCE;
z = S_AIR__FLIGHT;
angle = floatrandom(360);
x = 0.0 + distance * -floatsin(angle, degrees);
y = 0.0 + distance * floatcos(angle, degrees);
distance *= 2.0;
angle += fault + floatrandom(90) - 45.0;
fpoint_x = x + distance * -floatsin(angle, degrees);
fpoint_y = y + distance * floatcos(angle, degrees);
distance = S_AIR__DISTANCE;
return 1;
}
/*
by m1n1vv
Version: 0.1
*/
&Float:angle - returns plane`s angle of direction. &Float:x - returns flight starting pos by X. &Float:y - returns flight starting pos by Y. &Float:z - returns flight starting pos by Z. &Float:fpoint_x - returns flight end pos by Z. &Float:fpoint_y - returns flight end pos by Y. Float:fault - If by default object rotated not good u can write here this fault.