(2020-12-24, 10:23 PM)Pinch Wrote: ID_AIM_SYNC - ID: 203Sorry for my stupid question, but what callback or function is that related to? I am a little bit confused.
EDIT: Packet ID, try with raknet.
For anyone else who might wanna help:
I am looking for a callback which gets called when a player is aiming, so i can instantly check if he is aiming on the npc and if he is, i can run the wanted function.
The problem with OnPlayerUpdate is if the player is moving and right clicking the npc, it instantly runs the function, but when the player is not moving, onplayerupdate doesn't get called so the aiming isn't checked and the function doesn't get called.
So I am looking for a callback where i can instantly check if the player is aiming on the npc, without the player having to move.
I prefer not to use small timers because they might not be "instant"(you have to keep right click pressed for some time) or cause lag(it's not a really good idea to run 20-50ms timers on a lot of players)
I hope this is possible in pawn, never managed to do anything like this before, but MTA is getting advantage over samp and i have to implement functions which replaces commands and gives the players more options.