[Help]Settimer
#3

simples..

INTRODUЗAO:

SetTimmer й uma funcao, que define tempo. Ela prescisa de um forward para se saber, depois onde ela vai actuar.


################################################## ####################################


Agora vamos imaginar que й para defenir o tempo, que o player demora a tirar o nl de procurado:

Comecando:

no Topo do GM:

pawn Код:
forward tirar_procurado(playerid);

no comando:

pawn Код:
{
if(strcmp(cmdtext, "/limpar",true)==0)
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,2268.7170,2447.4351,-7.1953))
        {
        SetTimer("tirar_procurado",10000,true);
        SendClientMessage(playerid,COR_AZUL,"Aguarde 10 segundos limpar seu nivel de procurado");
    }
    }
}
explicando:

SetTimer - Funзгo
tirar_procurado - a forward que foi definida, dps serб usada num public
10000 - O tempo em milesimos de segundo (usa a calculadora do windows)
true - torna o tempo repetitivo, ou seja, podes usar aquilo quantas veses quiseres

Depois no fundo do GM:

pawn Код:
public tirar_procurado(playerid)
{
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,2268.7170,2447.4351,-7.1953))
        {
        SetPlayerWantedLevel(playerid,0);
        }
    }
}
Reply


Messages In This Thread
[Help]Settimer - by Caio_Cartaxo - 28.03.2010, 14:02
Re: [Help]Settimer - by russo666 - 28.03.2010, 14:09
Re: [Help]Settimer - by andmeida10 - 28.03.2010, 14:32
Re: [Help]Settimer - by Caio_Cartaxo - 28.03.2010, 14:36
Re: [Help]Settimer - by SlashPT - 28.03.2010, 14:40
Re: [Help]Settimer - by andmeida10 - 28.03.2010, 14:46
Re: [Help]Settimer - by SlashPT - 28.03.2010, 14:47
Re: [Help]Settimer - by 147rafa147 - 28.03.2010, 14:50
Re: [Help]Settimer - by SlashPT - 28.03.2010, 14:51
Re: [Help]Settimer - by Caio_Cartaxo - 28.03.2010, 15:37

Forum Jump:


Users browsing this thread: 1 Guest(s)