SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Русский/Russian

Reply
 
Thread Tools Display Modes
Old 09/12/2014, 09:24 AM   #1
Makar007
Big Clucker
 
Join Date: Jun 2013
Posts: 122
Reputation: 0
Default О русских символах в TD

Всем привет, у меня проблема в частичном отображением символов - http://i.imgur.com/wW7k2iu.png

Вот код форматирования.

Code:
format(str, sizeof(str),
				FixText("~r~Дата рождения:~w~ %s~n~\
						~r~Место рождения:~w~ %s~n~\
						~r~Создан:~w~ %s~n~\
						~r~Играл:~w~ %s"),
				birthdate,
				origin,
				GetDuration(gettime() - cache_get_field_int(0, "CreateDate")),
				GetDuration(gettime() - cache_get_field_int(0, "LastLogin")));
Вот код времени, проблема именно тут.

Code:
stock GetDuration(time)
{
	new
	    str[32];

	if (time < 0 || time == gettime()) {
	    format(str, sizeof(str), "Никогда");
	    return str;
	}
	else if (time < 60)
		format(str, sizeof(str), "%d секунд", time);

	else if (time >= 0 && time < 60)
		format(str, sizeof(str), "%d секунду", time);

	else if (time >= 60 && time < 3600)
		format(str, sizeof(str), (time >= 120) ? ("%d минут") : ("%d минуту"), time / 60);

	else if (time >= 3600 && time < 86400)
		format(str, sizeof(str), (time >= 7200) ? ("%d часов") : ("%d час"), time / 3600);

	else if (time >= 86400 && time < 2592000)
 		format(str, sizeof(str), (time >= 172800) ? ("%d дней") : ("%d день"), time / 86400);

	else if (time >= 2592000 && time < 31536000)
 		format(str, sizeof(str), (time >= 5184000) ? ("%d месяцев") : ("%d месяц"), time / 2592000);

	else if (time >= 31536000)
		format(str, sizeof(str), (time >= 63072000) ? ("%d лет") : ("%d год"), time / 31536000);

	strcat(str, " назад");

	return str;
}
И еще вопросик, почему под скином черный фон, когда фона не должно быть вообще, код создания:

Code:
	PlayerData[playerid][pTextdraws][73] = CreatePlayerTextDraw(playerid, 218.125000, 157.500000, "skin");
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][73], 0.000000, 0.000000);
	PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][73], 70.625000, 89.250000);
	PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][73], 1);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][73], -1);
	PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][73], true);
	PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][73], 0);
	PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][73], 0);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][73], 0);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][73], 5);
Makar007 is offline   Reply With Quote
Old 09/12/2014, 02:17 PM   #2
SoNikMells
Huge Clucker
 
SoNikMells's Avatar
 
Join Date: Feb 2014
Location: Belarus
Posts: 280
Reputation: 62
Default Re: О русских символах в TD

sonnier.3dn.ru/RusGT.htm
SoNikMells is offline   Reply With Quote
Old 09/12/2014, 02:37 PM   #3
Makar007
Big Clucker
 
Join Date: Jun 2013
Posts: 122
Reputation: 0
Default Re: О русских символах в TD

Quote:
Originally Posted by SoNikMells View Post
stock GetDuration(time) используется не только в тд.
Makar007 is offline   Reply With Quote
Old 10/12/2014, 07:01 AM   #4
k3dr
Big Clucker
 
k3dr's Avatar
 
Join Date: Oct 2013
Location: sudd3n
Posts: 129
Reputation: 0
Default Re: О русских символах в TD

PHP Code:
format(strsizeof(str),
                
FixText("~r~Дата рождения:~w~ %s~n~\
                        ~r~Место рождения:~w~ %s~n~\
                        ~r~Создан:~w~ %s~n~\
                        ~r~Играл:~w~ %s"
),
                
birthdate,
                
origin,
                
FixText(GetDuration(gettime() - cache_get_field_int(0"CreateDate"))),
                
FixText(GetDuration(gettime() - cache_get_field_int(0"LastLogin")))); 
__________________
k3dr is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Мониторинг Русских серверов San Andreas Multiplayer MichaelKonsta Русский/Russian 47 06/02/2017 11:13 PM


All times are GMT. The time now is 02:18 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.