Stock "breaks" CreateDynamicObject?
#1

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;
}
Reply
#2

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
Reply
#3

You did indeed, and I'm not exactly sure what you mean. How can I use a wrong stream/draw distance?
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)