Jump to content

Recommended Posts

Posted

Am facut ceas si data si imi arata asa de ce?

Citat

forward settime(playerid);
new Text:Time, Text:Date;

Citat

public settime(playerid)
{
    new string[256],hours,minutes,seconds,year,month,day;
    gettime(hours, minutes, seconds), getdate(year, month, day);
    format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
    TextDrawSetString(Time, string);
    format(string, sizeof string, "%d-%s%d-%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
    TextDrawSetString(Date, string);
}

Citat

public OnGameModeInit()
{
    SetGameModeText("GM2k20");
    AddPlayerClass(60, 2127.8657,2379.1455,10.8203,179.0282, 0, 0, 0, 0, 0, 0);
    //CEAS SI DATA 
    Time = TextDrawCreate(546.000000,28.000000,"--");
    TextDrawAlignment(Time,0);
    TextDrawBackgroundColor(Time,0x000000ff);
    TextDrawFont(Time,2);
    TextDrawLetterSize(Time,0.370000,1.800000);
    TextDrawColor(Date,0xFF0606AA);//0xFF0606AA
    TextDrawSetOutline(Time,1);
    TextDrawSetProportional(Time,1);
    TextDrawSetShadow(Time,1);
    SetTimer("settime",1000,true);

    Date = TextDrawCreate(543.000000,15.000000,"--");
    TextDrawAlignment(Date,0);
    TextDrawBackgroundColor(Date,0x000000ff);
    TextDrawFont(Date,2);
    TextDrawLetterSize(Date,0.370000,1.800000);
    TextDrawColor(Time,0xFF0606AA); //0xFF0606AA
    TextDrawSetOutline(Date,1);
    TextDrawSetProportional(Date,1);
    TextDrawSetShadow(Date,1);
    SetTimer("settime",1000,true);
    return 1;

 

ce.png

Posted

la finalul publicului settime, inainte de acolada, pui

TextDrawShowForAll(Time);

TextDrawShowForAll(Date);

return 1;

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.