OnPlayerWeaponShoot
#9

Quote:
Originally Posted by Madd92
Посмотреть сообщение
Just return 0 when the target player should not take damage.
Example:
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    new message[128];

    if (hittype == BULLET_HIT_TYPE_PLAYER && hitid != INVALID_PLAYER_ID && weaponid == WEAPON_DEAGLE)
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(hitid, x, y, z);
        if (!IsPlayerAimingAt(playerid, x, y, z, 1.5))
        {
            format(message, sizeof(message), "[Anti-Hack] Player %s (%d) is suspected to use No-Aim.", player_info[playerid][playername], playerid);
            SendAdminMessage(COLOR_RED, message);
            return 0;
        }
    }
    return 1;
}
Where is IsPlayerAiming at function?
Reply


Messages In This Thread
OnPlayerWeaponShoot - by audriuxxx - 13.05.2014, 13:48
Re: OnPlayerWeaponShoot - by Madd92 - 13.05.2014, 13:53
Re: OnPlayerWeaponShoot - by audriuxxx - 13.05.2014, 13:54
Re: OnPlayerWeaponShoot - by ball - 13.05.2014, 13:54
Re: OnPlayerWeaponShoot - by audriuxxx - 13.05.2014, 14:05
Re: OnPlayerWeaponShoot - by Konstantinos - 13.05.2014, 14:07
Re: OnPlayerWeaponShoot - by audriuxxx - 13.05.2014, 14:13
Re: OnPlayerWeaponShoot - by Madd92 - 13.05.2014, 14:18
Re: OnPlayerWeaponShoot - by audriuxxx - 13.05.2014, 14:28
Re: OnPlayerWeaponShoot - by Madd92 - 13.05.2014, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)