Streamer problem
#1

Hi,

I use the new version of streamer (v2.7.7), but I have a problem: MoveDynamicObject doesn't work?

Could u help me?

My code:

pawn Код:
enum F_Porte {ID, State};
static FourriereExt[F_Porte]; // In top

FourriereExt[ID] = CreateDynamicObjectHC(969, 1812.90, -2066.30, 12.60, 0.0, 0.0, 270.25, -1, -1); // OnGameModeInit


if(IsPlayerInRangeOfPoint(playerid, 25.0, 1812.90, -2066.30, 12.60))
   { // In my command
       SendClientMessage(playerid, -1, "yes");
    if(FourriereExt[State])
    {
     MoveDynamicObject(FourriereExt[ID], 1812.88647, -2058.83203, 12.60, 1.0, 0.0, 0.0, 270.250); // okey
     FourriereExt[State] = 0;
     SendClientMessage(playerid, -1, "yes1");
    }
    else
    {
     MoveDynamicObject(FourriereExt[ID], 1812.90, -2066.30, 12.60, 2.0, 0.0, 0.0, 270.25); // ok
     FourriereExt[State] = 1;
     SendClientMessage(playerid, -1, "yes2");
    }
    return 1;
   }

stock CreateDynamicObjectHC(modelid, Float: x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1)
{
 CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, -1, 150.0, 150.0);
 return 1;
}
When I write my command, the SendClientMessage "yes1", "yes2" it works, but my object doesn't move. Why?

Thanks
Reply
#2

Not sure if this would work, you could make "State" a boolean.

pawn Код:
enum F_Porte {ID, bool:State};
Like this.
Reply
#3

The "state" of the variable FourriereExt[State] changes well, but it's only the MoveDynamicObject who's not working
Reply
#4

Maybe do
Код:
 FourriereExt[State] = 0;
on OnGameModeInit

And make the if statement
Код:
 if(FourriereExt[State] == 0)
Reply
#5

In the folder streamer.inc, the "STREAMER_TAG_OBJECT".. i dont know what is it for ?

native DestroyDynamicObject(STREAMER_TAG_OBJECT objectid);

Cause DestroyDynamicObject don't seems to works either, and i dont think it comes from the "STREAMER_TAG_OBJECT"

And in MoveDynamicObject, there is also the STREAMER_TAG_OBJECT
Reply
#6

Код:
 stock CreateDynamicObjectHC(modelid, Float: x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1)
{
 CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, -1, 150.0, 150.0);
 return 1;
}
Then it's probably this if other functions aren't working properly, the other functions don't believe this is apart of the streamer plugin, therefore it doesn't work.
Reply
#7

Aight thank's but i dfnly don't get it lol, what's wrong with the "Stock" part ??
Reply
#8

I don't think the streamer recognizes the stock as a function that can work with itself.

An example of this is when you create an object with "CreateObject", but you try to move it with "MoveDynamicObject". They're two different things and won't work with each other, that's my guess as to why it doesn't work.
Reply
#9

Thank's mate! i appreciate your time, i will let you know if the problem is solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)