[Ajuda] SetTimerEx
#1

Pq sempre quando deixamos para o SetTimerEx se repetir em um determinado tempo e sendo ele em questгo a vida nunca й possivel para-lo? ex: Colocar uma arma como a Faca para sempre que batermos em alguem causar sangramento continuo, sempre que tento fazer algo do tipo e coloco o killtimer ele nunca para pois o player sempre continua batendo e "reativando" o settimer

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
    new Float:Colete;
    new Float:Vida;
    GetPlayerArmour(damagedid, Colete);
    GetPlayerHealth(damagedid, Vida);

    if(weaponid == 2)
    {
        if(Vida > 0)
        {
            Ssangramento[damagedid] = SetTimerEx("sangramento", 5000, false, "i", damagedid);
            SetTimerEx("dsangramento", 30000, false, "i", damagedid);
        }
    }
    return true;
}

forward sangramento(playerid);
public sangramento(playerid)
{
    new Float:health;
    GetPlayerHealth(playerid,health);
    SetPlayerHealth(playerid,(health-0.2));
}

forward dsangramento(playerid);
public dsangramento(playerid)
{
    KillTimer(Ssangramento[playerid]);
}
Reply


Messages In This Thread
SetTimerEx - by UzumakiNaruto - 25.04.2016, 06:27
Re: SetTimerEx - by Artista - 25.04.2016, 09:27
Re: SetTimerEx - by F1N4L - 25.04.2016, 11:42
Re: SetTimerEx - by RiqueP - 25.04.2016, 13:35
Re: SetTimerEx - by UzumakiNaruto - 25.04.2016, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)