Lordz

CreateStreamedObject.inc

Dec 31st, 2013
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.54 KB | None | 0 0
  1. /*
  2. --------------------------------------------------------------------------------
  3. ¦               CreateStreamedObject - Streamer DrawDistance fix!              ¦
  4. ¦               Usage :                                                        ¦
  5. ¦              If you want to replace your CreateDynamicObject codes,         ¦
  6. ¦              Before including, do #define REPLACE_CreateDynamicObject.      ¦
  7. ¦               If you don't want it to replace then, use                      ¦
  8. ¦               #undef REPLACE_CreateDynamicObject                             ¦
  9. ¦               Credits goes to those who have told about setting the          ¦
  10. ¦              data via Streamer_SetFloatData.                                ¦
  11.                 Lordz, for creating as an include and hooks.                   ¦
  12. --------------------------------------------------------------------------------
  13. */
  14.  
  15. #if defined _included_createstreamedobject
  16.  #endinput
  17. #endif
  18.  
  19. #define _included_createstreamedobject
  20.  
  21. #include <a_samp>
  22. #include <streamer>
  23.  
  24. stock CreateStreamedObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, vworld = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0, Float:drawdistance = 300.0)
  25. {
  26.  new Object_ID = CreateDynamicObject(modelid, X, Y, Z, rX, rY, rZ, vworld, interiorid, playerid, streamdistance);
  27.  Streamer_SetFloatData(STREAMER_TYPE_OBJECT, Object_ID, E_STREAMER_DRAW_DISTANCE, drawdistance);
  28.  return Object_ID;
  29. }
  30.  
  31. #if defined REPLACE_CreateDynamicObject
  32.  #define CreateDynamicObject CreateStreamedObject
  33. #endif
Add Comment
Please, Sign In to add comment