Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: MatheuS on October 14, 2013, 04:28:17 am

Title: Simple Water Change by Me
Post by: MatheuS 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...
Title: Re: Simple Water Change by Me
Post by: NeskWriter on October 14, 2013, 04:22:49 pm
Timers timers...
Title: Re: Simple Water Change by Me
Post by: MatheuS on October 14, 2013, 04:55:41 pm
Timers timers...

 ???

forward WeatherChange(); ._.
Title: Re: Simple Water Change by Me
Post by: NeskWriter 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
Title: Re: Simple Water Change by Me
Post by: Fuzzy168 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.
Title: Re: Simple Water Change by Me
Post by: MatheuS on October 14, 2013, 05:32:57 pm
but also works well, what is your suggestion?
Title: Re: Simple Water Change by Me
Post by: NeskWriter 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).
Title: Re: Simple Water Change by Me
Post by: stormeus 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
Title: Re: Simple Water Change by Me
Post by: NeskWriter 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
Title: Re: Simple Water Change by Me
Post by: MatheuS 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