[Ajuda] Reduзгo de hp por tempo
#2

Acho que dб certo, nгo testei:
pawn Код:
new
    tempohp,
    Float:VidaAll[MAX_PLAYERS]
;


CMD:reduzirlife(playerid)
{
    if(tempohp)
        return SendClientMessage(playerid, -1, " Jб usaram esse comando. ");
    tempohp = SetTimer("ReduzirHP", 2000, true);
    SendClientMessage(playerid, -1, " A cada 2 segundos a vida irб abaixar.");
    return 1;
}

CMD:reducao(playerid)
{
    if(!tempohp)
        return SendClientMessage(playerid, -1, " Ainda nгo ativaram o reduзгo de vida. ");
    KillTimer(tempohp);
    SendClientMessage(playerid, -1, " Reduzir vida automaticamente, desativado.");
    return 1;
}

forward ReduzirHP();
public ReduzirHP()
{
    for(new r = 0; r<MAX_PLAYERS; r++)
    {
        if(IsPlayerConnected(r))
        {
            GetPlayerHealth(r, VidaAll[r]);
            SetPlayerHealth(r, VidaAll[r]-1);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Reduзгo de hp por tempo - by merloch - 04.02.2014, 14:48
Re: Reduзгo de hp por tempo - by @Riichard - 04.02.2014, 15:00
Re: Reduзгo de hp por tempo - by JonathanFeitosa - 04.02.2014, 15:02
Re: Reduзгo de hp por tempo - by @Riichard - 04.02.2014, 15:04
Re: Reduзгo de hp por tempo - by JonathanFeitosa - 04.02.2014, 15:06
Re: Reduзгo de hp por tempo - by merloch - 04.02.2014, 15:10
Re: Reduзгo de hp por tempo - by merloch - 04.02.2014, 15:39
Re: Reduзгo de hp por tempo - by lucas_mdr1235 - 04.02.2014, 16:09

Forum Jump:


Users browsing this thread: 2 Guest(s)