Jump to content
  • 0

cum fac un timer la /loadmission


crazyzee

Question

4 answers to this question

Recommended Posts

Toti am fost asa...

1.Faci o functie publica cu forward

2.In acea functie publica pui codul la ce vrei tu sa se repete

3.La public OnGameModeInit() pui un SetTimer .

Mai jos am facut un exemplu.Daca nu merge....nu stiu ce sa mai zic ....

[pawn]forward Timer(//Adica aici); //Daca cumva ai nevoie si de playerid,il treci intre paranteze;

public Timer(//Si aici)

{

    //Codul tau care vrei sa se repete

    return 1;

}

public OnGameModeInit()

{

    SetTimer("Timer",7200000,true) //Timer este numele callback-ului,72000000 este timpul in care sa se repete,iar true inseamna ca se repeta!

    //Celelalte lucruri din OnGameModeInit()

    return 1;

}

//Si gata[/pawn]

Sper ca te-am ajutat!

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.