guys really need help
#4

Quote:
Originally Posted by Universal
Посмотреть сообщение
Do you understand, that KillTimer kills the timer, which means its not going to be used ever again, unless you call it again via SetTimer, which you call upon FilterscriptInit or restart the gamemode (filterscript in your case)?
True!
Let's edit this a little bit...

pawn Код:
new timer1,timer2;

public OnFilterscriptInit(){
     timer1 = SetTimer("isPlayerInArea",100, 1);
  timer2 = SetTimer("BankTime", 999, 1);
}
Then you need to forward isPlayerInArea and BankTime like this:

pawn Код:
forward isPlayerInArea();
public isPlayerInArea()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
        if(IsPlayerInArea(i, 1711.4371, 1731.7839, -1670.3661, -1643.2722))
        {
            SendClientMessage(i, 0xFFFF00AA, "( ! ) Welcome to Bank!");
            return 1;
        }
  }
  return 1;
}

forward BankTime();
public BankTime()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerInArea(i, 1711.4371, 1731.7839, -1670.3661, -1643.2722))
        {
        new hours;
        new minutes;
        GetPlayerTime(i, hours, minutes);
    if(hours == 6.00 && minutes == 0.00)
          {
            PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
            GivePlayerMoney(i, 7500);
            SendClientMessage(i, 0x12900BBF, "||| 6:00 | BANK TIME: |||");
            SendClientMessage(i, 0xFFFF00AA, "YOU RECEIVE +7.500 $");
            return 1;
            }
        }
  }
  return 1;
}
Now the timers live forever, but that should be okay in this case.
Reply


Messages In This Thread
guys really need help - by Joe Vagos - 31.07.2012, 19:45
Re: guys really need help - by DeathOnaStick - 31.07.2012, 20:04
Re: guys really need help - by Universal - 31.07.2012, 20:08
Re: guys really need help - by DeathOnaStick - 31.07.2012, 20:12
Re: guys really need help - by Joe Vagos - 31.07.2012, 20:15
Re: guys really need help - by DeathOnaStick - 31.07.2012, 20:17
Re: guys really need help - by Joe Vagos - 31.07.2012, 20:25
Re: guys really need help - by TaLhA XIV - 31.07.2012, 20:26
Re: guys really need help - by XStormiest - 31.07.2012, 20:29
Re: guys really need help - by Joe Vagos - 31.07.2012, 20:40

Forum Jump:


Users browsing this thread: 4 Guest(s)