SA-MP Forums Archive
[Ajuda] GetTickCount - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] GetTickCount (/showthread.php?tid=455190)



GetTickCount - B4dB0y - 31.07.2013

O sistema de head shot nгo estб funcionando..
Creio que deve ser por que o GetTickCount й chamado um monte de vezes na funзгo OnPlayerTakeDamage

Cуde:

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{

    HeadSacertos[playerid]++;
    if(HeadSacertos[playerid] == 4 && HeadStick[playerid] > GetTickCount())
        return Kill(playerid), SetPlayerHealth(playerid, 0);
       
    HeadStick[playerid] = GetTickCount() + 3000;
    return 1;
}

OnPlayerSpawn ..

HeadSacertos[playerid] = 0;