Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted (edited)

Buna astazi o sa va prezint un sistem simplu care este binevenit pentru toti, data si ora practic este pe toate serverele si am decis sa public vrianta mea.

Citat

//variabile

new time[2];

//ongamemodeinit

time[0] = TextDrawCreate(549.500000, 23.625000, "22:35");
TextDrawLetterSize(time[0], 0.596499, 1.910626);
TextDrawAlignment(time[0], 1);
TextDrawColor(time[0], -1646626373);
TextDrawSetShadow(time[0], 0);
TextDrawSetOutline(time[0], -1);
TextDrawBackgroundColor(time[0], 51);
TextDrawFont(time[0], 2);
TextDrawSetProportional(time[0], 1);

time[1] = TextDrawCreate(551.500000, 39.062500, "01.01.2019");
TextDrawLetterSize(time[1], 0.322499, 0.987501);
TextDrawAlignment(time[1], 1);
TextDrawColor(time[1], -1646626373);
TextDrawSetShadow(time[1], 0);
TextDrawSetOutline(time[1], -1);
TextDrawBackgroundColor(time[1], 51);
TextDrawFont(time[1], 2);
TextDrawSetProportional(time[1], 1);

//in orice loc al modului

forward timpul(playerid);

public timpul() 

    new hour,minute,second; 
    gettime(hour,minute,second); 
    new string[256]; 
    new string2[256]; 
    format(string, sizeof(string), "%02d:%02d", hour, minute); 
    new day,month,year; 
    getdate(year,month,day); 
    format(string2, sizeof(string2), "%02d.%02d.%d",day,month,year); 
    SetWorldTime( hour ); 
    for(new i=0;i<MAX_PLAYERS;i++) 
    { 
        TextDrawSetString(time[0],string); 
        TextDrawSetString(time[1],string2); 
        TextDrawShowForPlayer(i,time[0]); 
        TextDrawShowForPlayer(i,time[1]); 
    } 
    return 1; 
}

//onplayerconnect

for(new i; i < 2; i++) TextDrawShowForPlayer(playerid, time);

 

 

 

 

sa-mp-098.png

Edited by #Yudin
  • Like 1
  • Thanks 2
  • 9 months later...
  • 4 years later...
Posted
On 2/22/2019 at 10:01 PM, khain.dev said:

Buna astazi o sa va prezint un sistem simplu care este binevenit pentru toti, data si ora practic este pe toate serverele si am decis sa public vrianta mea.

 

 

 

 

sa-mp-098.png

La mine e cu 3 ore in urmă ... Nu mi pot da seama de ce .. :( am incercat tot felul de scripturi pentru data și timp

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.