Author Topic: How to fix the Streamer's Draw Distance Issue  (Read 4442 times)

Lordz

  • Guest
How to fix the Streamer's Draw Distance Issue
« on: December 31, 2013, 07:34:21 PM »
Fixing the Draw Distance Issue!

Hello,
This topic has been created for the ones who maps and uses Incognito's Streamer Plugin! I've been facing some issues with the draw distance setting with the Streamer's plugin and came to know about fixing it. I've made it as an include mode and also hooks up with the original "CreateDynamicObject" code in case if you want to.

Usage

You can download it from the links which is specified down and then place it on "/pawno/include" directory. The include is named as "CreateStreamedObject.inc".

Open PAWNO, and include CreateStreamedObject under streamer. This is how it would look like:

Code: [Select]
#include <a_samp>
#include <streamer>
#include <CreateStreamedObject>

Instead of using CreateDynamicObject, then use CreateStreamedObject. This include also supports hooking, so if you want the whole script to use the draw distance you specify, before including, do "#define REPLACE_CreateDynamicObject". It'd look like this:

Code: [Select]
#include <a_samp>
#include <streamer>
#define REPLACE_CreateDynamicObject
#include <CreateStreamedObject>

NOTE : This is used in case if you're testing it separately, not on the map editor's Test or any other editors Test.

Download

Direct Code
Code: [Select]
/*
--------------------------------------------------------------------------------
?               CreateStreamedObject - Streamer DrawDistance fix!              ?
?               Usage :                                                        ?
? If you want to replace your CreateDynamicObject codes,         ?
? Before including, do #define REPLACE_CreateDynamicObject.      ?
?               If you don't want it to replace then, use                      ?
?               #undef REPLACE_CreateDynamicObject                             ?
?               Credits goes to those who have told about setting the          ?
? data via Streamer_SetFloatData.                                ?
Lordz, for creating as an include and hooks.                   ?
--------------------------------------------------------------------------------
*/

#if defined _included_createstreamedobject
 #endinput
#endif

#define _included_createstreamedobject

#include <a_samp>
#include <streamer>

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)
{
 new Object_ID = CreateDynamicObject(modelid, X, Y, Z, rX, rY, rZ, vworld, interiorid, playerid, streamdistance);
 Streamer_SetFloatData(STREAMER_TYPE_OBJECT, Object_ID, E_STREAMER_DRAW_DISTANCE, drawdistance);
 return Object_ID;
}

#if defined REPLACE_CreateDynamicObject
 #define CreateDynamicObject CreateStreamedObject
#endif
Solid Files
Paste Bin
« Last Edit: December 31, 2013, 07:35:50 PM by Mercer »

Offline Kirito

  • Elite Member
  • *****
  • Posts: 917
  • In Game: Kirito
Re: How to fix the Streamer's Draw Distance Issue
« Reply #1 on: January 01, 2014, 10:52:17 AM »
Nice Bro :) Thanks But idk how to use xD

Offline Mortalis

  • Retired Administrator
  • ****
  • Posts: 410
  • Mapper, Scripter, Modder, Kaito_Kid
  • In Game: Mortalis
Re: How to fix the Streamer's Draw Distance Issue
« Reply #2 on: January 01, 2014, 01:54:33 PM »
LoL. Thanks for include.  ;)  This give ease rather filling every part of the parameters. +rep  :P I already made a test and it works perfectly.
« Last Edit: January 01, 2014, 05:09:56 PM by Mortalis »

Offline KiRaN

  • Senior Administrator
  • ****
  • Posts: 1002
  • Gaming has been a great way to get to know people.
  • In Game: KiRaN
Re: How to fix the Streamer's Draw Distance Issue
« Reply #3 on: January 01, 2014, 02:48:46 PM »
Nice Bro :) Thanks But idk how to use xD

Hi5 bro :/

Btw ,

Thnx for sharing and it will help those who script here :)