08.11.2010, 14:01
(
Последний раз редактировалось Goldkiller; 13.04.2013 в 21:40.
)
This include may be interesting for you,if you use an object streamer ( doesn't matter which one ! ).
It gives you the exact distance an Object is visible in GTA San Andreas.
I released a script like this months ago ( here ) but it was very slow and used a lot of memory.Furthermore it didn't include the distance for every object.
It now includes every object,saves a lot of memory compared to the old version and is much faster!
I made two version, the first one is slighty faster then the seconds one,but needs about 250kb more then the seconds version. As alreasy said,the seconds version is a bit slower,because it uses bitwise operations.However,it saves a lot of memory. You decide which one you want to use.
I use the seconds version, but it's up to you.
gStream_Helper.rar
It gives you the exact distance an Object is visible in GTA San Andreas.
I released a script like this months ago ( here ) but it was very slow and used a lot of memory.Furthermore it didn't include the distance for every object.
It now includes every object,saves a lot of memory compared to the old version and is much faster!
I made two version, the first one is slighty faster then the seconds one,but needs about 250kb more then the seconds version. As alreasy said,the seconds version is a bit slower,because it uses bitwise operations.However,it saves a lot of memory. You decide which one you want to use.
I use the seconds version, but it's up to you.
Quote:
readme; This Include gives you the exact distance the Object is visible in GTA San Andreas. All distances are collected from the GTA IDE Files and contains normal Objects, timed-Objects and animated Objects. Why should you use this? If you have many objects in your script and you stream all of them at a distance of 200 units,this might not be very clever because some of those objects get streamed by GTA at distance of 100 units or even 250 units. Streaming the object then at a distance of 200 units is either to high or too low. This include will help you and give you the distance the object will be streamed by GTA, no matter from which distance you want it to get streamed It is very usefull in combination with an Object streamer, I would advise you to use the one by Incognito ( Incognitos Streamer Plugin ). At the moment it is the best one you can find for SA:MP ! Usage: GetObjectMaxDistance( #MODELID , #DEFAULT_DISTANCE ); #MODELID , the modelid you want to get the distance for if you use an invalid MODELID,it will return the #DEFAULT_DISTANCE #DEFAULT_DISTANCE , this is used in case you use an invalid #MODELID the function will then return you given value instead of a random one CreateDynamicObjectEX( ... ); An extra function you might choose if you use the Streamer Plugin by Incognito. You only have to rename the function CreateDynamicObject() to CreateDynamicObjectEX(). I added an extra parameter at the end which add an extra_distance to the draw distance COMPILE_OPTIONS : - FAST_VERSION , Doesn't include Debug-Informations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - gStream_Help.inc - 297 kb ; 18500 functions call @ 8ms gStream_Compress_Help.inc - 41,8 kb ; 18500 functions call @ 8ms ( some extra calls,slighty slower ) !! Important !! Limits the MaxDistance to 512 Units ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - by Daniel "Goldkiller" , gStream Helper 8.11.2010 IMPORTANT: DO NOT CHANGE THE ARRAY IN IT'S ORDER OR YOU WILL GET WRONG RETURN VALUES! |