SA-MP Forums Archive
Creating textdraw - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Creating textdraw (/showthread.php?tid=489097)



Creating textdraw - Acres - 20.01.2014

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


Re: Creating textdraw - amirab - 20.01.2014

Just search in ****** you can find


Re: Creating textdraw - Aliassassin123456 - 22.01.2014

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;
}