Moving Dynamic Objects
#1

Hey guys!

It would appear as if I am needing your help with such an easy task yet again.

I am setting up a fire station for my roleplay server. I have all the mapping done, everything is in. The only thing that is not working is getting some moving dynamic objects. I have generated the following script:

pawn Код:
new fbgate1;
pawn Код:
fbgate1 = CreateDynamicObject(11313,-2287.13989258,-2758.28002930,43.79999924,0.00000000,0.00000000,61.99584961);
pawn Код:
command(fbgate, playerid, params[])
{
    new gate[128];
    if(sscanf(params, "d", gate))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /fbgate [1-3]");
    }
    else
    {
         case 1:
         {
              if(fbgatestatus1 == 0)
              {
                             MoveDynamicObject(fbgate1, -2287.6787, -2759.3147, 45.5280, 3.0);
                     fbgatestatus1 == 1;
                }
    }
    case 2:
    {
        if(fbgatestatus 1)
        {
            MoveDynamicObject(fbgate1, -2287.13989258,-2758.28002930,43.79999924, 3.0);
            fbgatestatus1 == 0;
        }
    }
return 1;
}
Reply
#2

pawn Код:
command(fbgate, playerid, params[])
{
    new gate[128];
    if(sscanf(params, "d", gate))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /fbgate [1-3]");
    }
    else
    {
         case 1:
         {
              if(fbgatestatus1 == 0)
              {
                             MoveDynamicObject(fbgate1, -2287.6787, -2759.3147, 45.5280, 3.0);
                     fbgatestatus1 = 1;
              }
        }
    case 2:
    {
        if(fbgatestatus==  1)
        {
            MoveDynamicObject(fbgate1, -2287.13989258,-2758.28002930,43.79999924, 3.0);
            fbgatestatus1 = 0;
        }
    }
    }
return 1;
}
You forgot a bracket.
Reply
#3

I had accidentally deleted that whilst typing it up along with other mistakes from the script.
pawn Код:
command(fbgate, gate, playerid, params[])
{
    if(sscanf(params, "d", gate))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /fbgate [1-3]");
    }
    else
    {
        switch(gate)
        {
            case 1:
            {
                if(fbgatestatus1 == 0)
                {
                    MoveDynamicObject(fbgate1, -2287.6787, -2759.3147, 45.5280, 3.0);
                    fbgatestatus1 = 1;
                }
                else
                {
                    MoveDynamicObject(fbgate1, -2287.13989258,-2758.28002930,43.79999924, 3.0);
                    fbgatestatus1 = 0;
                }
            }
            case 2:
            {
                //whatever
            }
        }
    }
    return 1;
}
The objects do not appear to move whatsoever.
Reply
#4

can you please write me your new fbgatestatus1?
Reply
#5

It is the same one as before:
pawn Код:
new fbgatestatus1;
After working quite a bit I have gotten it to move, just not to where I want it to as well as it doesn't gradually do it, it just snaps into place. :P
Reply
#6

Mr. Nathan Mader , How's it going? Dont see you on FB anymore too.

Whats the problem my bruh?
Reply
#7

IK i am asking a silly question but could you tell me difference of MoveObject and MoveDynamicObject?

P.S. : Dont laugh on my question(i know its too silly),try to help me!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)