Jump to content
  • 0

Cum fac sa se skimbe SetWorldTime in functie de ora?


Dany_Alex

Question

12 answers to this question

Recommended Posts

Nu ca sa fi expert in chestii din astea,dar iti voi arata :))

1.Creezi un callback cu foward

2.Setezi un timer

uite,pentru ca imi doresc sa ajut playerii :))

[pawn]

new timp[2];

foward SchimbaOra()

public SchimbaOra()

{

    Gettime(timp[0],timp[1],timp[2]);

    return 1;

}

public OnGameModeInit()

{

    SetTimer("SchimbaOra",100,true);

    //Celelalte lucruri din OnGameModeInit

    return 1;

}

[/pawn]

Link to comment
Share on other sites

Am 2 erori la compile :([pawn]C:\Documents and Settings\Dan\Desktop\srv 14\gamemodes\rp.pwn(30) : error 010: invalid function or declaration

C:\Documents and Settings\Dan\Desktop\srv 14\gamemodes\rp.pwn(608) : warning 235: public function lacks forward declaration (symbol "SchimbaOra")

C:\Documents and Settings\Dan\Desktop\srv 14\gamemodes\rp.pwn(610) : error 017: undefined symbol "Gettime"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

2 Errors.

[/pawn]

Link to comment
Share on other sites

[pawn]Nu se poate schimba timpul global pe un server in functie de ora.De ce? Pentru ca functia care schimba timpul nu foloseste parametrii (doar timpul) si schimba timpul pentru toata lumea, adica, daca se schimba in functie de ora, se va deregla ora globala.[/pawn] voiam sa spun ca daca de ex. este ora 12:00 sa fie ziua si cand se face ora 21:00 sa se faca noapte pe srv se poate asa este pe majoritatea srv RP GF dar nu cred ca m-am exprimat eu bine  :d

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.