[How]smooth gate movements?
#5

Here is my moving gates (smoothly)
pawn Код:
#include <a_samp>
#pragma tabsize 0
new gate;
pawn Код:
public OnFilterScriptInit()
{
    CreateObject(966, 1328.35, -1385.73, 12.53, 0.0, 0.0, 0.0);
    SetTimer("GateCheck", 1000, true);
    gate = CreateObject(968, 1328.33, -1385.72, 13.25, 0.0, -90.0, 0.0);
  return 1;
}
pawn Код:
forward GateCheck();
public GateCheck()
{
  for(new i; i < MAX_PLAYERS; i++)
        if(IsPlayerInRangeOfPoint(i, 5.00, 1325.0199,-1387.8572,13.6263))
        {
            if(IsPlayerInAnyVehicle(i))
            {
                if(gateopen == false)
                {
                    MoveObject(gate, 1328.33, -1385.72, 13.2501, 0.0001, 0.0, 0.0, 0.0); //IMPORTANT here we have add 0.0001 to the Z value THIS IS IMPORTANT
                }
               
            }
            else
            {
                 SendClientMessage(i, 0x00FF00AA, "You are not in any vehicle.");
            }
            return;
        }
        else
        {
            MoveObject(gate, 1328.33, -1385.72, 13.25, 0.0001, 0.0, -90.0, 0.0);
        }
}
Reply


Messages In This Thread
[How]smooth gate movements? - by SampLoverNo123 - 10.02.2012, 03:16
Re: [How]smooth gate movements? - by andrewgrob - 10.02.2012, 05:03
Re: [How]smooth gate movements? - by Ronaldo_raul™ - 10.02.2012, 05:20
Re: [How]smooth gate movements? - by SampLoverNo123 - 10.02.2012, 05:22
Re: [How]smooth gate movements? - by Scofield62 - 10.02.2012, 07:13

Forum Jump:


Users browsing this thread: 1 Guest(s)