OnPlayerTakeDamage don't work with sniper
#6

Unconfirmed.

I tested this with five sniper shots, each one being further apart from the target.



This is my test code:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(weaponid == 34)
        {
            printf("(C1) OnPlayerTakeDamage(%d, %d, %f, %d),(DISTANCE: %f)", playerid, issuerid, amount, weaponid, GetDistanceBetweenPlayers(playerid, issuerid));
        }
        else if(GetPlayerWeapon(issuerid) == 34)
        {
            printf("(C2) OnPlayerTakeDamage(%d, %d, %f, %d), (DISTANCE: %f)", playerid, issuerid, amount, weaponid, GetDistanceBetweenPlayers(playerid, issuerid));
        }
    }
   
    return 1;
}


These are my results:
pawn Код:
[19:46:00] (C1) OnPlayerTakeDamage(0, 1, 41.250000, 34),(DISTANCE: 14.662270)
[19:46:13] (C1) OnPlayerTakeDamage(0, 1, 41.250000, 34),(DISTANCE: 43.184646)
[19:46:37] (C1) OnPlayerTakeDamage(0, 1, 41.250000, 34),(DISTANCE: 86.199714)
[19:46:48] (C1) OnPlayerTakeDamage(0, 1, 41.250000, 34),(DISTANCE: 114.422538)
[19:47:08] (C1) OnPlayerTakeDamage(0, 1, 41.250000, 34),(DISTANCE: 145.569320)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)