13.01.2012, 14:51
very good job, good for roleplay servers
awesome
2 questions: 1. what will happen if the player will look at 2 vehicles? 2. can you make the same but with objects? (mapped objects) |
Thanks Everybody! (:
@Unknownich: mlol xD @Michael: Hehe Thanks! And It's alright bro. 1. The closest vehicle is chosen. 2. Sure, I already had this in mind. Only difficulty is that, there are different object sizes, to fix it for each and every object, it'll take some effort. |
Version 2.0: - Optimized the code hence increased performance/efficiency. - Now uses a collection of player's streamed vehicles to check for the 'lookat'. (Thanks to "Kar" for the idea ;)) - Removed "oldvehicle" parameter from the callback since it's useless. - Added Float:distance parameter to the callback. - Uses y_hook to hook with the default callbacks.
Would it bug if there were duplicates of a vehicle in a single pos? I'm on my tablet ATM, just asking.
|
Exactly, and if you check it. Distance is also counted, because the first index should always be the closer vehicle... right? because of how vehicles are streamed.
|