Posts: 737
Threads: 338
Joined: Jan 2013
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?