Automatically - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Automatically (
/showthread.php?tid=656197)
Automatically -
Ahmadd - 09.07.2018
Im working on a system for which i need Growth, i mean i need function/system by which i can automatically grow numbers in fixed time.
Re: Automatically -
ItsRobinson - 09.07.2018
PHP Code:
new randtime = random(60000 - 30000)+30000; //this generates a random number between 60,000 and 30,000
SetTimerEx("Grow", randtime, false, "i", playerid);
forward Grow(playerid);
public Grow(playerid)
{
//your code for the grow
new randtime = random(60000 - 30000)+30000; //this generates a random number between 60,000 and 30,000
SetTimerEx("Grow", randtime, false, "i", playerid);
}
That's how you would make a random timer between 1 minute and 30 seconds.
Re: Automatically -
Ahmadd - 10.07.2018
Quote:
Originally Posted by ItsRobinson
PHP Code:
new randtime = random(60000 - 30000)+30000; //this generates a random number between 60,000 and 30,000
SetTimerEx("Grow", randtime, false, "i", playerid);
forward Grow(playerid);
public Grow(playerid)
{
//your code for the grow
new randtime = random(60000 - 30000)+30000; //this generates a random number between 60,000 and 30,000
SetTimerEx("Grow", randtime, false, "i", playerid);
}
That's how you would make a random timer between 1 minute and 30 seconds.
|
Hey buddy thanks, but i want to send silentclientmessage to player when times end and one more thing, i want lable of time, i mean when time start the label will be created (i can do that but please make me function) Health 0% to 100% under 1:30 as u made that timer
Re: Automatically -
JasonRiggs - 10.07.2018
Quote:
Originally Posted by Ahmadd
Hey buddy thanks, but i want to send silentclientmessage to player when times end and one more thing, i want lable of time, i mean when time start the label will be created (i can do that but please make me function) Health 0% to 100% under 1:30 as u made that timer
|
Hey buddy, By the way he shouldn't send you the exact code you need, You must also work on it, As you're supposed to be a scripter, Yeah, he sent you a part of the code to gain reputation, But you should also work on the code to make it better yourself..
Re: Automatically -
Ahmadd - 10.07.2018
Quote:
Originally Posted by JasonRiggs
Hey buddy, By the way he shouldn't send you the exact code you need, You must also work on it, As you're supposed to be a scripter, Yeah, he sent you a part of the code to gain reputation, But you should also work on the code to make it better yourself..
|
Sure, but can i have some idea?
Re: Automatically -
Ahmadd - 10.07.2018
Got the solution.