Leon_Colors
Умник
Возможно многие видели приветствие с звёздочками и часы на сервере skrilax сегодня мы их сделаем
Начнём
Ко всем переменным
В public OnPlayerConnect(playerid):
В public OnPlayerDisconnect(playerid, reason)
В stock Fresh()
К Текстдравам
Теперь приветствие
В public OnPlayerConnect(playerid):
Начнём
Ко всем переменным
PHP:
new Text:ServerTime[2];
В public OnPlayerConnect(playerid):
PHP:
TextDrawShowForPlayer(playerid,ServerTime[0]);
TextDrawShowForPlayer(playerid,ServerTime[1]);
В public OnPlayerDisconnect(playerid, reason)
PHP:
TextDrawHideForPlayer(playerid, ServerTime[0]);
TextDrawHideForPlayer(playerid, ServerTime[1]);
В stock Fresh()
PHP:
new hour12,minute12,second12;
gettime(hour12,minute12,second12);
new stringzz[256];
new string[256],year,month,day,hours,minutes,seconds;
getdate(year, month, day), gettime(hours, minutes, seconds);
format(stringzz, sizeof(stringzz), "%02d:%02d:%02d", hour12, minute12,second12);
TextDrawSetString(ServerTime[0],stringzz);
AntiCheat(i);
format(string, sizeof string, "%d-%s%d-%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
TextDrawSetString(ServerTime[1], string);
К Текстдравам
PHP:
ServerTime[0] = TextDrawCreate(578.000000,131.000000,"__");
TextDrawFont(ServerTime[0],1);
TextDrawLetterSize(ServerTime[0],0.340000,1.299998);
TextDrawColor(ServerTime[0], -1);
TextDrawSetProportional(ServerTime[0], 1);
TextDrawSetOutline(ServerTime[0], 1);
ServerTime[1] = TextDrawCreate(498.000000,131.000000,"__");
TextDrawFont(ServerTime[1],1);
TextDrawLetterSize(ServerTime[1],0.360000,1.299998);
TextDrawColor(ServerTime[1], -1);
TextDrawSetProportional(ServerTime[1], 1);
TextDrawSetOutline(ServerTime[1], 1);
В public OnPlayerConnect(playerid):
PHP:
GameTextForPlayer(playerid,"~w~Welcome to ~n~~b~]~p~ STYLE ROLE PLAY ~b~]",4000,4);
