Possible to run client scripts as the server?

how about this plan:

  • CreateVehicle on the server to create your plane
  • Use a combination of SetEntityCoords, SetEntityHeading, SetEntityRotation and SetEntityVelocity to make a working script of an airplane flying in the sky?

These natives are all server-side.

True, but rather than leveraging the vehicle controls to result in a desired coord, handling, rotation, and velocity, they immediately snap your target entity to the desired metric.

I’ve actually used some of these server side (and all of them in some fashion) for the purposes of testing and they work great…but not for the goal I’m trying to accomplish unfortunately…

Can these other natives help achieve your goal with the planes?

In theory, you can make an NPC the pilot of the plane and make it do stuff automatically.

When I suggested the Set* natives, I was thinking you wanted to put them in a loop on a thread, and make it fly a set route. What’s your goal with the plane?

That’s actually exactly what I wanted to do, however, setting physical changes in direction, speed, heading, and roll, would unfortunately require significantly more lines of code. I’d have to study each plane’s handling characteristics under a microscope (I modify plane handlings as well) and try to emulate them. Also, they’d be subject to change which would cost hours upon hours of work on a per plane basis…unfortunately it wont work for me

Hey! Long time. Have you found a solution?

You wrote:

True, but rather than leveraging the vehicle controls to result in a desired coord, handling, rotation, and velocity, they immediately snap your target entity to the desired metric.

Hmmm… Another thing I thought about reading that: have you tried “gently” interpolating the desired coordinates and headings rather than setting them?

1 Like

Sadly no solution yet - @CristopherM gave me some good sugestions a while back but itd require a loooot of checking…not sure if I understand what you’re saying. Care to explain?

“Gently” interpolating means, as an example, that when you want rotate the plane 90 degrees to the left, you make it rotate at steps of 90/N degrees, where N is the number of steps, instead of force-setting the heading some other way.

If your goal is to make NPC planes fly around, maybe you could open a “resource request” thread and programmers and coders could join forces to make it? :thinking: Just a thought. :slight_smile: