ZitatAlles anzeigenThis 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!
gStream_Helper # Pastebin V.2
gStream_Helper.rar
//Edit: Neue Version,Text komplett geändert usw usf.