[Ajuda] com Data em FS
#1

Pessoal eu tenho esse sistema de data aqui:

pawn Код:
public time()
{
new Text:Clock;
new hour,minute,second;
gettime(hour,minute,second);
new string[256];
new string2[256];
if (minute <= 9){format(string,25,"%d:0%d",hour,minute);}
else {format(string,25,"%d:%d",hour,minute);}
TextDrawHideForAll(Clock);
Clock=TextDrawCreate(549,24,string);
TextDrawLetterSize(Clock,0.55,2);
TextDrawFont(Clock,3);
TextDrawBackgroundColor(Clock,0x000000AA);
TextDrawSetOutline(Clock,2);
TextDrawShowForAll(Clock);
SetTimer("time",30000,0);
if (hour == 0){SetWorldTime(0);}
if (hour == 1){SetWorldTime(1);}
if (hour == 2){SetWorldTime(2);}
if (hour == 3){SetWorldTime(3);}
if (hour == 4){SetWorldTime(4);}
if (hour == 5){SetWorldTime(5);}
if (hour == 6){SetWorldTime(6);}
if (hour == 7){SetWorldTime(7);}
if (hour == 8){SetWorldTime(8);}
if (hour == 9){SetWorldTime(9);}
if (hour == 10){SetWorldTime(10);}
if (hour == 11){SetWorldTime(11);}
if (hour == 12){SetWorldTime(12);}
if (hour == 13){SetWorldTime(13);}
if (hour == 14){SetWorldTime(14);}
if (hour == 15){SetWorldTime(15);}
if (hour == 16){SetWorldTime(16);}
if (hour == 17){SetWorldTime(17);}
if (hour == 18){SetWorldTime(18);}
if (hour == 19){SetWorldTime(19);}
if (hour == 20){SetWorldTime(20);}
if (hour == 21){SetWorldTime(21);}
if (hour == 22){SetWorldTime(22);}
if (hour == 23){SetWorldTime(23);}
if (hour == 24){SetWorldTime(24);}

new Text:Datum;
new day,month,year;
getdate(day,month,year);
if (day <= 9){format(string2,25,"0%d.%d.%d",day,month,year);}
else if (month <= 9 && day >= 9) {format(string2,25,"%d/0%d/%d",day,month,year);}
else {format(string2,25,"%d.%d.%d",year,month,day);}
TextDrawHideForAll(Datum);
Datum=TextDrawCreate(36.000000, 427.000000,string2);
TextDrawLetterSize(Datum,0.55,2);
TextDrawFont(Datum,3);
TextDrawBackgroundColor(Datum,0x878787AA);
TextDrawSetOutline(Datum,2);
TextDrawShowForAll(Datum);

return 1;
}
Tem como coloca-lo dentro do meu FS? Se tiver por favor, me respondam como vlw
Reply
#2

Quer colocar no fs,ou no gm?
Se for GM
e So Copiar as forward,variaveis,que indicam este codigo,e colocar
onde quer elas..
Se for FS do mesmo jeito ^^
Reply
#3

Dica :

pawn Код:
if (hour == 0){SetWorldTime(0);}
if (hour == 1){SetWorldTime(1);}
if (hour == 2){SetWorldTime(2);}
if (hour == 3){SetWorldTime(3);}
if (hour == 4){SetWorldTime(4);}
if (hour == 5){SetWorldTime(5);}
if (hour == 6){SetWorldTime(6);}
if (hour == 7){SetWorldTime(7);}
if (hour == 8){SetWorldTime(8);}
if (hour == 9){SetWorldTime(9);}
if (hour == 10){SetWorldTime(10);}
if (hour == 11){SetWorldTime(11);}
if (hour == 12){SetWorldTime(12);}
if (hour == 13){SetWorldTime(13);}
if (hour == 14){SetWorldTime(14);}
if (hour == 15){SetWorldTime(15);}
if (hour == 16){SetWorldTime(16);}
if (hour == 17){SetWorldTime(17);}
if (hour == 18){SetWorldTime(18);}
if (hour == 19){SetWorldTime(19);}
if (hour == 20){SetWorldTime(20);}
if (hour == 21){SetWorldTime(21);}
if (hour == 22){SetWorldTime(22);}
if (hour == 23){SetWorldTime(23);}
if (hour == 24){SetWorldTime(24);}
pawn Код:
SetWorldTime(hour);
Reply
#4

Quote:
Originally Posted by @Riichard
Посмотреть сообщение
Quer colocar no fs,ou no gm?
Se for GM
e So Copiar as forward,variaveis,que indicam este codigo,e colocar
onde quer elas..
Se for FS do mesmo jeito ^^
Verdade vei, tinha esquecido disso, vlw
Reply
#5

"onde quer elas.."
Errei essa parte,'-'
e so colocar tipo como esta no gm/fs
copiar os forward/variaveis e colocar no topo , ou na public msm,exato como o
original '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)