12.09.2010, 03:02
Ola pessoal, estou aqui para pedir o comando /horas para meu servidor, que mostra as horas, o dia e se voce tiver preso, o tempo restante....Vlw abracos
if(strcmp(cmd, "/horas", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new mtext[20];
new year, month,day;
getdate(year, month, day);
if(month == 1) { mtext = "Janeiro"; }
else if(month == 2) { mtext = "Fevereiro"; }
else if(month == 3) { mtext = "Marco"; }
else if(month == 4) { mtext = "Abril"; }
else if(month == 5) { mtext = "Maio"; }
else if(month == 6) { mtext = "Junho"; }
else if(month == 7) { mtext = "Julho"; }
else if(month == 8) { mtext = "Agosto"; }
else if(month == 9) { mtext = "Setembro"; }
else if(month == 10) { mtext = "Outubro"; }
else if(month == 11) { mtext = "Novembro"; }
else if(month == 12) { mtext = "Dezembro"; }
new hour,minuite,second;
gettime(hour,minuite,second);
//Fixhour(hour);
hour = shifthour;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s olhou as horas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if (minuite < 10)
{
if (PlayerInfo[playerid][pJailTime] > 0)
{
format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|~n~~w~Tempo De Prisao: %d seg", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
}
else
{
format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite);
}
}
else
{
if (PlayerInfo[playerid][pJailTime] > 0)
{
format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|~n~~w~Tempo De Prisao: %d seg", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
}
else
{
format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
}
}
GameTextForPlayer(playerid, string, 5000, 1);
}
return 1;
}