Author Topic: Simple Water Change by Me  (Read 5509 times)

0 Members and 1 Guest are viewing this topic.

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Simple Water Change by Me
« on: October 14, 2013, 04:28:17 am »
New's

Code: [Select]
new Wathers[] [] = {
1,2,5,4,5,6,7,8,9,10,11,12,13,14,15
};

Public's / Forward

Code: [Select]
forward WeatherChange();
public WatherChange()
{
        new rand = random(sizeof(Wathers));
        SetWaterLevel(Wathers[rand][1]);
        return 1;
}

GameModeInit

Code: [Select]
SetTimer("WatherChange", 5000, 1); // Edit? 5000 to 16000... etc...

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Simple Water Change by Me
« Reply #1 on: October 14, 2013, 04:22:49 pm »
Timers timers...


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Simple Water Change by Me
« Reply #2 on: October 14, 2013, 04:55:41 pm »
Timers timers...

 ???

forward WeatherChange(); ._.

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Simple Water Change by Me
« Reply #3 on: October 14, 2013, 05:05:04 pm »
Timers timers...

 ???

forward WeatherChange(); ._.

It's not about forwarding public functions, It's about using timers as people usually do


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Simple Water Change by Me
« Reply #4 on: October 14, 2013, 05:31:40 pm »
What's the problem with using a timer here? Timers are not all bad. Besides, I don't see any reason to question the use of timer otherwise there won't be any way to 'change the water' other than using a command.
I'm beginning to feel like a Lag God, Lag God

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Simple Water Change by Me
« Reply #5 on: October 14, 2013, 05:32:57 pm »
but also works well, what is your suggestion?

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Simple Water Change by Me
« Reply #6 on: October 14, 2013, 08:34:52 pm »
What's the problem with using a timer here? Timers are not all bad. Besides, I don't see any reason to question the use of timer otherwise there won't be any way to 'change the water' other than using a command.

Yes, this is what I wanted to suggest him. Using rcon or ig command would be better than using different timers for different functions/acts. My future server (if I with my lazy ass develop it) will have not more than 1 timer  (to save the memory).


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Simple Water Change by Me
« Reply #7 on: October 14, 2013, 10:29:39 pm »
Using RCON would require manual intervention, and it's just impossible to have an admin sit there and change the water level at regular intervals 24/7. The use of timers here is correct.

See also: http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1247.0
Do not PM me for support.




Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Simple Water Change by Me
« Reply #8 on: October 14, 2013, 11:23:10 pm »
Using RCON would require manual intervention, and it's just impossible to have an admin sit there and change the water level at regular intervals 24/7. The use of timers here is correct.

See also: http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1247.0

Anyway I'd better use command


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Simple Water Change by Me
« Reply #9 on: October 15, 2013, 05:15:54 pm »
Using RCON would require manual intervention, and it's just impossible to have an admin sit there and change the water level at regular intervals 24/7. The use of timers here is correct.

See also: http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1247.0

Hmmm, Okay