SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 28/02/2017, 05:47 AM   #21
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,208
Reputation: 352
Default Re: Vehicle Parachute

[REMOVED]

Last edited by AbyssMorgan; 17/05/2017 at 09:29 PM.
AbyssMorgan is offline   Reply With Quote
Old 17/05/2017, 09:29 PM   #22
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,208
Reputation: 352
Default Re: Vehicle Parachute

Update v1.1.0:

- Added air control (Tilt in the direction you want to fly).

- Remove Vehicle Parachute after using SetPlayerPos

- Added function:
PHP Code:
SetVehicleParachuteKey(key); 
- Added language config:
PHP Code:
#define VP_LANG_01    "~g~Parachute has been thrown"
#define VP_LANG_02    "~g~Parachute has been opened"
#define VP_LANG_03    "~g~Cannot use parachute"
#include <VehPara> 
AbyssMorgan is offline   Reply With Quote
Old 17/05/2017, 09:44 PM   #23
Stones
Huge Clucker
 
Stones's Avatar
 
Join Date: Jun 2013
Location: United Kingdom
Posts: 215
Reputation: 56
Default Re: Vehicle Parachute

I honestly love the stuff you bring out. Keep it up with these epic releases.
__________________
Stones is offline   Reply With Quote
Old 17/05/2017, 10:39 PM   #24
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,885
Reputation: 1337
Default Re: Vehicle Parachute

I know what it is like when you write a lot of shit and getting it to work takes a bit of time then you look back and say "why the fuck did I do that like that?" how about these updates in school they teach about lowest common factors it applies vigorously to any coding

Code:
stock ToggleVehicleParachute(vehicleid,bool:toggle){

	for(new i = 0; i < 3; i++) {
		if(IsValidDynamicObject(VehicleParachuteObject[vehicleid][i])) DestroyDynamicObject(VehicleParachuteObject[vehicleid][i]);
		VehicleParachuteObject[vehicleid][i] = INVALID_STREAMER_ID;
	}
Code:
stock StartVehicleParachuteAction(playerid){
	TogglePlayerUsingVehPara(playerid,1);

	new vid = GetPlayerVehicleID(playerid);
	
	for(new i = 0; i < MAX_PARA_OBJECTS; i++) {
	    if(IsValidDynamicObject(VehicleParachuteObject[vid][i])) {
			DestroyDynamicObject(VehicleParachuteObject[vid][i]);
			if(i == 0)
			    CreateDynamicObject(18849,0.0,0.0,-6000.0,0.0,0.0,0.0,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
			else
			    DestroyDynamicObject(VehicleParachuteObject[vid][i]);
		}
	}
Pottus is offline   Reply With Quote
Old 18/05/2017, 06:07 AM   #25
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,208
Reputation: 352
Default Re: Vehicle Parachute

Quote:
Originally Posted by Pottus View Post
I know what it is like when you write a lot of shit and getting it to work takes a bit of time then you look back and say "why the fuck did I do that like that?" how about these updates in school they teach about lowest common factors it applies vigorously to any coding

Code:
stock ToggleVehicleParachute(vehicleid,bool:toggle){

	for(new i = 0; i < 3; i++) {
		if(IsValidDynamicObject(VehicleParachuteObject[vehicleid][i])) DestroyDynamicObject(VehicleParachuteObject[vehicleid][i]);
		VehicleParachuteObject[vehicleid][i] = INVALID_STREAMER_ID;
	}
Code:
stock StartVehicleParachuteAction(playerid){
	TogglePlayerUsingVehPara(playerid,1);

	new vid = GetPlayerVehicleID(playerid);
	
	for(new i = 0; i < MAX_PARA_OBJECTS; i++) {
	    if(IsValidDynamicObject(VehicleParachuteObject[vid][i])) {
			DestroyDynamicObject(VehicleParachuteObject[vid][i]);
			if(i == 0)
			    CreateDynamicObject(18849,0.0,0.0,-6000.0,0.0,0.0,0.0,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
			else
			    DestroyDynamicObject(VehicleParachuteObject[vid][i]);
		}
	}
Thank you for your attention, I corrected some code :P
AbyssMorgan is offline   Reply With Quote
Old 18/05/2017, 05:13 PM   #26
Oxygenated
Little Clucker
 
Oxygenated's Avatar
 
Join Date: Dec 2016
Posts: 36
Reputation: 3
Default Re: Vehicle Parachute

Wow amazing work might be useful to a lot of players
__________________
Happy Coding.
Oxygenated is offline   Reply With Quote
Old 18/05/2017, 05:42 PM   #27
[G]am3r
Guest
 
Posts: n/a
Default Re: Vehicle Parachute

Nice Filterscript, keep it up.
  Reply With Quote
Old 19/05/2017, 05:43 AM   #28
Lucille
Little Clucker
 
Lucille's Avatar
 
Join Date: Apr 2017
Posts: 44
Reputation: 0
Default Re: Vehicle Parachute

Not bad
Lucille is offline   Reply With Quote
Old 23/05/2017, 02:19 PM   #29
Azhar
Little Clucker
 
Azhar's Avatar
 
Join Date: Nov 2014
Location: Pakistan
Posts: 46
Reputation: 9
Default Re: Vehicle Parachute

woooow amazing work Man keep it up
Good Job :P
__________________
~[Pro]Malik
Azhar is offline   Reply With Quote
Old 08/10/2019, 05:13 PM   #30
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,208
Reputation: 352
Default Re: Vehicle Parachute

Update v1.2.0:

- Removed default GameText

- Removed language config

- Added callbacks:
PHP Code:
OnVehicleParachuteThrown(playerid,vehicleid);
OnVehicleParachuteOpened(playerid,vehicleid);
OnVehicleParachuteOpenFail(playerid,vehicleid); 
- Updated example code
AbyssMorgan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
parachute bug beckzy Scripting Help 3 12/02/2015 07:20 PM
Parachute bug Blacklite Bug Reports 4 14/12/2014 01:31 AM
Unoccupied vehicle sync, boat surfing pausing issue, parachute with vehicle issue, surfing w/ skydiving issue Kar Bug Reports 2 10/06/2013 09:24 AM
[HELP]Vehicle Parachute? [NYRP]Mike. Help Archive 0 23/12/2009 05:47 PM
Parachute bug? Rizard Help Archive 1 03/09/2009 11:18 AM


All times are GMT. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.