13.05.2014, 13:53
Quote:
It'is possible when you shoot to other person then this callback is called, and no damage will be doing to him?
|
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;
}