- Регистрация
- 2 Ноя 2011
- Сообщения
- 292
- Лучшие ответы
- 0
- Репутация
- 38
Решил сделать команду /time в диалоге как на MyGame.
И так Идем в public OnPlayerCommandText и ставим это:
Собственно все))
Скрин:
]
И так Идем в public OnPlayerCommandText и ставим это:
PHP:
if(strcmp(cmd, "/time", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new mtext[20];
new year, month,day;
getdate(year, month, day);
if(month == 1) { mtext = "Января"; }
else if(month == 2) { mtext = "Февраля"; }
else if(month == 3) { mtext = "Марта"; }
else if(month == 4) { mtext = "Апреля"; }
else if(month == 5) { mtext = "Майя"; }
else if(month == 6) { mtext = "Июня"; }
else if(month == 7) { mtext = "Июля"; }
else if(month == 8) { mtext = "Августа"; }
else if(month == 9) { mtext = "Сентября"; }
else if(month == 10) { mtext = "Октября"; }
else if(month == 11) { mtext = "Ноября"; }
else if(month == 12) { mtext = "Декабря"; }
new hour,minuite,second;
gettime(hour,minuite,second);
FixHour(hour);
hour = shifthour+1;
if (PlayerInfo[playerid][pJailTime] > 0)
{
format(string, sizeof(string), "{FFFFFF}%d %s, {CCFF33}%d : %d.\Осталось сидеть в тюрьме(в секундах): %d.", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]);
}
else
{
format(string, sizeof(string), {33685F}**Дата: {FFa100}%d %s\n{FFa100}**Время %d : %d.", day, mtext, hour, minuite);
}
ApplyAnimation(playerid,"PLAYIDLES","time",4.0,0,0,0,0,0);
ShowPlayerDialog(playerid,13,DIALOG_STYLE_MSGBOX,"{FFa100}*** {FFFFFF}Часы {FFa100}***",string,"Ok","");
}
return 1;
}
Скрин:
Последнее редактирование модератором: