[Ajuda] converter tempo
#1

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
Reply
#2

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

E usa TextDrawSetString(textdraw[1], Convert2(timerrr));
Reply
#3

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
Reply
#4

Tempo de prisao: %d seg

Troca por

Tempo de prisao: %s
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)