Timer Countdown [ huge timer's ] - 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: Timer Countdown [ huge timer's ] (
/showthread.php?tid=372750)
Timer Countdown [ huge timer's ] -
RicaNiel - 28.08.2012
Guys i have trouble with timers i will not work or it will turn the number's into negative
i have this one
pawn Code:
Seconds[playerid]
Minutes[playerid]
Hours[playerid]
Days[playerid]
Weeks[playerid]
Months[playerid]
years[playerid]
my problem is it will not work on Minutes
it will turn the seconds on negative
and if i change everything
it will change the years into negative
i want that when all are equivalent to 0 it will stop
but how i am freakin dont know
or work perfectly
Re: Timer Countdown [ huge timer's ] -
IceMeteor - 28.08.2012
Why dont you show us a piece of that damn code?
Re: Timer Countdown [ huge timer's ] -
Youice - 28.08.2012
if I understood you right, then create a loop timer* contains the negative "what ever", or if you want it becomes less every second, just put the negative you want.
pawn Code:
forward LessTimer();
public LessTime()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
Seconds[i]-- //seconds will be -1 for all players
}
return 1;
}
OnGameModeInit()
{
SetTimer("LessTime", 1000, true);
// every second LessTime will be re-called, you can just place *LessTime* underneath OnPlayerUpdate and remove that line ^^
return 1;
}
This is just an example/tips may help you.
Re: Timer Countdown [ huge timer's ] -
Zaila - 28.08.2012
What are you gonna use them for?
Re: Timer Countdown [ huge timer's ] -
RicaNiel - 28.08.2012
but how about for the hours and all of them?
Quote:
I got a friend who wants me to make a game mode and i dont trust him if he will pay or not
so i will secretely put this as an expiration date
|