Jump to content

cum schimb ora


Recommended Posts

CMD:time(playerid, params[]) {
    new string[128]; 
    if(sscanf(params, "i", params[0])) return SendClientMessage(playerid, 0xFFFFFFFF, "Scrie /time - numar"); 
    if(params[0] < 0 || params[0] > 23) return SendClientMessage(playerid, 0xFFFFFFFF, "De la 0 pina la 23"); 
    SetWorldTime(params[0]); 
    format(string, sizeof(string), "Ai instalat timpul (%d:00)", params[0]); 
    SendClientMessage(playerid, 0xFFFFFFFF,, string); 
    return true; 
}  

Uite un exemplu

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
La 05.05.2019 la 21:52, </Khain> a spus:

CMD:time(playerid, params[]) {
    new string[128]; 
    if(sscanf(params, "i", params[0])) return SendClientMessage(playerid, 0xFFFFFFFF, "Scrie /time - numar"); 
    if(params[0] < 0 || params[0] > 23) return SendClientMessage(playerid, 0xFFFFFFFF, "De la 0 pina la 23"); 
    SetWorldTime(params[0]); 
    format(string, sizeof(string), "Ai instalat timpul (%d:00)", params[0]); 
    SendClientMessage(playerid, 0xFFFFFFFF,, string); 
    return true; 
}  

Uite un exemplu

Are timer si TD pentru a arata ora , nu timpu pe sv. 

In fine , @Sebi wepos poti seta ora dar atunci altcuiva nu o sa-i arate ora corect.

Sv-ul preia ora in functie de unde este hostul.

De exemplu acuma sa spunem ca in romania este ora 12:00

Daca hostul este in Italia si tu esti in orice alta tara atunci o sa arate ora 11:00.

Daca hostul este in Romania si tu esti in orice alta tara atunci o sa arate ora 12:00

Daca hostul NU este in Romania dar tu vrei sa arate ora Romaniei atunci poti face asa:

Exemplu sa spunem ca ora pe sv este 13:00 dar tu vrei sa fie 12:00 :

new h,m,s,sting[20];
gettime(h,m,s);
format(string,20,"%d:%d:%d",h-1,m,s);
SendClientMessage(playerid,-1,string);

Daca nu ai inteles ceva , lasa un reply si incerc sa-ti expli mai bine.

  • 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.