Re: OnPlayerAirbreak -
kristo - 06.12.2013
Okay, thanks. Could you use ALS hooking for functions? Only redefining would cause conflicts with another includes that are hooking it, too.
I did it for you as I couldn't wait for the update.
PHP код:
#if defined _ALS_SetPlayerPos
#undef SetPlayerPos
#else
#define _ALS_SetPlayerPos
#endif
#if defined _ALS_SetPlayerPosFindZ
#undef SetPlayerPosFindZ
#else
#define _ALS_SetPlayerPosFindZ
#endif
#if defined _ALS_PutPlayerInVehicle
#undef PutPlayerInVehicle
#else
#define _ALS_PutPlayerInVehicle
#endif
#define SetPlayerPos AB_SetPlayerPos
#define SetPlayerPosFindZ AB_SetPlayerPosFindZ
#define PutPlayerInVehicle AB_PutPlayerInVehicle
Re: OnPlayerAirbreak - Emmet_ - 06.12.2013
Yup, ALS hooking is already used for functions in this version of the include - however the older version didn't have ALS hooking at all. Thanks though!
Re: OnPlayerAirbreak -
Phaze - 06.12.2013
Very nice!
Re: OnPlayerAirbreak -
kristo - 06.12.2013
Quote:
Originally Posted by Emmet_
Yup, ALS hooking is already used for functions in this version of the include - however the older version didn't have ALS hooking at all. Thanks though!
|
Ahh, damn... You had them listed strangely and I didn't notice that you had already did it. I thought I could be useful for once.
Re: OnPlayerAirbreak - Emmet_ - 06.12.2013
Quote:
Originally Posted by kvann
Ahh, damn... You had them listed strangely and I didn't notice that you had already did it. I thought I could be useful for once. 
|
Which reminds me... I completely forgot to use ALS hooking on the functions in some of my other includes! Thanks!
Re: OnPlayerAirbreak -
Zamora - 10.12.2013
That's what I was looking for..!
Re: OnPlayerAirbreak - Emmet_ - 05.01.2014
Updated the include, please re-download if you haven't already.
- Updated the hooking mechanisms.
- Detection should be more accurate than ever!
- Cleaned up some code.
Vehicle airbreak detection is on the way, I've been quite busy lately.
Re: OnPlayerAirbreak -
Michalec - 06.01.2014
Код:
[00:57:28] [debug] Run time error 4: "Array index out of bounds"
[00:57:28] [debug] Accessing element at negative index -400
[00:57:28] [debug] AMX backtrace:
[00:57:28] [debug] #0 00121630 in ?? (0x000000d8) from gm.amx
[00:57:28] [debug] #1 001069bc in public AB_OnPlayerUpdate (0x00000005) from gm.amx
[00:57:28] [debug] #2 0001c68c in ?? (0x00000005) from gm.amx
[00:57:28] [debug] #3 00008170 in public OnPlayerUpdate (0x00000005) from gm.amx
I'm getting this.
Re: OnPlayerAirbreak - Emmet_ - 06.01.2014
It's most likely being caused by the "OnPlayerUpdate" in your mode, not the include itself.
Re: OnPlayerAirbreak -
kristo - 19.08.2014
This is giving false positives when teleporting between places on the same Z-level.
Re: OnPlayerAirbreak - Emmet_ - 25.02.2016
Quote:
Originally Posted by Richie©
The new one detects me as airbreaking when i drive fast with infernus.
|
Should be fixed now! Forgot to change a few values in the AB_IsVehicleMoving function.
Re: OnPlayerAirbreak -
]Rafaellos[ - 25.02.2016
How fast is it? I mean, on detection.
Re: OnPlayerAirbreak - Emmet_ - 25.02.2016
Quote:
Originally Posted by ]Rafaellos[
How fast is it? I mean, on detection.
|
Once a player has been detected as airbreaking, OnPlayerAirbreak is called every second.
However, if you're talking about the speed of the script itself, then it's pretty fast. No complex code to be found whatsoever.
Re: OnPlayerAirbreak -
Kar - 15.03.2016
I will maintain this.
https://github.com/Kar2k/SAMP-OnPlayerAirbreak
Re: OnPlayerAirbreak -
Crayder - 15.03.2016
Quote:
Originally Posted by Kar
|
Wiz' already claimed that position... :/
He also posted the thread for it already.
Re: OnPlayerAirbreak -
Kar - 15.03.2016
Doesn't matter, I've contributed to this in the past and I'm still helping with it as long as SA-MP is alive. The one Wiz posted is an OLD version (and I mean old... :")) too.. plus I have a less likely chance to 'quit' and stop updating or remove stuff.
Re: OnPlayerAirbreak -
Crystallize - 15.03.2016
Quote:
Originally Posted by Kar
Doesn't matter, I've contributed to this in the past and I'm still helping with it as long as SA-MP is alive. The one Wiz posted is an OLD version (and I mean old... :")) too.. plus I have a less likely chance to 'quit' and stop updating or remove stuff.
|
As you wish , I will edit my thread so you can update yours maybe you'll be happy

? At least when you see something already claimed have a bit of respect to the one who posted first but okay no problem.
Re: OnPlayerAirbreak -
Joron - 15.03.2016
Why cant yall just work together...
Re: OnPlayerAirbreak -
Kar - 16.03.2016
Quote:
Originally Posted by Wizzard2H
As you wish , I will edit my thread so you can update yours maybe you'll be happy  ? At least when you see something already claimed have a bit of respect to the one who posted first but okay no problem.
|
Why does it matter.. lol respect? Man is it fame you want or something on this forum? You can keep yours posted too idk why you remove it. I don't really care. I'm just doing what I do. You can do what you do.
Re: OnPlayerAirbreak -
AdrianGabriel96 - 29.03.2016
Hey, it doesn't work for me. Maybe I have to update YSI or why.. i put the include and the public but it doesn't detect even if i use airbreak a lot.. Where is the problem!? thx.
When i test it on another gamemode i receive this:
public function lacks forward declaration (symbol "OnPlayerAirBreak")
Fixed sorry i used B instead of b