Creating textdraw
#1

hey guys any ideas how i can make a Time Line that it would show me whats the time as Textdraw and as Digital Clock

Thanks for help
Reply
#2

Just search in ****** you can find
Reply
#3

I think this can be better:
pawn Code:
//a_samp.inc must be included.
//TogglePlayerClock is disable by default so don't follow NooB Amirab

static Text:TimeTD;
forward UpdateTime();

public OnGameModeInit()
{
    TimeTD = TextDrawCreate(546.0, 23.0, "Loading time ...");
    TextDrawLetterSize(TimeTD, 0.5, 1.9);
    TextDrawFont(TimeTD, 3);
    TextDrawSetOutline(TimeTD, 2);
    SetTimer("UpdateTime", 1000, 1);
    return 1;
}

public UpdateTime()
{
     new Hour, Min, Sec;
     gettime(Hour, Min, Sec);
     new TimeStr[20];
     format(TimeStr, 20, "%02d:%02d", (Hour, Min);
     TextDrawSetString(TimeTD, TimeStr);
     return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, TimeTD);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)