31.10.2015, 23:07
@SecretBoss & Gammix: Both of your statements make no-sense.
The whole point in hooking "LinkVehicleToInterior()" is to be able to use the native function while allowing extra executions to be performed at the same instance, and without having to edit existent usages of the function itself. In this case, it's saving the vehicle's interior ID in a variable then linking the vehicle to the specified interior ID (by returning the native function and not the hook), so that we can create a new function that returns the vehicle's interior ID (GetVehicleInteriorID()) as it is needed when a player spectates a player that's driving a vehicle.
In brief, you don't use "Hook_LinkVehicleToInterior()", but "LinkVehicleToInterior()".
I added a note to the main post.
Thanks guys.
The whole point in hooking "LinkVehicleToInterior()" is to be able to use the native function while allowing extra executions to be performed at the same instance, and without having to edit existent usages of the function itself. In this case, it's saving the vehicle's interior ID in a variable then linking the vehicle to the specified interior ID (by returning the native function and not the hook), so that we can create a new function that returns the vehicle's interior ID (GetVehicleInteriorID()) as it is needed when a player spectates a player that's driving a vehicle.
In brief, you don't use "Hook_LinkVehicleToInterior()", but "LinkVehicleToInterior()".
I added a note to the main post.
Thanks guys.