- 8
- 0
Не понимаю почему код работает но криво помогите написать правильно.
Код:
CMD:stime(playerid)
{
new string[100];
if(Login[playerid] == false) return SCM(playerid, COLOR_GREY, "Вы не авторизовались!");
GetPlayerName(playerid, playername, sizeof(playername));
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) ApplyAnimation(playerid, "COP_AMBIENT", "coplook_watch", 4.1, 0, 0, 0, 0, 0);
getdate(year, month, day);
new text[15];
switch(month)
{
case 1: text = "Январь";
case 2: text = "Февраль";
case 3: text = "Март";
case 4: text = "Апрель";
case 5: text = "May";
case 6: text = "Июнь";
case 7: text = "Июль";
case 8: text = "Август";
case 9: text = "Сентябрь";
case 10: text = "Октябарь";
case 11: text = "Ноябрь";
case 12: text = "Декабрь";
}
format(string, sizeof(string), "%s взглянул(а) на часы", playername);
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 20.0, 5*1000);
gettime(hour, minuta, second);
if(minuta < 10) format(string, sizeof(string), "~y~%d %s~n~~g~%d:0%d", day, text, hour, minuta);
else format(string, sizeof(string), "~y~%d %s~n~~g~%d:%d", day, text, hour, minuta);
GameTextForPlayer(playerid, string, 5*1000, 1);
return true;
}