[How]smooth gate movements? -
SampLoverNo123 - 10.02.2012
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
]
Re: [How]smooth gate movements? -
andrewgrob - 10.02.2012
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
Re: [How]smooth gate movements? -
Ronaldo_raul™ - 10.02.2012
Exactly like andrewgrob said.Set their speed to slow ratio so it wont glitch.
Re: [How]smooth gate movements? -
SampLoverNo123 - 10.02.2012
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?
Re: [How]smooth gate movements? -
Scofield62 - 10.02.2012
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);
}
}