Scripting fuction "sleep"?
#1

Is there a scripting function that will act like a sleep where the script pauses then after the sleep count is gone it moves to next line because i made it so that if you walk on a point it teleports you somewhere and if you walk on that point it teleports you back... but it does it like instantly and you get stuck in a teleport back and forth... so is there a fuction that will make the script pause.
Reply
#2

Maybe like this.

pawn Код:
new Tp[MAX_PLAYERS];//Top

//When you teleport them
if(PlayerToPoint(/*Blah Blah*/))
{
   if(!Tp[playerid])
   {
      //SetPlayerPos
      Tp[playerid] = 1;
   }
}
else
{
   Tp[playerid] = 0;
}
Reply
#3

It's possible to pause a script but this cause problems like desync, timeouts..
Reply
#4

Quote:
Originally Posted by backwardsman97
Maybe like this.

pawn Код:
new Tp[MAX_PLAYERS];//Top

//When you teleport them
if(PlayerToPoint(/*Blah Blah*/))
{
  if(!Tp[playerid])
  {
     //SetPlayerPos
     Tp[playerid] = 1;
  }
}
else
{
  Tp[playerid] = 0;
}
thanks man i think i get it
Reply
#5

You're welcome.
Reply
#6

Or have it teleport the person NEXT to the next teleporter =p
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)