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.
UsageYou 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:
#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:
#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.
DownloadDirect Code/*
--------------------------------------------------------------------------------
? 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 FilesPaste Bin