need timer
#1

need how to make chanepos timer (timer of (setplayrpos))
like DM server in 10 min change all players pos
Reply
#2

Try this :
pawn Код:
public OnGameModeInit()
{
  SetTimer("EndOfRound", 60000*60*10, true);
  return 1;
}

forward EndOfRound();
public EndOfRound()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    SetPlayerPos(i, x, y, z);
  }
  return 1;
}
You get the idea.
Reply
#3

and if you can help me there code i put it in top my script to change server name and map name and max players join to server
Reply
#4

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Посмотреть сообщение
Try this :
pawn Код:
public OnGameModeInit()
{
  SetTimer("EndOfRound", 60000*60*10, true);
  return 1;
}

forward EndOfRound();
public EndOfRound()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    SetPlayerPos(i, x, y, z);
  }
  return 1;
}
You get the idea.
look i need this timer change pos many times every 15 min
Reply
#5

help
me
Reply
#6

Make the timer shorter, and make it change the positions every X amount of time you want it to.
Reply
#7

can you give me the code i can't understand
Reply
#8

pawn Код:
new posStep=-1;
public OnGameModeInit()
{
  SetTimer("EndOfRound", 10000, true);
  return 1;
}

forward EndOfRound();
public EndOfRound()
{
  posStep++;
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(posStep == 0)
    {
      SetPlayerPos(i, x, y, z);
    }
    else if(posStep == 1)
    {
      SetPlayerPos(i, x, y, z);
    }
    // etc.
  }
  return 1;
}
That will make the timer go off every 1 minute instead, changing the pos of the player depending on the step of which the setPos variable is at.
Reply
#9

thanks thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)