26.02.2010, 19:21
Hello, Is there any function that works like SetTimer but you can use it inside a function?
If you don't get what i mean, heres an example:
First when you type /loltele you get teleported to the 250, 250, 250 coords.
Then 5 seconds after you got teleported to the 250, 250, 250 coords, teleport you to the 500, 500, 500 coords.
If you don't get what i mean, heres an example:
pawn Код:
if(strcmp("/loltele", cmdtext, true)==0)
{
SetPlayerPos(playerid, 250, 250, 250);
CountDown(5000)//The function, set at 5000 milliseconds
{
SetPlayerPos(playerid, 500, 500, 500);//This happens 5000 milliseconds after the CountDown callback got called
}
return 1;
}
Then 5 seconds after you got teleported to the 250, 250, 250 coords, teleport you to the 500, 500, 500 coords.