[Include] OnPlayerAirbreak
#21

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 
Reply
#22

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!
Reply
#23

Very nice!
Reply
#24

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.
Reply
#25

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!
Reply
#26

That's what I was looking for..!
Reply
#27

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.
Reply
#28

Код:
[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.
Reply
#29

It's most likely being caused by the "OnPlayerUpdate" in your mode, not the include itself.
Reply
#30

This is giving false positives when teleporting between places on the same Z-level.
Reply
#31

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.
Reply
#32

How fast is it? I mean, on detection.
Reply
#33

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.
Reply
#34

I will maintain this. https://github.com/Kar2k/SAMP-OnPlayerAirbreak
Reply
#35

Quote:
Originally Posted by Kar
Посмотреть сообщение
Wiz' already claimed that position... :/

He also posted the thread for it already.
Reply
#36

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.
Reply
#37

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.
Reply
#38

Why cant yall just work together...
Reply
#39

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.
Reply
#40

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)