SA-MP Forums Archive
Flying Car - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Flying Car (/showthread.php?tid=275711)



Flying Car - Urefeu - 10.08.2011

Good evening.

I just want to know if it was possible to create a flying car, as in the solo play (the code).

I also know how to, thanks to an order, if possible, increase the speed of a vehicle (preferably a flying machine, so I could move faster. Or a flying car).

Thank you!


Re: Flying Car - Norck - 10.08.2011

You can change a vehicle speed with SetVehicleVelocity function.
It's possible to make a flying car: you need a timer which will perform an operations (also using SetVehicleVelocity) depending on current keys that player is holding.


Re: Flying Car - [HiC]TheKiller - 10.08.2011

Use a object + move object acording to the keys you press + Move the object rot according to the mouse position.


Re : Flying Car - Urefeu - 10.08.2011

I do not understand how works SetVehicleVelocity...


AW: Flying Car - Forbidden - 10.08.2011

Use Sa-mp wiki


Re: Flying Car - Jay. - 10.08.2011

https://sampwiki.blast.hk/wiki/SetVehicleVelocity

down below there are others like

setplayervelocity, just take a look at it.


Re : Flying Car - Urefeu - 11.08.2011

Yes, but if I do

Код:
new Float:x, Float:y, Float:z;
GetVehiclePos(mycarid, x, y, z);
SetVehicleVelocity(mycarid, x, y, z + 50);
I've a big bug...


Re: Flying Car - antonio112 - 11.08.2011

You don't need to get vehicle position and then set its velocity. Just set the vehicle velocity as you want. Use this:
https://sampwiki.blast.hk/wiki/SetVehicleVelocity


Re: Re : Flying Car - Norck - 11.08.2011

Quote:
Originally Posted by Urefeu
Посмотреть сообщение
Yes, but if I do

Код:
new Float:x, Float:y, Float:z;
GetVehiclePos(mycarid, x, y, z);
SetVehicleVelocity(mycarid, x, y, z + 50);
I've a big bug...
If you want to increase a current speed of the vehicle, then use GetVehicleVelocity before using SetVehicleVelocity.
Like:
pawn Код:
new Float:x, Float:y, Float:z;
GetVehicleVelocity(mycarid, x, y, z);
SetVehicleVelocity(mycarid, x, y, z + 50);    // Will increase velocity in Z direction by 50



Re : Flying Car - Urefeu - 11.08.2011

I managed, but it's still difficult to fully reproduce the effects of an aircraft.

Is there a FS already approaching what I want?

Or simply a way to move very quickly, except for teleportation?

thank you