[Include] US_Timers include
#1

US_Timers include what it does? well it lets you set your own time and countdown you can like this 00:15 seconds
01:00:15 and 01:01:01:01 it gets seconds minutes hours and days!

Usage:
pawn Код:
TYPES =  SEC, MIN, HOUR, DAY //Sec is seconds Min is minutes HOUR is hours DAY is days
US_SetTimer(playerid, type); //setting timer to count 1 2 3....
US_ResetTimer(playerid); //setting all timers to 0
US_SetCountDown(playerid, type);  //count down 3 2 1. ...
US_GetSecs(playerid); //Getting Player seconds
US_GetMins(playerid); //Getting Player minutes
US_GetHours(playerid); //Getting Player hours
US_GetDays(playerid); //Getting Player days.
US_SetTimerTime(playerid, days, hours, minutes, seconds); //Sets time to exacly value you chose
US_SetTimerAdd(playerid, days, hours, minutes, seconds); //Adding time you want example 5 sec after this commands it will become 35 and keep 36, 37...
Links:
Solidfiles: http://www.solidfiles.com/d/f8c3ec930b/
Pastebin: http://pastebin.com/NVwm0N08
.
Reply
#2

i'll use it for my server +rep
Reply
#3

Thx man
Reply
#4

It would be a lot healthier to just set the player's variables to the time (in unix) at the moment you run the SetTimer function. Then in the Get* functions you just subtract and modulate the difference.
Reply
#5

I know that I made it to use once everytime. for example /attack timer when it ends u can create again timer for something else.
Reply
#6

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
I know that I made it to use once everytime. for example /attack timer when it ends u can create again timer for something else.
You could do the same thing the way I said... I could give send you an example script if you don't understand.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)