21.12.2011, 09:31
Hi all, so I've been trying to make these automatic gates, and it seems to have worked, except when i want the barriers to move, they seem to 'teleport' instead of animate. Is that caused by lag, or is it not possible to actually animate them?
Video...
Here's my code.
And if anyone knows if theres a way to stop that camera thing happening, it's because I've put an object(speaker) on the back seats, but i don't know how to fix it.
Thanks, Aston.
Video...
Here's my code.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPVarInt(playerid, "Admin") != 0) {
if(PlayerToPoint(5, playerid, 1297.25671387,-2057.27441406,58.80771637)) {
MoveObject(Barrier1, 1297.25671387,-2064.52441406,58.80771637, 1.00, 0,0,0);
MoveObject(Barrier2, 1297.25671387,-2050.27441406,58.8077163, 1.00, 0,0,0);
SetTimer("BarrierTime", 7000, false);
}
}
return 1;
}
public BarrierTime()
{
MoveObject(Barrier1, 1297.25671387,-2064.52441406,58.80771637, 2.00, 270.00000000,0.00000000,0.00000000);
MoveObject(Barrier2, 1297.25671387,-2050.27441406,58.80771637, 2.00, 90.00000000,0.00000000,0.00000000);
return 1;
}
Thanks, Aston.