andim53
Дебютант
PHP:
сmd:phone(playerid)
{
if(pInfo[playerid][pPhoneNumber] <= 2)return SendClientMessage(playerid, COLOR_GREY, "У Вас нет телефона или сим. карты!");
if(phone[playerid])return SendClientMessage(playerid, COLOR_GREY, "У Вас уже открыт телефон!");
new day, month; getdate(_, month, day);
new hour, minute; gettime(hour, minute);
static const Names_Months[12][12] = {"January","February","March","April","May","June","July","August","September","October","November","December"};
stringer[0] = EOS;
format(stringer, 128, "%d:%d~n~%d~n~%s~n~", hour, minute, day, Names_Months[month]);
PlayerTextDrawSetString(playerid, phone_PTD[playerid][3], stringer);
PlayerTextDrawSetString(playerid, phone_PTD[playerid][4], FixText("выкл/вкл"));
PlayerTextDrawSetString(playerid, phone_PTD[playerid][5], FixText("закрыть"));
if(pInfo[playerid][pPhoneOn] == 1) for(new i; i < 29; i ++) TextDrawShowForPlayer(playerid, phone_TD[i]);
else if(pInfo[playerid][pPhoneOn] == 0)
{
for(new i; i < 10; i ++) TextDrawShowForPlayer(playerid, phone_TD[i]);
TextDrawShowForPlayer(playerid, phone_TD[25]);
TextDrawShowForPlayer(playerid, phone_TD[26]);
TextDrawShowForPlayer(playerid, phone_TD[27]);
TextDrawShowForPlayer(playerid, phone_TD[28]);
}
PlayerTextDrawShow(playerid, phone_PTD[playerid][0]);
PlayerTextDrawShow(playerid, phone_PTD[playerid][1]);
PlayerTextDrawShow(playerid, phone_PTD[playerid][2]);
PlayerTextDrawShow(playerid, phone_PTD[playerid][3]);
PlayerTextDrawShow(playerid, phone_PTD[playerid][4]);
PlayerTextDrawShow(playerid, phone_PTD[playerid][5]);
SelectTextDraw(playerid, COLOR_ORANGE);
phone[playerid] = true;
return true;
}
Последнее редактирование модератором:
