View Single Post
Old 14/01/2012, 07:53 AM   #37
iPLEOMAX
High-roller
 
iPLEOMAX's Avatar
 
Join Date: Mar 2011
Location: AE
Posts: 1,251
Reputation: 744
Default Re: "OnPlayerLookAtVehicle" - Detect if a player is looking at some vehicle.

@Kar

That's a great idea.

I'll do these changes then:
1) Keep track of Streamed vehicles in a player's variable and loop through them instead of "MAX_VEHICLES".
2) Change some Local Variables into Global and avoid arrays to make it faster.
3) Make the calculation a bit simpler.
4) A foreach + y_hooks version.

V2 coming soon.
__________________
Goodbye SA-MP.
iPLEOMAX is offline   Reply With Quote