Skydive v0.1 (Skydiving/Parachuting information, functions) -
[DOG]irinel1996 - 05.07.2012
Skydive v0.1
Info:
I'm a skydiving lover, yes...
This include brings you some information while you're skydiving, and currently just one new callback.
Video:
[ame]http://www.youtube.com/watch?v=TALFHMJU76c[/ame]
As you could see, it's quite simple, but it can be useful for a base jump mini game, a parachuting school in a RP, etc.
Download:
Include Download
MapAndreas Include by RyDeR` <-- NECESSARY!
Functions:
pawn Код:
IsPlayerSkyDiving(playerid);
/*
Returns: -false --> Not parachuting.
-true --> Parachuting.
*/
GetPlayerParachuteState(playerid);
/*
Returns: - 0 --> Closed
- 1 --> Opened
- 2 --> Opening
*/
GetPlayerAltitude(playerid);
/*
Returns the distance in meters from you to the ground.
*/
Callbacks:
pawn Код:
native OnPlayerOpenParachute(playerid, altitude);
/*
You're able to know when a player opens his parachute, and his altitude too. :D
*/
Example:
Here is the code which I used in the video:
pawn Код:
#include <a_samp>
#include <skydive>
public OnPlayerOpenParachute(playerid, altitude)
{
new cade[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(cade,128,"* %s opened his parachute at %d meters from the ground!",name,altitude);
SendClientMessageToAll(-1,cade);
return 1;
}
public OnPlayerUpdate(playerid)
{
if(IsPlayerSkyDiving(playerid))
{
new cad[70], estado[15];
switch(GetPlayerParachuteState(playerid))
{
case 0: estado = "Closed";
case 1: estado = "Opened";
case 2: estado = "Opening";
}
format(cad,70,"~n~~n~~n~~n~~n~~n~Altitude: ~p~%d~w~m~n~~w~State: ~p~%s",GetPlayerAltitude(playerid),estado);
GameTextForPlayer(playerid,cad,1000,5);
}
return 1;
}
Credits:
[DOG]irinel1996
RyDeR`
(Map Andreas include)
Bugs:
I didn't find anyone, make me know if you find one!
I hope you like it!
I'm still working in this include, making new callbacks to know when a players lands, etc.
Best regards!
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
milanosie - 05.07.2012
Not bad, not bad at all actually.
Should make it detect the attitude of the location where the player equips the parachute aswell.
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
vassilis - 05.07.2012
Oh that's why you made me the question? It seems good.
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
GTXcube - 29.08.2012
....
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
Cena44 - 30.08.2012
good job
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
TheArcher - 30.08.2012
Pretty nice include, i'd prefer to use the plugin map andreas since its more faster. (Also works with the updated by mauzen using NO_BUFFER mode).
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
Lordzy - 30.08.2012
Pretty nice, good job.
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
shaniyal - 30.08.2012
Very nice job!
Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
Edvin - 30.08.2012
Really nice include dude !
Respuesta: Re: iParachute v0.1 (Skydiving/Parachuting information, functions) -
[DOG]irinel1996 - 30.08.2012
Nice to hear that from all you guys, thank you!

_____________________________________________
Quote:
Originally Posted by GTXcube
This is the best include for my server. Is there gonna be some updates with new stuff ?
Edit: I found a bug. When you open your parachute and don't click any key, it always says "opening"
|
I just checked and yes, you're right.
I'm going to fix it. Thank you for reporting it.
I'd add new stuff, but right now I'm running out of ideas, any one?
_____________________________________________
EDIT: it says always "opening" because the player need an update in someway, when we don't press any key it "isn't updating".