SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 14/07/2015, 01:14 AM   #1
waaT
Little Clucker
 
Join Date: Aug 2012
Posts: 14
Reputation: 3
Default converter tempo

estou tentando converter uma contagem que está em segundos para minutos e segundos.

pawn Code:
timerrr --;
new str[20];
new  minn, secc;
secc = (timerrr / 60);
minn = (timerrr / 60);
format(str, sizeof(str), "%i:%i", minn, secc);
TextDrawSetString(textdraw[1], str);


a variável timer começa com timerrr = 600; // 600 segundos = 10 minutos.

e nessa função que eu fiz fica 9:9 a textdraw
waaT is offline   Reply With Quote
Old 14/07/2015, 01:17 AM   #2
CaioTJF
Gangsta
 
CaioTJF's Avatar
 
Join Date: Sep 2012
Location: Rio de Janeiro
Posts: 546
Reputation: 164
Default Re: converter tempo

Bota isso no final do seu GM:
http://pastebin.com/G9Mg2zdE

E usa TextDrawSetString(textdraw[1], Convert2(timerrr));
__________________
owner
IP: server.gtatorcidas.net:2009 / Website: www.gtatorcidas.net



CaioTJF is offline   Reply With Quote
Old 14/07/2015, 01:44 AM   #3
DeadNudock
Huge Clucker
 
DeadNudock's Avatar
 
Join Date: Sep 2014
Posts: 218
Reputation: 1
Default Re: converter tempo

Quote:
Originally Posted by CaioTJF View Post
Bota isso no final do seu GM:
http://pastebin.com/G9Mg2zdE

E usa TextDrawSetString(textdraw[1], Convert2(timerrr));
Olá amigo, vc acabou de ser raputado
DeadNudock is offline   Reply With Quote
Old 14/07/2015, 01:45 AM   #4
CaioTJF
Gangsta
 
CaioTJF's Avatar
 
Join Date: Sep 2012
Location: Rio de Janeiro
Posts: 546
Reputation: 164
Default Re: converter tempo

Tempo de prisao: %d seg

Troca por

Tempo de prisao: %s
__________________
owner
IP: server.gtatorcidas.net:2009 / Website: www.gtatorcidas.net



CaioTJF 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] Tirando o tempo entre empregos e colocando level de tempo costadd Português/Portuguese 4 04/10/2013 02:12 PM
[Ajuda] Converter CMD ... Wanted_Down Português/Portuguese 2 13/03/2013 04:44 PM
[Ajuda] Respeito de tempo em tempo FPB_Lipos Português/Portuguese 4 13/12/2012 09:13 PM
map converter Swiftz Help Archive 3 04/02/2011 04:14 PM


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


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