Attaching objects to vehicles
#6

Quote:
Originally Posted by DeMoX
Посмотреть сообщение
Try this:

pawn Код:
wait(seconds)
{
new _newTime[4], _oldTime[4];
gettime(_oldTime[0], _oldTime[1], _oldTime[2]);
_oldTime[3] = _oldTime[2] + (_oldTime[1] * 60) + (_oldTime[0] * 600);

while(_newTime[3] != (_oldTime[3] + seconds))
{
gettime(_newTime[0], _newTime[1], _newTime[2]);
_newTime[3] = _newTime[2] + (_newTime[1] * 60) + (_newTime[0] * 600);
}
}
Then use wait(1);
To wait one sec

And yeah GetTime() will help.

Код:
This is not mine.
Read this
V

Edit: Wait fonction freezes the server, use this include : Sleep
All of this is non-sense you don't want to prevent your script from working, just use a timer what is the big deal ? Usually people use timers when they don't have to your trying to do the opposite by not using timers. However what your trying to do won't work unless a timer is used.

If it's syntax your looking for try y_timers https://sampforum.blast.hk/showthread.php?tid=182948 your looking for this part.

pawn Код:
timer DelayedTimer[500](playerid)
{
    printf("May be called after 0.5 seconds");
}

main()
{
    defer DelayedTimer(42);
}
I don't think it could be easier to read than that.
Reply


Messages In This Thread
Attaching objects to vehicles - by sim_sima - 25.06.2013, 17:15
Re: Attaching objects to vehicles - by dEcooR - 25.06.2013, 17:18
Re: Attaching objects to vehicles - by sim_sima - 25.06.2013, 17:24
Re: Attaching objects to vehicles - by DeMoX - 25.06.2013, 17:28
Re: Attaching objects to vehicles - by Mennims - 26.06.2013, 15:15
Re: Attaching objects to vehicles - by Pottus - 26.06.2013, 16:29
Re: Attaching objects to vehicles - by sim_sima - 27.06.2013, 16:27

Forum Jump:


Users browsing this thread: 2 Guest(s)