Thread: Useful Snippets
View Single Post
Old 07/02/2019, 05:45 PM   #1160
Kasichok
Big Clucker
 
Kasichok's Avatar
 
Join Date: Sep 2018
Location: weed farm
Posts: 50
Reputation: 24
Default Re: Useful Snippets



Time script



PHP Code:
#include <a_samp>

static timer;
static 
Text:time;

public 
OnFilterScriptInit()
{
    
time TextDrawCreate(552.90020732.800006"00:00");
    
TextDrawLetterSize(time0.4103332.321777);
    
TextDrawAlignment(time1);
    
TextDrawColor(time255);
    
TextDrawSetShadow(time0);
    
TextDrawSetOutline(time1);
    
TextDrawBackgroundColor(time, -2139062017);
    
TextDrawFont(time0);
    
TextDrawSetProportional(time1);
    
timer SetTimer("Update_Time"1000true);
    return 
1;
}

public 
OnFilterScriptExit()
{
    
TextDrawDestroy(time);
    
KillTimer(timer);
    return 
1;
}

public 
OnPlayerConnect(playerid)
{
    
TextDrawShowForPlayer(playeridtime);
    return 
1;
}

forward Update_Time();

public 
Update_Time()
{
    new 
str[6], hm;
    
gettime(hm);
    
format(strsizeof(str), "%02d:%02d"hm);
    
TextDrawSetString(timestr);
    return 
1;

__________________



STRESSED? TRY KASICHOK AND RELAX


Kasichok is offline   Reply With Quote