SA-MP Forums Archive
Plane flying over san andreas - 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: Plane flying over san andreas (/showthread.php?tid=652295)



Plane flying over san andreas - Melktert - 07.04.2018

Wondered if anyone could help me script a plane that flies over San Andreas that people can eject out of anytime.


Re: Plane flying over san andreas - Wanheda - 07.04.2018

Use MoveObject (assuming the plane is an object), set the player's camera on that plane object and get the object positions whenever he presses your desired eject button.


Re: Plane flying over san andreas - Melktert - 07.04.2018

I kinda just want to script the PUBG concept where the plane flies over the world and people eject out of the plane.

Would you suggest the Shamal interior or just the big cargo plane?


Re: Plane flying over san andreas - Mugala - 07.04.2018

you can create this with Object or as Vehicle, controlled by NPC.

if you want to create as plane object, you must use next funcs:
PHP код:
CreateObject // to create plane object.
MoveObject // to move this plane object.
AttachCameraToObject // for attach a camera to plane object or other objects.
GetObjectPos // for get the posotion of object to be ejected later. 
if you want to create as NPC controlled vehicle, you must RECORD this NPC mode.


Re: Plane flying over san andreas - Melktert - 07.04.2018

Thanks bud. Will try


Re: Plane flying over san andreas - Logic_ - 07.04.2018

Can be done without NPC. Do without the need of NPC. Make use of OnPlayerKeyStateChange function. Use GivePlayerWeapon and key such as F or N/ Y.