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

[Tutorial] Cum sa salvezi vremea si timpul dupa restart


Recommended Posts

Posted

Salut,ati avut momente cind dupa restart este alta vreme si timp, mai ales daca aveti vremea si timpul ca in relitate,cu aceasta metoda dupa restart se va salva timpul si vremea pe server care era!

Citat

// in orice loc al modului chiar si la sfirsit

stock SaveWAndT() 

    new strtmp[8]; 
    GetServerVarAsString("weather", strtmp, sizeof strtmp); 
    SetSVarString("un_Weather", strtmp); 
    GetServerVarAsString("worldtime", strtmp, sizeof strtmp); 
    SetSVarString("un_WorldTime", strtmp); 

stock LoadWAndT() 

    new strtmp[8]; 
    if(GetSVarType("un_Weather")) 
    { 
        GetSVarString("un_Weather", strtmp, sizeof strtmp); 
        SetWeather(strval(strtmp)); 
    } 
    if(GetSVarType("un_WorldTime")) 
    { 
        GetSVarString("un_WorldTime", strtmp, sizeof strtmp); 
        SetWorldTime(strval(strtmp)); 
    } 

Citat

// trecem la publicuri si introducem aceste stock-uri

public OnGameModeInit() 

    LoadWAndT(); 
    return 1; 

public OnGameModeExit() 

    SaveWAndT(); 
    return 1; 

Mersi de atentie,astept macar un "+" de staruinta ?

  • Upvote 1
  • 3 months later...
Posted

Un fel de doua feluri, te poti lua cu acest sistem sau cum sa ii spune dupa sistemul de timp. Doar ca inlocuiesti timpul cu vremea! 

Nu mi se pare nimic wow!

Dislike!

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

  • 1 month later...
Posted
La 26.04.2019 la 17:24, razvanduciuc a spus:

Un fel de doua feluri, te poti lua cu acest sistem sau cum sa ii spune dupa sistemul de timp. Doar ca inlocuiesti timpul cu vremea! 

Nu mi se pare nimic wow!

Dislike!

Aceasta sistema nu consta in ceva wow,este folositoare pentru orice server?

  • 1 year later...

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.