[How]smooth gate movements?
#1

One of 0.3d sa-mp updated feature is moving objects\gates, but is there any tool to make gates ig? i mean moving gates? if no, plz tell me best trick to make moving gates[smooth one ]
Reply
#2

best trick ? hmm there is not one.

think you just set the ratio to low to it slides slowly i dont know

im just a noob scriptor at moment
Reply
#3

Exactly like andrewgrob said.Set their speed to slow ratio so it wont glitch.
Reply
#4

I'm asking I know the position of gate, but how can i get rotations? like we know, to move object we need-
PosX,PosY,PosZ, RotX.Roty,RotZ, how to get that rotations?
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)