07.07.2015, 21:00
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:
When I write my command, the SendClientMessage "yes1", "yes2" it works, but my object doesn't move. Why?
Thanks
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;
}
Thanks