Timer Help
#4

Put this at the top on the script(under the includes)
pawn Код:
new drag1;
new drag2;
new DragPos;
The objects and the timer should be under OnGameModeInIt
pawn Код:
SetTimer("Drag",20*1000,1);
DragPos = 0;
drag1 = CreateObject(970, -172.43, 1409.84, 66.71, 0.00, 0.00, 90.00);
drag2 = CreateObject(970, -172.43, 1404.64, 66.71, 0.00, 0.00, 90.00);
Put this at the bottom of the script.
pawn Код:
forward Drag();
public Drag()
{
switch(DragPos)
{
case 0:
{
MoveObject(drag1, -172.43, 1409.84, 65.87 , 5.00);
MoveObject(drag2, -172.43, 1404.64, 65.87 , 5.00);
DragPos = 1;
return 1;
}
case 1:
{
MoveObject(drag1, -172.43, 1409.84, 66.71 , 5.00);
MoveObject(drag2, -172.43, 1404.64, 66.71 , 5.00);
DragPos = 0;
return 1;
}
}
return 1;
}
Reply


Messages In This Thread
Timer Help - by Lemonaidz - 28.02.2013, 07:50
Re: Timer Help - by Height - 28.02.2013, 08:11
Re: Timer Help - by Lemonaidz - 28.02.2013, 08:37
Re: Timer Help - by DaRk_RaiN - 28.02.2013, 08:45
Re: Timer Help - by Lemonaidz - 28.02.2013, 08:52
Re: Timer Help - by DaRk_RaiN - 28.02.2013, 09:05
Re: Timer Help - by Lemonaidz - 28.02.2013, 09:16
Re: Timer Help - by DaRk_RaiN - 28.02.2013, 09:21
Re: Timer Help - by Lemonaidz - 28.02.2013, 09:26

Forum Jump:


Users browsing this thread: 4 Guest(s)