Stock "breaks" CreateDynamicObject? -
reckst4r - 23.10.2013
Hi. I got a little help regarding an object streaming issue a few days ago, and I was given a stock function, however, it seems to break the CreateDynamicObject function. Whenever I use the stock, the object isn't created.
pawn Код:
stock AddDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, drawdistance = 300.0)
{
new oid;
oid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, oid, E_STREAMER_DRAW_DISTANCE, 300.0);
return oid;
}
Re: Stock "breaks" CreateDynamicObject? -
Pottus - 23.10.2013
I made that one, there is actually a small problem here....
pawn Код:
stock AddDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, drawdistance = 300.0)
{
new oid;
oid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, oid, E_STREAMER_DRAW_DISTANCE, drawdistance);
return oid;
}
Make sure you use the right stream/draw distance
Re: Stock "breaks" CreateDynamicObject? -
reckst4r - 23.10.2013
You did indeed, and I'm not exactly sure what you mean. How can I use a wrong stream/draw distance?
Re: Stock "breaks" CreateDynamicObject? -
reckst4r - 23.10.2013
It doesn't seem to be applying this part "Streamer_SetFloatData(STREAMER_TYPE_OBJECT, oid, E_STREAMER_DRAW_DISTANCE, 300.0);"
edit: ahh, crap.. I thought I had pressed the edit button.. Sorry for double posting then
update: If I use CreateObject the distance is good, but I'd still prefer using CreateDynamicObject.