Jump to content
  • 0

CountDown de craciun.


Bogdan's

Question

Problema intalnita (descriere): Cum as putea face un countdown pana de craciun?Si timpul sa se scurga in timp real pana de craciun si de anul nou?Si cum as putea sa le introduc in comenzi?
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul:-
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da,am cautat ceva de acest gen '' CountDown Christmas'' dar nu mi-a dat.

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0
CMD:newyear(playerid,params[])
{
	new Ex_Timer[7],string[200];
    getdate(Ex_Timer[0], Ex_Timer[1], Ex_Timer[2]);gettime(Ex_Timer[4], Ex_Timer[5], Ex_Timer[6]);

    switch(Ex_Timer[1])
    {
        case 1, 3, 5, 7, 8, 10, 12: Ex_Timer[3] = 31;
        case 2: { if(Ex_Timer[0]%4 == 0) { Ex_Timer[3] = 29; } else { Ex_Timer[3] = 28; } }
        case 4, 6, 9, 11: Ex_Timer[3] = 30;
    }
    Ex_Timer[1] = 12 - Ex_Timer[1];	Ex_Timer[2] = Ex_Timer[3] - Ex_Timer[3];
    Ex_Timer[4] = 24 - Ex_Timer[4]; if(Ex_Timer[4] == 24) { Ex_Timer[4] = 0; }	if(Ex_Timer[5] != 0) { Ex_Timer[4]--; }
    Ex_Timer[5] = 60 - Ex_Timer[5]; if(Ex_Timer[5] == 60) { Ex_Timer[5] = 0; }	if(Ex_Timer[6] != 0) { Ex_Timer[5]--; }
    Ex_Timer[6] = 60 - Ex_Timer[6]; if(Ex_Timer[6] == 60) { Ex_Timer[6] = 0; }

	format(string, sizeof(string), "2015 In %02d Months %02d Days %02d Hours %02d Minutes %02d Seconds", Ex_Timer[1], Ex_Timer[2], Ex_Timer[4], Ex_Timer[5], Ex_Timer[6]);
	SendClientMessage(playerid,-1,string);
	return 1;
}

Să faci acel CountDown trebuie să ști foarte bine să lucrezi cu timerele. :) Ai mai sus să-ți trimită mesaj in chat.

  • Upvote 1
public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

  • 0

Creezi un textdraw (sigur ști să-l faci ) după aceea cu ce e in comandă creezi un public etc...acuma nu pot să-ți spun tot pentru că trebuie să plec. Poate ... doar poate am să-ți creez eu unul după ce ma întorc dacă nu creează altcineva.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

  • 0

Ce-i în comandă faci un public , pui timer la acel public , creezi TD ...pui la acel public să se seteze stringu la respectivu TD si după aceea pui sa arate TD/u tuturor.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.