Question

Приветствую.

 

Поставил текстдравы на сервер (полностью и правильно прописал в моде), а при вводе команды (использовании) вызалит просто черный box (скрин ниже)

Спойлер

FDglYSk.jpg

 

 

Спойлер

new Text:Watch[10];

 

Спойлер

public OnFilterScriptInit()
{

    watch_TD[0] = TextDrawCreate(564.5670, 172.9924, "Box"); // пусто
    TextDrawLetterSize(watch_TD[0], 0.0000, 17.6979);
    TextDrawTextSize(watch_TD[0], 602.0000, 0.0000);
    TextDrawAlignment(watch_TD[0], 1);
    TextDrawColor(watch_TD[0], 67240193);
    TextDrawUseBox(watch_TD[0], 1);
    TextDrawBoxColor(watch_TD[0], -2139062017);
    TextDrawBackgroundColor(watch_TD[0], -2139062017);
    TextDrawFont(watch_TD[0], 1);
    TextDrawSetProportional(watch_TD[0], 1);
    TextDrawSetShadow(watch_TD[0], 0);

    watch_TD[1] = TextDrawCreate(556.2661, 224.2740, "LD_POOL:ball"); // пусто
    TextDrawTextSize(watch_TD[1], 56.0000, 70.0000);
    TextDrawAlignment(watch_TD[1], 1);
    TextDrawColor(watch_TD[1], -1);
    TextDrawBackgroundColor(watch_TD[1], 255);
    TextDrawFont(watch_TD[1], 4);
    TextDrawSetProportional(watch_TD[1], 0);
    TextDrawSetShadow(watch_TD[1], 0);

    watch_TD[2] = TextDrawCreate(580.9663, 204.8222, "LD_BEAT:chit"); // пусто
    TextDrawTextSize(watch_TD[2], 5.0000, 8.0000);
    TextDrawAlignment(watch_TD[2], 1);
    TextDrawColor(watch_TD[2], -1);
    TextDrawBackgroundColor(watch_TD[2], 255);
    TextDrawFont(watch_TD[2], 4);
    TextDrawSetProportional(watch_TD[2], 0);
    TextDrawSetShadow(watch_TD[2], 0);

    watch_TD[3] = TextDrawCreate(580.9663, 184.8222, "LD_BEAT:chit"); // пусто
    TextDrawTextSize(watch_TD[3], 5.0000, 8.0000);
    TextDrawAlignment(watch_TD[3], 1);
    TextDrawColor(watch_TD[3], -1);
    TextDrawBackgroundColor(watch_TD[3], 255);
    TextDrawFont(watch_TD[3], 4);
    TextDrawSetProportional(watch_TD[3], 0);
    TextDrawSetShadow(watch_TD[3], 0);

    watch_TD[4] = TextDrawCreate(563.0999, 333.8999, "LD_SPAC:white"); // пусто
    TextDrawTextSize(watch_TD[4], 40.0000, -3.0000);
    TextDrawAlignment(watch_TD[4], 1);
    TextDrawColor(watch_TD[4], -1);
    TextDrawBackgroundColor(watch_TD[4], 255);
    TextDrawFont(watch_TD[4], 4);
    TextDrawSetProportional(watch_TD[4], 0);
    TextDrawSetShadow(watch_TD[4], 0);

    watch_TD[5] = TextDrawCreate(580.9663, 194.8222, "LD_BEAT:chit"); // пусто
    TextDrawTextSize(watch_TD[5], 5.0000, 8.0000);
    TextDrawAlignment(watch_TD[5], 1);
    TextDrawColor(watch_TD[5], -1);
    TextDrawBackgroundColor(watch_TD[5], 255);
    TextDrawFont(watch_TD[5], 4);
    TextDrawSetProportional(watch_TD[5], 0);
    TextDrawSetShadow(watch_TD[5], 0);

    watch_TD[6] = TextDrawCreate(558.7998, 227.8220, "LD_POOL:ball"); // пусто
    TextDrawTextSize(watch_TD[6], 50.3498, 62.7098);
    TextDrawAlignment(watch_TD[6], 1);
    TextDrawColor(watch_TD[6], -2147483393);
    TextDrawBackgroundColor(watch_TD[6], 255);
    TextDrawFont(watch_TD[6], 4);
    TextDrawSetProportional(watch_TD[6], 0);
    TextDrawSetShadow(watch_TD[6], 0);

    watch_TD[7] = TextDrawCreate(563.0000, 174.0000, "LD_SPAC:white"); // пусто
    TextDrawTextSize(watch_TD[7], 40.0000, -3.0000);
    TextDrawAlignment(watch_TD[7], 1);
    TextDrawColor(watch_TD[7], -1);
    TextDrawBackgroundColor(watch_TD[7], 255);
    TextDrawFont(watch_TD[7], 4);
    TextDrawSetProportional(watch_TD[7], 0);
    TextDrawSetShadow(watch_TD[7], 0);

    watch_TD[8] = TextDrawCreate(566.3333, 243.0962, "12:12"); // пусто
    TextDrawLetterSize(watch_TD[8], 0.4000, 1.6000);
    TextDrawAlignment(watch_TD[8], 1);
    TextDrawColor(watch_TD[8], -1);
    TextDrawBackgroundColor(watch_TD[8], 255);
    TextDrawFont(watch_TD[8], 2);
    TextDrawSetProportional(watch_TD[8], 1);
    TextDrawSetShadow(watch_TD[8], 0);

    watch_TD[9] = TextDrawCreate(574.3333, 262.5925, "54"); // пусто
    TextDrawLetterSize(watch_TD[9], 0.4000, 1.6000);
    TextDrawTextSize(watch_TD[9], -137.0000, 0.0000);
    TextDrawAlignment(watch_TD[9], 1);
    TextDrawColor(watch_TD[9], -1);
    TextDrawBackgroundColor(watch_TD[9], 255);
    TextDrawFont(watch_TD[9], 2);
    TextDrawSetProportional(watch_TD[9], 1);
    TextDrawSetShadow(watch_TD[9], 0);
    
    SetTimer("SetWatchTime",1000,true);
    return true;
}

 

 

Спойлер

stock GetWeekDay(day=0, month=0, year=0) // Credits to Yom
{
  if (!day)
    getdate(year, month, day);

  new
    weekday_str[10],
    j,
    e
  ;

  if (month <= 2)
  {
    month += 12;
    --year;
  }

  j = year % 100;
  e = year / 100;

  switch ((day + (month+1)*26/10 + j + j/4 + e/4 - 2*e) % 7)
  {
    case 0: weekday_str = "SAT";
    case 1: weekday_str = "SUN";
    case 2: weekday_str = "MON";
    case 3: weekday_str = "TUE";
    case 4: weekday_str = "WED";
    case 5: weekday_str = "THU";
    case 6: weekday_str = "FRI";
  }
  return weekday_str;
}

stock ShowWatch(playerid)
{
    TextDrawShowForPlayer(playerid, watch_TD[0]);
    TextDrawShowForPlayer(playerid, watch_TD[1]);
    TextDrawShowForPlayer(playerid, watch_TD[2]);
    TextDrawShowForPlayer(playerid, watch_TD[3]);
    TextDrawShowForPlayer(playerid, watch_TD[4]);
    TextDrawShowForPlayer(playerid, watch_TD[5]);
    TextDrawShowForPlayer(playerid, watch_TD[6]);
    TextDrawShowForPlayer(playerid, watch_TD[7]);
    TextDrawShowForPlayer(playerid, watch_TD[8]);
    TextDrawShowForPlayer(playerid, watch_TD[9]);
    return true;
}
stock HideWatch(playerid)
{
    TextDrawHideForPlayer(playerid, watch_TD[0]);
    TextDrawHideForPlayer(playerid, watch_TD[1]);
    TextDrawHideForPlayer(playerid, watch_TD[2]);
    TextDrawHideForPlayer(playerid, watch_TD[3]);
    TextDrawHideForPlayer(playerid, watch_TD[4]);
    TextDrawHideForPlayer(playerid, watch_TD[5]);
    TextDrawHideForPlayer(playerid, watch_TD[6]);
    TextDrawHideForPlayer(playerid, watch_TD[7]);
    TextDrawHideForPlayer(playerid, watch_TD[8]);
    TextDrawHideForPlayer(playerid, watch_TD[9]);
    return true;
}

forward SetWatchTime();

public SetWatchTime()
{
    new string[256];
     new Year,Month,Day;    getdate(Year, Month, Day);
    new Hour,Min,Sec; gettime(Hour,Min,Sec);
     format(string, sizeof string, "%s", GetWeekDay(Day, Month, Year));
     TextDrawSetString(watch_TD[8], string);
     format(string, sizeof string, "%s%d:%s%d", (Hour < 10) ? ("0") : (""), Hour, (Min < 10) ? ("0") : (""), Min);
     TextDrawSetString(watch_TD[4], string);
     format(string, sizeof string, "%s%d",(Sec < 10) ? ("0") : (""), Sec);
     TextDrawSetString(watch_TD[9], string);
    return 1;
}

forward WatchHide(playerid);

public WatchHide(playerid)
{

    HideWatch(playerid);
    return 1;
}

 

Спойлер

CMD:atime(playerid,params[])
{
    ShowWatch(playerid);
    SetTimerEx("WatchHide", 5000, 0, "i", playerid);
    return 1;
}

 

Share this post


Link to post

1 answer to this question

  • 0

P/S: При загрузке через файлскрипт все отображается нормально.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Filatov123
      By Filatov123
      fatal error 100: cannot read from file: "performance"