SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 23/05/2020, 10:36 PM   #1
TheOliver
Little Clucker
 
Join Date: Apr 2020
Posts: 41
Reputation: 0
Default Can you put a SetTimer in a format?

How can I see the time of a SetTimer in format like in the following image:

TheOliver is offline   Reply With Quote
Old 23/05/2020, 11:31 PM   #2
TheOliver
Little Clucker
 
Join Date: Apr 2020
Posts: 41
Reputation: 0
Default Re: Can you put a SetTimer in a format?

Come on I need help, someone who knows, I would appreciate it very much
TheOliver is offline   Reply With Quote
Old 23/05/2020, 11:57 PM   #3
xRadical3
Huge Clucker
 
xRadical3's Avatar
 
Join Date: May 2017
Location: Iran
Posts: 443
Reputation: 13
Default Re: Can you put a SetTimer in a format?

PHP Code:
native GetTimerInterval(timerid);
//from TimerFix plugin - https://forum.sa-mp.com/showthread.php?t=650736 
pawn Code:
stock GetDateAndTimeOfMs(millisecond, &year, &month, &day, &hour, &minute, &second) //BigETI
{
    new accuracity;
    tickcount(accuracity);
    while(millisecond > accuracity-1)
    {
        millisecond = millisecond-accuracity;
        second++;
    }
    while(second > 59)
    {
        second = second-60;
        minute++;
    }
    while(minute > 59)
    {
        minute = minute-60;
        hour++;
    }
    while(hour > 23)
    {
        hour = hour-24;
        day++;
    }
    while(day > 27)
    {
        day = day-28;
        month++;
    }
    while(month > 11)
    {
        month = month-12;
        year++;
    }
}

pawn Code:
new year, month, day, hour, minute, second, ms = GetTimerInterval(timerid);
GetDateAndTimeOfMs(ms, year, month, day, hour, minute, second);
printf("Time: %d years | %d months | %d days | %d hours | %d minutes | %d seconds", year, month, day, hour, minute, second);
xRadical3 is online now   Reply With Quote
Old 24/05/2020, 11:22 AM   #4
hopeonxanny
Big Clucker
 
hopeonxanny's Avatar
 
Join Date: Apr 2020
Location: RO
Posts: 184
Reputation: 3
Default Re: Can you put a SetTimer in a format?

i've been trying using
TimerFix plugin - https://forum.sa-mp.com/showthread.php?t=650736
but im getting some errors in console.
PHP Code:
[timerfix.pluginn_SetTimerExbad parameter count (count is 4should be greater than 5)
[
timerfix.pluginn_SetTimerExbad parameter count (count is 4should be greater than 5)
[
timerfix.pluginn_SetTimerExbad parameter count (count is 4should be greater than 5
i am using y_timers, i dont have any "SetTimer" or "SetTimerEx" in the gamemode.
__________________
I am the guy that likes to "+rep" you, even if I wasn't the one who was needing help.
hopeonxanny is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Me Ajude Entender Como usar o SetTimer(ex) com For ou Substituir SetTimer(ex) por For? matheusdorado Português/Portuguese 6 13/11/2018 08:07 PM
SetTimer DarkWolfff Scripting Help 0 12/05/2014 07:06 PM
Format again. How can I format() the vars? Seven_of_Nine Help Archive 9 13/04/2011 04:22 PM
Scripting with format or without format? godknightx Help Archive 4 08/12/2010 07:38 PM
Settimer witha settimer in it 02manchestera Help Archive 2 07/03/2010 01:01 PM


All times are GMT. The time now is 01:13 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.