SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese > Lançamentos/Releases

Reply
 
Thread Tools Display Modes
Old 16/11/2013, 02:45 PM   #31
Slack
Little Clucker
 
Join Date: Oct 2013
Posts: 6
Reputation: 0
Default Re: Convert Days (Converter Dias)

... removed!
Slack is offline   Reply With Quote
Old 16/11/2013, 06:17 PM   #32
DanDRT
High-roller
 
DanDRT's Avatar
 
Join Date: Apr 2012
Posts: 1,345
Reputation: 227
Default Respuesta: Re: Convert Days (Converter Dias)

Quote:
Originally Posted by Slack View Post
... removed!
Se ia remover seu post pra que postar isso?
DanDRT is offline   Reply With Quote
Old 16/11/2013, 07:58 PM   #33
Slack
Little Clucker
 
Join Date: Oct 2013
Posts: 6
Reputation: 0
Default Re: Respuesta: Re: Convert Days (Converter Dias)

Quote:
Originally Posted by DanDRT View Post
Se ia remover seu post pra que postar isso?
não tenho poder para saber se eu ia ou não remover minha postagem.

minha postagem foi removida , por que postei um código muito semelhante a esse "seu" de autoria de outra pessoa, então para evitar brigas resolvi apagar.
Slack is offline   Reply With Quote
Old 17/11/2013, 03:13 PM   #34
Mr.Hardy
Huge Clucker
 
Mr.Hardy's Avatar
 
Join Date: Dec 2011
Location: Brazil (SC)
Posts: 442
Reputation: 61
Default Re: Respuesta: Convert Days (Converter Dias)

Quote:
Originally Posted by DanDRT View Post
não existe esse 1000.
1000 * 60 * 60 * 24
Porque não? Se um segundo corresponde á 1000 ms?

1000 * 60 = 1minuto
60000 * 60 = 1hora
3600000 * 24 = 1dia ou 24horas.
__________________


Dispositivos:
- Nokia Lumia 825
- Gran Duos ( primeira geração )
- iPhone 5S
- iPhone 5C
- iPhone 6
- iPad 2G (wi-fi 2012)
- Sony Playstation 2
- Sony Playstation 3 (Assassin's Creed: Brotherhood | FIFA 11 | Uncharted 3)
- Xbox One (GTA V | FIFA 14 | Battlefield 4 | Titanfall | Watch Dogs | FIFA 15 | Battlefield 5 | UFC | Need For Speed: Rivals | Dragon Age: Inquisition)
Mr.Hardy is offline   Reply With Quote
Old 19/11/2013, 09:42 PM   #35
DanDRT
High-roller
 
DanDRT's Avatar
 
Join Date: Apr 2012
Posts: 1,345
Reputation: 227
Default Respuesta: Re: Respuesta: Convert Days (Converter Dias)

Quote:
Originally Posted by Mr.Hardy View Post
Porque não? Se um segundo corresponde á 1000 ms?

1000 * 60 = 1minuto
60000 * 60 = 1hora
3600000 * 24 = 1dia ou 24horas.
60 * 60 = 1h * 24 = 1 dia * 1000 = 1000 dias.
1000-gettime() = Numero negativo.
o certo é:
gettime()+(60 * 60 * 24 * (Days)).
DanDRT is offline   Reply With Quote
Old 15/06/2020, 03:52 PM   #36
ScripterGringo
Little Clucker
 
Join Date: Jun 2020
Posts: 4
Reputation: 0
Default Re: Convert Days (Converter Dias)

O link dp download expirou alguem pode me mandar o link?
ScripterGringo is offline   Reply With Quote
Old 15/06/2020, 03:59 PM   #37
darkxdll
High-roller
 
darkxdll's Avatar
 
Join Date: Jul 2012
Location: C:\Windows\DLLs
Posts: 1,633
Reputation: 89
Default Re: Convert Days (Converter Dias)

Quote:
Originally Posted by ScripterGringo View Post
O link dp download expirou alguem pode me mandar o link?
Se tivesse lido o tópico veria que o código fonte encontra-se no mesmo.

PHP Code:
#define ConvertDays(%0) (gettime() + (86400 * (%0)))

stock VerifyExpiredDays(days)
    return (
days) < gettime();

stock ConvertToDays(n)
{
    new 
t[5], String[75];
        
t[4] = n-gettime();
    
t[0] = t[4] / 3600;
    
t[1] = ((t[4] / 60) - (t[0] * 60));
    
t[2] = (t[4] - ((t[0] * 3600) + (t[1] * 60)));
    
t[3] = (t[0]/24);

    if(
t[3] > 0)
        
t[0] = t[0] % 24,
        
format(Stringsizeof(String), "%ddias, %02dh %02dm e %02ds"t[3], t[0], t[1], t[2]);
    else if(
t[0] > 0)
        
format(Stringsizeof(String), "%02dh %02dm e %02ds"t[0], t[1], t[2]);
    else
        
format(Stringsizeof(String), "%02dm e %02ds"t[1], t[2]);
    return 
String;

__________________
Discord: darkxdll#9097

Consulte valores.
darkxdll 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
[Tutorial] Vip por Dias Wellington1999 Lançamentos/Releases 11 17/09/2013 01:47 AM
Convert Seconds To Days Hours Minutes And Seconds Brokenbreaken Scripting Help 2 18/02/2013 08:01 PM
[Include] Quaternion Converter - Convert GetVehicleRotationQuat angles to XYZ [1.0.0|13/08/10] ev0lution Includes 11 01/05/2012 09:42 AM
[Ajuda] Converter segundos em dias pWesley Português/Portuguese 12 29/01/2012 04:49 PM


All times are GMT. The time now is 03:24 PM.


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