24.02.2019, 14:00
Hello. I've been experimenting lately with y_hooks, and I was wondering if there is a way to stop other hooks from executing when the first one returns false? Okay, that might've sounded dumb, but let me explain it in another way;
1. First hook executes on OnVehicleSpawn. It checks if it is a valid vehicle (not spawned in by a client-side program). If it is spawned illegaly, it returns false, and in theory, this should stop any other hook from executing;
2. Second hook executes on OnVehicleSpawn, however it executes regardless of what the first hook returned.
3..-. All the other hooks execute as well, disregarding the first hook's return value.
My question is, is there a way to make it so if the first hook executed stops other hooks after it from executing? Thanks in advance.
1. First hook executes on OnVehicleSpawn. It checks if it is a valid vehicle (not spawned in by a client-side program). If it is spawned illegaly, it returns false, and in theory, this should stop any other hook from executing;
2. Second hook executes on OnVehicleSpawn, however it executes regardless of what the first hook returned.
3..-. All the other hooks execute as well, disregarding the first hook's return value.
My question is, is there a way to make it so if the first hook executed stops other hooks after it from executing? Thanks in advance.